简体   繁体   中英

Solr search query for advanced search

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);

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM