You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Muddapati, Jagadish" <Ja...@nscorp.com> on 2018/09/13 14:09:05 UTC
Multi word search is not returning correct results in solr
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.
Re: Multi word search is not returning correct results in solr
Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
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 <
Jagadish.Muddapati@nscorp.com> 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.
>