- All Superinterfaces:
AutoCloseable,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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()default NamedAnalyzerReturns an analyzer mapped to the given name ornullif not presentgetAnalyzer(IndexAnalyzers.AnalyzerType type, String name) Returns an analyzer of the given type mapped to the given name, ornullif no such analyzer exists.default NamedAnalyzerReturns the default index analyzer for this indexdefault NamedAnalyzerReturns the default search analyzer for this index.default NamedAnalyzerReturns the default search quote analyzer for this index.default NamedAnalyzergetNormalizer(String name) Returns a normalizer mapped to the given name ornullif not presentdefault NamedAnalyzerReturns a normalizer that splits on whitespace mapped to the given name ornullif not presentstatic IndexAnalyzersof(Map<String, NamedAnalyzer> analyzers) static IndexAnalyzersof(Map<String, NamedAnalyzer> analyzers, Map<String, NamedAnalyzer> tokenizers) static IndexAnalyzersof(Map<String, NamedAnalyzer> analyzers, Map<String, NamedAnalyzer> normalizers, Map<String, NamedAnalyzer> whitespaceNormalizers) reload(AnalysisRegistry analysisRegistry, IndexSettings indexSettings, String resource, boolean preview) Reload any analyzers that have reloadable components
-
Method Details
-
getAnalyzer
Returns an analyzer of the given type mapped to the given name, ornullif no such analyzer exists. -
get
Returns an analyzer mapped to the given name ornullif not present -
getNormalizer
Returns a normalizer mapped to the given name ornullif not present -
getWhitespaceNormalizer
Returns a normalizer that splits on whitespace mapped to the given name ornullif 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. If not set, this will return the default search analyzer -
reload
default List<String> reload(AnalysisRegistry analysisRegistry, IndexSettings indexSettings, String resource, boolean preview) throws IOException Reload any analyzers that have reloadable components- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
of
-
of
-
of
static IndexAnalyzers of(Map<String, NamedAnalyzer> analyzers, Map<String, NamedAnalyzer> normalizers, Map<String, NamedAnalyzer> whitespaceNormalizers)
-