You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Steven Pannell <st...@zooplus.com> on 2006/01/03 10:54:30 UTC
how to handle plurals
Hi,
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??
thanks,
Steve.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: how to handle plurals
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
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 - http://www.lucenebook.com - and feel
free to look at the examples in the src directory there.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org