public interface CustomAnalyzerWrapperFactory
Analyzer instances.
For example, with normal configuration, Analyzers can only be applied to fields that start with a pre-defined prefix.
FilenameAnalyzer for all fields with the key "projectRoot"
Analyzers normally, which means that it is impossible
to configure an analyzer if you have a set of fields that have a pre-defined prefix but a dynamically-determined
suffix (and we have that for change impact).
This factory allows us to define our own Analyzer which can have its own logic to deal with this problem.
This is then the primary Analyzer defined for the Lucene engine. If the logic in this (wrapper) Analyzer
does not match a field, it then delegates the field to the Analyzers defined in the fieldAnalyzer parameter.
(At least, that's an example of what it can and should do, but that's up to the implementation details).LuceneConfigBuilder#withDefaultAnalyzer(),
LuceneConfigBuilder#usingAnalyzerWrapperFactory(CustomAnalyzerWrapperFactory)| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.Analyzer |
getAnalyzerWrapper(org.apache.lucene.analysis.Analyzer defaultAnalyzer,
Map<String,org.apache.lucene.analysis.Analyzer> fieldAnalyzers) |
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.