https://github.com/SpringSource/spring-data-solr
https://github.com/SpringSource/spring-data-solr-examples
2.(SolrTemplate)从源码中,我们可以总结出:
其实spring datasolr中的Repository对实体的CURD操作,是依赖与构造参数中的SolrOperations,
SolrTemplate实现了SolrOperator接口,所以我们可以自定义Repository,借助SolrTemplate来自定义实体的操作。
正如上图所示,spring datasolr继承了Spring Data Jpa对实体的访问方式,由上至下,依次进行接口继承与实现,这样做的优点很明显,就是容易扩展,在最后面,用户可以自定义接口,实现自定义的方法。
3.(权重)当用solr或者lucene搜索时,如果想对不同类型的文章或者不同字段设置不同的权重,又或者对不同的搜索词语设置不同权重,则需要boost功能,详情参见SpringDatasolr文档;