I am developing a web application using spring MVC and I have hosted this using tomcat. I have a requirement where I want to integrate apache-solr to my search engine.
I tried looking on internet for various tutorials but couldn't find a proper one to explain the steps.
So my requirements are
After going through some tutorials I think spring-data-solr is suitable for spring MVC.
P.S. I am new to all the above technologies.
For Solr in general, you should refer to the Solr reference guide for help. It is meant for the upcoming Solr 5.0 release, but most of the guide is still relevant for 4.0 and the other documentation (the old wiki) is of poor quality.
Solr requires a separate installation; it is not just a maven dependency. To install Solr, follow the install instructions from the guide.
To contact solr in your java layer, you can use solr-j
, which you can add as a maven dependency, as noted here, the latest version is 4.10.2
:
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>4.10.2</version>
</dependency>
There's lots of documentation about how to use Solr-J here. spring-data-solr
may also work for you.
Hibernate has nothing to do with the integration of solr and spring. Solr can load from your DB directly using the data import handler or you can update documents in solr via its REST API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With