Opened 14 years ago

Closed 9 years ago

#666 closed enhancement (fixed)

can we add stemming and plurals to lucene? Spanish. Snowball.

Reported by: kjdon Owned by: nobody
Priority: moderate Milestone: 3.06 Release
Component: Collection Building Severity: enhancement
Keywords: Cc:


Requested by Diego. Nov 2008

Can apparently be done using SnowballAnalyzer??

Change History (5)

comment:1 by ak19, 11 years ago

Milestone: Collection building wishlist3.06 Release

Email Oct 2013 from Diego:

I want to comment some things about Lucene. I was reviewing old pending emails from Spanish list and I find many of them asking for stemming in Lucene. As Kathy told me before, Lucene has no stemming process and that can be replaced with "*" at the word ending. This workaround not always works., i.e, you have "fish" and "fishes" so "fish*" is enough. We have "pez" and "peces" and "pe*" is not a good query string.

Digging a little a read these info:

And these are the available stemmers:

Could it be a solution?. Perhaps it can be implemented as an extension?

comment:2 by ak19, 11 years ago

Summary: can we add stemming and plurals to lucene?can we add stemming and plurals to lucene? Spanish. Snowball.

comment:3 by ak19, 11 years ago

More information from Diego:

I think that Snowball applies to SolR too. Look this:

It says:

Word stemming is, obviously, very language specific. Solr includes several language-specific stemmers created by the Snowballgenerator that are based on the Porter stemming algorithm. The generic Snowball Porter Stemmer Filter can be used to configure any of these language stemmers. Solr also includes a convenience wrapper for the English Snowball stemmer. There are also several purpose-built stemmers for non-English languages. These stemmers are described in Language Analysis.

And here:

you have the Spanish stemmers.

Here is the SOlR implementation of Snowball:

comment:4 by ak19, 9 years ago

The Snowball analyzer is now available to use in GS3.06 since the upgrade to solr 4.7.2, see

A related ticket is which mentions the Japanese analyzer Koromoji also available since lucene/solr 3.6.

The relevant commits for the lucene and solr update from 3.3.0 to 4.7.2 are the commit revisions between 29133 of 16.07.2014 and 29228 of 21.08.2014, and a further commit (important fix) at from 08.10.2014

Diego has tested it and found that Snowball Analyzer has issues for Spanish, and that the Hunspell analyzer, which also works with solr 4.7.2, may be better suited for Spanish and some other languages. See and the links there.

comment:5 by ak19, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.