mirror of https://github.com/apache/lucene.git
LUCENE-4857: Don't unnecessarily copy stem override map in StemmerOverrideFilter
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1458857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2f8c2cff03
commit
e33b01bc50
|
@ -142,7 +142,7 @@ public final class DutchAnalyzer extends Analyzer {
|
|||
if (!excltable.isEmpty())
|
||||
result = new SetKeywordMarkerFilter(result, excltable);
|
||||
if (!stemdict.isEmpty())
|
||||
result = new StemmerOverrideFilter(matchVersion, result, stemdict);
|
||||
result = new StemmerOverrideFilter(result, stemdict);
|
||||
result = new SnowballFilter(result, new org.tartarus.snowball.ext.DutchStemmer());
|
||||
return new TokenStreamComponents(source, result);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class TestStemmerOverrideFilter extends BaseTokenStreamTestCase {
|
|||
dictionary.put("booked", "books");
|
||||
Tokenizer tokenizer = new KeywordTokenizer(new StringReader("booked"));
|
||||
TokenStream stream = new PorterStemFilter(
|
||||
new StemmerOverrideFilter(TEST_VERSION_CURRENT, tokenizer, dictionary));
|
||||
new StemmerOverrideFilter(tokenizer, dictionary));
|
||||
assertTokenStreamContents(stream, new String[] { "books" });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue