Class IndexAnalysisElementsRegistry
java.lang.Object
io.jmix.search.index.mapping.analysis.impl.IndexAnalysisElementsRegistry
@Component("search_IndexAnalysisElementsRegistry")
public class IndexAnalysisElementsRegistry
extends Object
Contains configurations of all user-defined analysis elements.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
AnalysisElementConfiguration> protected final Map<String,
AnalysisElementConfiguration> protected final Map<String,
AnalysisElementConfiguration> protected final Map<String,
AnalysisElementConfiguration> protected final Map<String,
AnalysisElementConfiguration> -
Constructor Summary
ConstructorDescriptionIndexAnalysisElementsRegistry
(List<IndexAnalysisConfigurer> indexAnalysisConfigurers) -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,
AnalysisElementConfiguration> buildAnalysisElements
(List<? extends io.jmix.search.index.mapping.analysis.impl.AnalysisElementConfigurer> elementConfigurers, String duplicateNameErrorMessage) protected void
fillCustomCharFilters
(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) protected void
fillCustomTokenFilters
(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) protected void
fillCustomTokenizer
(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) getAnalyzer
(String name) getCharacterFilter
(String name) getNormalizer
(String name) getTokenFilter
(String name) getTokenizer
(String name) protected void
processCustomRootElementConfig
(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) protected Set<AnalysisElementConfiguration>
resolveAllUsedCustomElements
(AnalysisElementConfiguration rootElement) Resolves all user-defined analysis elements required for provided analyzer (including itself).Resolves all user-defined analysis elements required for provided normalizer (including itself).
-
Field Details
-
analyzers
-
normalizers
-
tokenizers
-
characterFilters
-
tokenFilters
-
-
Constructor Details
-
IndexAnalysisElementsRegistry
@Autowired public IndexAnalysisElementsRegistry(List<IndexAnalysisConfigurer> indexAnalysisConfigurers)
-
-
Method Details
-
getAnalyzer
-
getNormalizer
-
getTokenizer
-
getCharacterFilter
-
getTokenFilter
-
resolveAllUsedCustomElementsForAnalyzer
Resolves all user-defined analysis elements required for provided analyzer (including itself).- If name of modified analyzer is provided - result contains configuration of this analyzer only.
- If name of completely custom analyzer is provided - result contains configurations of this analyzer and user-defined tokenizer, character filters and token filters. Built-in analysis elements included into user-defined custom analyzer is not present in result.
- If name of built-in analyzer is provided - result is empty
- Parameters:
name
- name of analyzer- Returns:
- set of analysis element configurations
-
resolveAllUsedCustomElementsForNormalizer
Resolves all user-defined analysis elements required for provided normalizer (including itself).- If name of modified normalizer is provided - result contains configuration of this normalizer only.
- If name of completely custom normalizer is provided - result contains configurations of this normalizer and user-defined character filters and token filters. Built-in analysis elements included into user-defined custom normalizer is not present in result.
- If name of built-in normalizer is provided - result is empty
- Parameters:
name
- name of normalizer- Returns:
- set of analysis element configurations
-
resolveAllUsedCustomElements
protected Set<AnalysisElementConfiguration> resolveAllUsedCustomElements(AnalysisElementConfiguration rootElement) -
processCustomRootElementConfig
protected void processCustomRootElementConfig(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) -
fillCustomTokenizer
protected void fillCustomTokenizer(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) -
fillCustomCharFilters
protected void fillCustomCharFilters(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) -
fillCustomTokenFilters
protected void fillCustomTokenFilters(com.fasterxml.jackson.databind.node.ObjectNode config, Set<AnalysisElementConfiguration> result) -
buildAnalysisElements
protected Map<String,AnalysisElementConfiguration> buildAnalysisElements(List<? extends io.jmix.search.index.mapping.analysis.impl.AnalysisElementConfigurer> elementConfigurers, String duplicateNameErrorMessage)
-