I want stopwords excluded except when the search term is within double quotes
eg. “just like that” should also search “that”.
Is this possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on the configuration of the field you are querying.
If the configuration of the indexing analyzer includes a StopFilterFactory, then the stopwords are simply not indexed, so you can not query for them afterward. But since Solr keeps the position of the terms in the index, you can instruct it to increment the position value of the remaining terms to reflect the fact that originally, there was other terms in between.
The “enablePositionIncrements” here is the key to achieve that:
If the querying analyzer also has the StopFilterFactory configured with the same settings, your query should work as expected.
See this link for details:
http://www.lucidimagination.com/search/document/CDRG_ch05_5.6.18