Mark Scandinavian analysis components as multi term aware

This commit is contained in:
Mike McCandless 2016-08-24 19:50:25 -04:00
parent 7492300544
commit 5eb66e3378
3 changed files with 10 additions and 4 deletions

View File

@ -27,7 +27,7 @@ import org.elasticsearch.index.IndexSettings;
/** /**
* Factory for {@link ScandinavianFoldingFilter} * Factory for {@link ScandinavianFoldingFilter}
*/ */
public class ScandinavianFoldingFilterFactory extends AbstractTokenFilterFactory { public class ScandinavianFoldingFilterFactory extends AbstractTokenFilterFactory implements MultiTermAwareComponent {
public ScandinavianFoldingFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { public ScandinavianFoldingFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
super(indexSettings, name, settings); super(indexSettings, name, settings);
@ -38,4 +38,8 @@ public class ScandinavianFoldingFilterFactory extends AbstractTokenFilterFactory
return new ScandinavianFoldingFilter(tokenStream); return new ScandinavianFoldingFilter(tokenStream);
} }
@Override
public Object getMultiTermComponent() {
return this;
}
} }

View File

@ -27,7 +27,7 @@ import org.elasticsearch.index.IndexSettings;
/** /**
* Factory for {@link ScandinavianNormalizationFilter} * Factory for {@link ScandinavianNormalizationFilter}
*/ */
public class ScandinavianNormalizationFilterFactory extends AbstractTokenFilterFactory { public class ScandinavianNormalizationFilterFactory extends AbstractTokenFilterFactory implements MultiTermAwareComponent {
public ScandinavianNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { public ScandinavianNormalizationFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) {
super(indexSettings, name, settings); super(indexSettings, name, settings);
@ -38,4 +38,8 @@ public class ScandinavianNormalizationFilterFactory extends AbstractTokenFilterF
return new ScandinavianNormalizationFilter(tokenStream); return new ScandinavianNormalizationFilter(tokenStream);
} }
@Override
public Object getMultiTermComponent() {
return this;
}
} }

View File

@ -229,8 +229,6 @@ public class AnalysisFactoryTestCase extends ESTestCase {
// for tee-sinks // for tee-sinks
.put("daterecognizer", Void.class) .put("daterecognizer", Void.class)
.put("minhash", Void.class) .put("minhash", Void.class)
.put("scandinaviannormalization", Void.class)
.put("scandinavianfolding", Void.class)
.immutableMap(); .immutableMap();