Solr tutorial / simple example for java

I see some kind of question about how to do specific things with the sider in Solr, but what about how to actually use it? I'm stuck on how to just request api api to get results in Java, possibly using Solrj? I just can't find a simple tutorial that would explain this.

All I have is the SuggestesterTest class, which even after 3 hours of decoding attempts, I still can’t understand how everything works, especially crazy requests that look like this:

req("qt", requestUri, "q", "ac", SpellingParams.SPELLCHECK_COUNT, "2", SpellingParams.SPELLCHECK_ONLY_MORE_POPULAR, "true"), "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/int[@name='numFound'][.='2']", "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/arr[@name='suggestion']/str[1][.='acquire']", "//lst[@name='spellcheck']/lst[@name='suggestions']/lst[@name='ac']/arr[@name='suggestion']/str[2][.='accommodate']" 

Isn’t it easier?

Also, another question: do I need to rebuild the index for suggestions? if we assume that I added some data earlier, and now I want to use it with a recommender. Should I also indicate in which field I want to request offers?

Thanks!

+4
source share

All Articles