Package org.opensearch.index.analysis
Class ReloadableCustomAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.opensearch.index.analysis.ReloadableCustomAnalyzer
- All Implemented Interfaces:
Closeable
,AutoCloseable
,AnalyzerComponentsProvider
public final class ReloadableCustomAnalyzer
extends org.apache.lucene.analysis.Analyzer
implements AnalyzerComponentsProvider
A custom analyzer that is reloadable
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.Analyzer.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents
-
Field Summary
Fields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents
createComponents
(String fieldName) int
getOffsetGap
(String field) int
getPositionIncrementGap
(String fieldName) protected Reader
initReader
(String fieldName, Reader reader) protected Reader
initReaderForNormalization
(String fieldName, Reader reader) protected org.apache.lucene.analysis.TokenStream
void
reload
(String name, Settings settings, Map<String, TokenizerFactory> tokenizers, Map<String, CharFilterFactory> charFilters, Map<String, TokenFilterFactory> tokenFilters) Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, getReuseStrategy, normalize, tokenStream, tokenStream
-
Method Details
-
getComponents
- Specified by:
getComponents
in interfaceAnalyzerComponentsProvider
-
getPositionIncrementGap
- Overrides:
getPositionIncrementGap
in classorg.apache.lucene.analysis.Analyzer
-
getOffsetGap
- Overrides:
getOffsetGap
in classorg.apache.lucene.analysis.Analyzer
-
getAnalysisMode
-
initReaderForNormalization
- Overrides:
initReaderForNormalization
in classorg.apache.lucene.analysis.Analyzer
-
normalize
protected org.apache.lucene.analysis.TokenStream normalize(String fieldName, org.apache.lucene.analysis.TokenStream in) - Overrides:
normalize
in classorg.apache.lucene.analysis.Analyzer
-
reload
public void reload(String name, Settings settings, Map<String, TokenizerFactory> tokenizers, Map<String, CharFilterFactory> charFilters, Map<String, TokenFilterFactory> tokenFilters) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classorg.apache.lucene.analysis.Analyzer
-
createComponents
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName) - Specified by:
createComponents
in classorg.apache.lucene.analysis.Analyzer
-
initReader
- Overrides:
initReader
in classorg.apache.lucene.analysis.Analyzer
-