Multi word search is not returning correct results in solr

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi word search is not returning correct results in solr

Muddapati, Jagadish
Hi,

The Solr results are not working for multi word search. When I use the double quotes around the words it's not giving the correct results and getting random results.

Please suggest me resolution for this.

String contentText = URLEncoder.encode(String.format("title:\"%s\" OR body:\"%s\" OR pagename:%s OR title:%s OR body:%s",searchContent,searchContent, searchContent,searchContent,searchContent),"UTF-8");

Solr displaying results: select?q=body:"Intermodal%20Schedules"&wt=json

Thanks,
Jagadish M.
Reply | Threaded
Open this post in threaded view
|

Re: Multi word search is not returning correct results in solr

Zheng Lin Edwin Yeo
Hi Jagadish,

How are you passing in the query to do the search? Is it through SolrJ or
HTTP or something else?
Also, which version of Solr are you using?

Regards,
Edwin

On Thu, 13 Sep 2018 at 22:09, Muddapati, Jagadish <
[hidden email]> wrote:

> Hi,
>
> The Solr results are not working for multi word search. When I use the
> double quotes around the words it's not giving the correct results and
> getting random results.
>
> Please suggest me resolution for this.
>
> String contentText = URLEncoder.encode(String.format("title:\"%s\" OR
> body:\"%s\" OR pagename:%s OR title:%s OR
> body:%s",searchContent,searchContent,
> searchContent,searchContent,searchContent),"UTF-8");
>
> Solr displaying results: select?q=body:"Intermodal%20Schedules"&wt=json
>
> Thanks,
> Jagadish M.
>