mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
remove tabs
This commit is contained in:
parent
4fcd2643f2
commit
fbc74ff339
@ -53,20 +53,20 @@ public class IcuFoldingTokenFilterFactory extends AbstractTokenFilterFactory {
|
|||||||
|
|
||||||
@Override public TokenStream create(TokenStream tokenStream) {
|
@Override public TokenStream create(TokenStream tokenStream) {
|
||||||
|
|
||||||
// The ICUFoldingFilter is in fact implemented as a ICUNormalizer2Filter.
|
// The ICUFoldingFilter is in fact implemented as a ICUNormalizer2Filter.
|
||||||
// ICUFoldingFilter lacks a constructor for adding filtering so we implemement it here
|
// ICUFoldingFilter lacks a constructor for adding filtering so we implemement it here
|
||||||
if (unicodeSetFilter != null) {
|
if (unicodeSetFilter != null) {
|
||||||
Normalizer2 base = Normalizer2.getInstance(
|
Normalizer2 base = Normalizer2.getInstance(
|
||||||
ICUFoldingFilter.class.getResourceAsStream("utr30.nrm"),
|
ICUFoldingFilter.class.getResourceAsStream("utr30.nrm"),
|
||||||
"utr30", Normalizer2.Mode.COMPOSE);
|
"utr30", Normalizer2.Mode.COMPOSE);
|
||||||
UnicodeSet unicodeSet = new UnicodeSet(unicodeSetFilter);
|
UnicodeSet unicodeSet = new UnicodeSet(unicodeSetFilter);
|
||||||
|
|
||||||
unicodeSet.freeze();
|
unicodeSet.freeze();
|
||||||
Normalizer2 filtered = new FilteredNormalizer2(base, unicodeSet);
|
Normalizer2 filtered = new FilteredNormalizer2(base, unicodeSet);
|
||||||
return new org.apache.lucene.analysis.icu.ICUNormalizer2Filter(tokenStream, filtered);
|
return new org.apache.lucene.analysis.icu.ICUNormalizer2Filter(tokenStream, filtered);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return new ICUFoldingFilter(tokenStream);
|
return new ICUFoldingFilter(tokenStream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user