Package org.elasticsearch.index.analysis
Class IndexAnalyzers
- java.lang.Object
-
- org.elasticsearch.index.analysis.IndexAnalyzers
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class IndexAnalyzers extends Object implements Closeable
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
Constructors Constructor Description IndexAnalyzers(Map<String,NamedAnalyzer> analyzers, Map<String,NamedAnalyzer> normalizers, Map<String,NamedAnalyzer> whitespaceNormalizers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()NamedAnalyzerget(String name)Returns an analyzer mapped to the given name ornullif not presentMap<String,NamedAnalyzer>getAnalyzers()Returns an (unmodifiable) map of containing the index analyzersNamedAnalyzergetDefaultIndexAnalyzer()Returns the default index analyzer for this indexNamedAnalyzergetDefaultSearchAnalyzer()Returns the default search analyzer for this index.NamedAnalyzergetDefaultSearchQuoteAnalyzer()Returns the default search quote analyzer for this indexNamedAnalyzergetNormalizer(String name)Returns a normalizer mapped to the given name ornullif not presentNamedAnalyzergetWhitespaceNormalizer(String name)Returns a normalizer that splits on whitespace mapped to the given name ornullif not present
-
-
-
Constructor Detail
-
IndexAnalyzers
public IndexAnalyzers(Map<String,NamedAnalyzer> analyzers, Map<String,NamedAnalyzer> normalizers, Map<String,NamedAnalyzer> whitespaceNormalizers)
-
-
Method Detail
-
get
public NamedAnalyzer get(String name)
Returns an analyzer mapped to the given name ornullif not present
-
getAnalyzers
public Map<String,NamedAnalyzer> getAnalyzers()
Returns an (unmodifiable) map of containing the index analyzers
-
getNormalizer
public NamedAnalyzer getNormalizer(String name)
Returns a normalizer mapped to the given name ornullif not present
-
getWhitespaceNormalizer
public NamedAnalyzer getWhitespaceNormalizer(String name)
Returns a normalizer that splits on whitespace mapped to the given name ornullif not present
-
getDefaultIndexAnalyzer
public NamedAnalyzer getDefaultIndexAnalyzer()
Returns the default index analyzer for this index
-
getDefaultSearchAnalyzer
public NamedAnalyzer getDefaultSearchAnalyzer()
Returns the default search analyzer for this index. If not set, this will return the default analyzer
-
getDefaultSearchQuoteAnalyzer
public NamedAnalyzer getDefaultSearchQuoteAnalyzer()
Returns the default search quote analyzer for this index
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-