I new in Solr. I can add data to Solr from application, but I want to get data from Solr to my Java desktop application.
How can I get data from Solr ("http://localhost:8983/solr")?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Solrj is the easiest way to go. It’s the solr java client library.
Add it as a dependency to your project, then write a pojo with all the fields that you want to get back from Solr. Annotate each field with the solrj
@Fieldannotation, then send your query to Solr like this: