Difference between solr core & solrj & spring-data-solr

♀尐吖头ヾ 提交于 2019-12-11 12:38:18

问题


I have been trying to learn solr for implementing search for one of the application. There are three different libraries that i always bump into solr-core, solrj, and spring-data-solr what is the basic difference between three three jar and which is supposed to be used with spring? Recently i tried using solrj and solr-core with spring and got an StackOverflowException

here is my question that resulted in stack overflow.Unable to find a solution i tried removing solr-core dependency and ended up in the following error

 org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'solr:solr-server'. 

I basically feel that im not doing it the right way. An eye opener for my confusion will be quite helpful. Thanks.


回答1:


Solrj is the client lib when trying to connect to a SolrServer instance.

Spring Data Solr is a small layer above solrj providing some fluent API and repository abstractions. Have a look at the example and/or this tutorial as a starting point.

You might want to use solr-core to run an embedded SolrServer eg. for testing.



来源:https://stackoverflow.com/questions/15307737/difference-between-solr-core-solrj-spring-data-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!