0
votes

I'm using solr 4.2. And I've implemented Advanced search in my application. In this search, one option is there for 'include all these words'. so whenever i put any word or any phrase without stop words, it works fine but with stop words, it returns no result. For example: Query: purchase tune This query works fine but if i put query like:'i would like to purchase tune' then it gives no results. Why is so? And what i need to do? Also for this kind of search I was using 'mm' parameter in solr. But now using 'q.op'.

In solr i'm adding param q.op as following params.add("q.op","AND"); and query as params.add("q",query);

1
can you show us the query you use and the field definition that you use it on?Maurizio In denmark
@MaurizioIndenmark: just edited the question and shown how m adding paramsForum User
remeber that an AND is very strict. how is the result you are expecting to get back?Maurizio In denmark

1 Answers

0
votes

Do you encounter the problem with the Dismax Handler and the mm parameter?

The DisMax handler has an issue with stopwords: https://issues.apache.org/jira/browse/SOLR-3085

In this ticket you find some workarounds:

Typical solution is to not use stopwords or harmonize stopword lists across all fields in your QF, or relax the MM to a lower percentag. Sometimes these are not acceptable workarounds, and we should find a better solution.

Perhaps "harmonize stopword lists" is a suitable soluation for your problem.