Package org.elasticsearch.index.analysis
Class IndexAnalyzers
java.lang.Object
org.elasticsearch.index.analysis.IndexAnalyzers
- All Implemented Interfaces:
Closeable
,AutoCloseable
IndexAnalyzers contains a name to analyzer mapping for a specific index.
This class only holds analyzers that are explicitly configured for an index and doesn't allow
access to individual tokenizers, char or token filter.
- See Also:
AnalysisRegistry
-
Constructor Summary
ConstructorDescriptionIndexAnalyzers(Map<String,NamedAnalyzer> analyzers, Map<String,NamedAnalyzer> normalizers, Map<String,NamedAnalyzer> whitespaceNormalizers)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Returns an analyzer mapped to the given name ornull
if not presentReturns an (unmodifiable) map of containing the index analyzersReturns the default index analyzer for this indexReturns the default search analyzer for this index.Returns the default search quote analyzer for this indexgetNormalizer(String name)
Returns a normalizer mapped to the given name ornull
if not presentReturns a normalizer that splits on whitespace mapped to the given name ornull
if not present
-
Constructor Details
-
IndexAnalyzers
public IndexAnalyzers(Map<String,NamedAnalyzer> analyzers, Map<String,NamedAnalyzer> normalizers, Map<String,NamedAnalyzer> whitespaceNormalizers)
-
-
Method Details
-
get
Returns an analyzer mapped to the given name ornull
if not present -
getAnalyzers
Returns an (unmodifiable) map of containing the index analyzers -
getNormalizer
Returns a normalizer mapped to the given name ornull
if not present -
getWhitespaceNormalizer
Returns a normalizer that splits on whitespace mapped to the given name ornull
if not present -
getDefaultIndexAnalyzer
Returns the default index analyzer for this index -
getDefaultSearchAnalyzer
Returns the default search analyzer for this index. If not set, this will return the default analyzer -
getDefaultSearchQuoteAnalyzer
Returns the default search quote analyzer for this index -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-