- 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 void
close()
default NamedAnalyzer
Returns an analyzer mapped to the given name ornull
if not presentgetAnalyzer
(IndexAnalyzers.AnalyzerType type, String name) Returns an analyzer of the given type mapped to the given name, ornull
if no such analyzer exists.default NamedAnalyzer
Returns the default index analyzer for this indexdefault NamedAnalyzer
Returns the default search analyzer for this index.default NamedAnalyzer
Returns the default search quote analyzer for this index.default NamedAnalyzer
getNormalizer
(String name) Returns a normalizer mapped to the given name ornull
if not presentdefault NamedAnalyzer
Returns a normalizer that splits on whitespace mapped to the given name ornull
if not presentstatic IndexAnalyzers
of
(Map<String, NamedAnalyzer> analyzers) static IndexAnalyzers
of
(Map<String, NamedAnalyzer> analyzers, Map<String, NamedAnalyzer> tokenizers) static IndexAnalyzers
of
(Map<String, NamedAnalyzer> analyzers, Map<String, NamedAnalyzer> normalizers, Map<String, NamedAnalyzer> whitespaceNormalizers) reload
(AnalysisRegistry analysisRegistry, IndexSettings indexSettings) Reload any analyzers that have reloadable components
-
Method Details
-
getAnalyzer
Returns an analyzer of the given type mapped to the given name, ornull
if no such analyzer exists. -
get
Returns an analyzer mapped to the given name ornull
if not present -
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. If not set, this will return the default search analyzer -
reload
default List<String> reload(AnalysisRegistry analysisRegistry, IndexSettings indexSettings) throws IOException Reload any analyzers that have reloadable components- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
of
-
of
-
of
static IndexAnalyzers of(Map<String, NamedAnalyzer> analyzers, Map<String, NamedAnalyzer> normalizers, Map<String, NamedAnalyzer> whitespaceNormalizers)
-