From e807c99f278694af06b1895983f5daa623ec488b Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Thu, 29 Aug 2013 10:11:59 +0200 Subject: [PATCH] Fixed a typo in the config of light finnish stemmer (old last_finish is still supported for backward compatibility) Closes #3594 --- .../analysis/tokenfilters/stemmer-tokenfilter.asciidoc | 2 +- .../index/analysis/StemmerTokenFilterFactory.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/analysis/tokenfilters/stemmer-tokenfilter.asciidoc b/docs/reference/analysis/tokenfilters/stemmer-tokenfilter.asciidoc index 676c2f3894e..6e4afce987c 100644 --- a/docs/reference/analysis/tokenfilters/stemmer-tokenfilter.asciidoc +++ b/docs/reference/analysis/tokenfilters/stemmer-tokenfilter.asciidoc @@ -37,7 +37,7 @@ http://snowball.tartarus.org/algorithms/swedish/stemmer.html[swedish], http://snowball.tartarus.org/algorithms/turkish/stemmer.html[turkish], http://www.medialab.tfe.umu.se/courses/mdm0506a/material/fulltext_ID%3D10049387%26PLACEBO%3DIE.pdf[minimal_english], http://lucene.apache.org/core/4_3_0/analyzers-common/index.html?org%2Fapache%2Flucene%2Fanalysis%2Fen%2FEnglishPossessiveFilter.html[possessive_english], -http://clef.isti.cnr.it/2003/WN_web/22.pdf[light_finish], +http://clef.isti.cnr.it/2003/WN_web/22.pdf[light_finnish], http://dl.acm.org/citation.cfm?id=1141523[light_french], http://dl.acm.org/citation.cfm?id=318984[minimal_french], http://dl.acm.org/citation.cfm?id=1141523[light_german], diff --git a/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java b/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java index 63a3b4aee44..910481b3049 100644 --- a/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java +++ b/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java @@ -134,6 +134,9 @@ public class StemmerTokenFilterFactory extends AbstractTokenFilterFactory { } else if ("possessive_english".equalsIgnoreCase(language) || "possessiveEnglish".equalsIgnoreCase(language)) { return new EnglishPossessiveFilter(version, tokenStream); } else if ("light_finish".equalsIgnoreCase(language) || "lightFinish".equalsIgnoreCase(language)) { + // leaving this for backward compatibility + return new FinnishLightStemFilter(tokenStream); + } else if ("light_finnish".equalsIgnoreCase(language) || "lightFinnish".equalsIgnoreCase(language)) { return new FinnishLightStemFilter(tokenStream); } else if ("light_french".equalsIgnoreCase(language) || "lightFrench".equalsIgnoreCase(language)) { return new FrenchLightStemFilter(tokenStream);