SuggestStopFilter carefully removes stop words for suggesters by Michael McCandless.
Michael has tamed the overly “aggressive” StopFilter with SuggestStopFilter.
From the post:
Finally, you could use the new StopSuggestFilter at lookup time: this filter is just like StopFilter except when the token is the very last token, it checks the offset for that token and if the offset indicates that the token has ended without any further non-token characters, then the token is preserved. The token is also marked as a keyword, so that any later stem filters won’t change it. This way a query “a” can find “apple”, but a query “a ” (with a trailing space) will find nothing because the “a” will be removed.
I’ve pushed StopSuggestFilter to jirasearch.mikemccandless.com and it seems to be working well so far!
Have you noticed how quickly improvements for Lucene and Solr emerge?