lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "m.harig" <m.ha...@gmail.com>
Subject singular and plural search
Date Wed, 21 Oct 2009 11:22:45 GMT

hello all

        i've a doubt in plural & singular word searching , i've got code
snippet from nabble forum , 

private static Analyzer createEnglishAnalyzer() {
return new Analyzer() {
        public TokenStream tokenStream(String fieldName, Reader reader)
{
                TokenStream result = new StandardTokenizer(reader);
                result = new StandardFilter(result);
                result = new LowerCaseFilter(result);
                result = new StopFilter(result,
StandardAnalyzer.STOP_WORDS);
                result = new SnowballFilter(result, "English");
                return result;
        }
};
} 

to do my above , but when i search for a keyword "loans" , this code turns
my keyword to "loan" and gives me the results for "loan" keyword , but when
i search for "loan" it should return the results for "loans" keyword.

please anyone suggest me.
-- 
View this message in context: http://www.nabble.com/singular-and-plural-search-tp25990682p25990682.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message