lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: how to handle plurals
Date Tue, 03 Jan 2006 10:35:49 GMT

On Jan 3, 2006, at 4:54 AM, Steven Pannell wrote:
> Does anyone know how I can handle plurals in lucene.  If I search  
> for dog
> and then dogs I get two different search results.  I would like the  
> same
> results regardless of the plural.  Can this be done??

Yes, it can easily be done by using an analyzer that stems, such as  
the SnowballAnalyzer.  The SnowballAnalyzer is found currently in  
Lucene's subversion repository under contrib/snowball.  Build this  
yourself if you are using Lucene from trunk.  If you're using Lucene  
1.4.3, your best option is to grab the snowball-1.1-dev.jar from the  
"Lucene in Action" codebase - - and feel  
free to look at the examples in the src directory there.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message