StopWords behavior with phrases

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

StopWords behavior with phrases

Ashish Bisht
Hi,

We make query to solr as below

*q="market and cloud" OR (market and cloud)&q.op=AND&deftype=edismax....*

Our intent to look for results with both phrase match and AND query together
where solr itself takes care of relevancy.

But due to presence of stopword in phrase query a gap is left which gives
different results as against a keyword "market cloud".

"parsedquery_toString":"+(+(content:\"market ? cloud\" |
search_field:\"market ? cloud\"))",

There are suggestion that for phrase query create a separate field with no
stopword,But then we'll not be able to achieve both phrase and AND in a
single request.

Is there anyway ? can be removed from phrase or any suggestion for our
requirement.

Please suggest

Regards
Ashish





--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Reply | Threaded
Open this post in threaded view
|

Re: StopWords behavior with phrases

Jan Høydahl / Cominvent
Well perhaps you don't need to remove stopwords at all? :)
Or a middle ground is to NOT removing stopwords in your 'index' analyzer, then you have the flexibility of removing them on query side. Thus if you use &stopwords=false on your call perhaps that works?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 21. mai 2019 kl. 09:53 skrev Ashish Bisht <[hidden email]>:
>
> Hi,
>
> We make query to solr as below
>
> *q="market and cloud" OR (market and cloud)&q.op=AND&deftype=edismax....*
>
> Our intent to look for results with both phrase match and AND query together
> where solr itself takes care of relevancy.
>
> But due to presence of stopword in phrase query a gap is left which gives
> different results as against a keyword "market cloud".
>
> "parsedquery_toString":"+(+(content:\"market ? cloud\" |
> search_field:\"market ? cloud\"))",
>
> There are suggestion that for phrase query create a separate field with no
> stopword,But then we'll not be able to achieve both phrase and AND in a
> single request.
>
> Is there anyway ? can be removed from phrase or any suggestion for our
> requirement.
>
> Please suggest
>
> Regards
> Ashish
>
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html