问题
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