Reputation: 41
I have solr running at http://localhost:8983/solr/
. I have a Spring MVC app running at http://localhost:8080/login.jsp
.
I would like to be able to Query only the solr data from my spring app. What is the best way to go about this? Does someone have a simple running example?
Upvotes: 2
Views: 1434
Reputation: 6736
You can also use spring-data-solr to do so. It should integrate quite nicely into an existing spring MVC application.
Upvotes: 0
Reputation: 52779
Integrate Solr with Spring using SolrJ.
SolrJ is the Solr Java Client Library which will allow you to query Solr and get back the results in java objects which you can use as Model objects with Spring MVC.
You can easily create a Repository which interacts with Solr using Solrj.
Also, secure the Solr Collections so that no one can access Solr from direct URL without authentication.
The Solrj Client with the Spring MVC app can query SOlr with Authentication.
Upvotes: 1