From aeea3565aea9ba885ea98cd4f18bd4eeadd717c3 Mon Sep 17 00:00:00 2001 From: Robin Hughes Date: Fri, 1 Jun 2012 15:35:20 +0100 Subject: [PATCH] Analysis: Add bulgarian to stemmer token filter language options --- .../index/analysis/StemmerTokenFilterFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java b/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java index 5870119bed1..7baeb272c9e 100644 --- a/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java +++ b/src/main/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactory.java @@ -22,6 +22,7 @@ package org.elasticsearch.index.analysis; import org.apache.lucene.analysis.PorterStemFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.ar.ArabicStemFilter; +import org.apache.lucene.analysis.bg.BulgarianStemFilter; import org.apache.lucene.analysis.br.BrazilianStemFilter; import org.apache.lucene.analysis.cz.CzechStemFilter; import org.apache.lucene.analysis.de.GermanLightStemFilter; @@ -75,6 +76,8 @@ public class StemmerTokenFilterFactory extends AbstractTokenFilterFactory { return new SnowballFilter(tokenStream, new BasqueStemmer()); } else if ("brazilian".equalsIgnoreCase(language)) { return new BrazilianStemFilter(tokenStream); + } else if ("bulgarian".equalsIgnoreCase(language)) { + return new BulgarianStemFilter(tokenStream); } else if ("catalan".equalsIgnoreCase(language)) { return new SnowballFilter(tokenStream, new CatalanStemmer()); } else if ("czech".equalsIgnoreCase(language)) {