lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Maggon <>
Subject Quotes dependent StopWords removal
Date Tue, 15 Aug 2006 22:18:02 GMT
Currently, in my application (that uses Lucene), I am using a Porter + StandardAnalyzer (with
stop words).

I would like to do the following:

When the user performs a search, the analyzer should remove the "stopwords" only if the stop
word is not present in quotes. If the stop word is present in quotes, I don't want the stop
word to be removed by the analyzer.

For e.g.

"no dress code" - should not remove "no"  as it's present in quotes.

shirts with trousers - should remove "with" as a stop word.

I have been trying to do this with Lucene, but have not found a straight forward way of doing
it. I have been digging in Lucene mail archives, but it seems like there is no easy way to
do this apart from extending / modifying the QueryParser. In some sense, it is similar to
the issue discussed in:

Is there any way I can avoid subclassing QueryParser ?


Sameer Maggon.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message