Exclude these words function

How do I implement the Exclude These Words feature for a Lucene search?

Thank!

-1


source to share


2 answers


Take a look at the NOT operator here . Just create your request accordingly or massage if it's a custom request.



0


source


so i can use stopanalyzer:

StopAnalyzer StopAnalyzer includes a lower case filter as well as a filter that excludes any "stop words" words such as articles (a, an, etc.) that are so common in English that they can also be noise for search purposes. StopAnalyzer comes with a set of stop words, but you can create one with your own array of stop words.



http://lucene.apache.org/java/2_3_0/api/org/apache/lucene/analysis/StopAnalyzer.html

More information: http://www.darksleep.com/lucene/ How to sort by Lucene.Net field and ignore common stop words like 'a' and 'the'?

0


source







All Articles