Class OpenSearchSearchStrategyProvider
java.lang.Object
io.jmix.searchopensearch.searching.strategy.OpenSearchSearchStrategyProvider
- All Implemented Interfaces:
SearchStrategyProvider<OpenSearchSearchStrategy>
public class OpenSearchSearchStrategyProvider
extends Object
implements SearchStrategyProvider<OpenSearchSearchStrategy>
Provides OpenSearch search strategies
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final IndexConfigurationManager
protected final Map<String,
OpenSearchSearchStrategy> -
Constructor Summary
ConstructorDescriptionOpenSearchSearchStrategyProvider
(IndexConfigurationManager indexConfigurationManager, Collection<OpenSearchSearchStrategy> searchStrategies, SearchProperties applicationProperties) -
Method Summary
Modifier and TypeMethodDescriptionfindSearchStrategyByName
(String strategyName) Returns aOpenSearchSearchStrategy
by provided name.Returns all registered search strategies.Gets default search strategy.getSearchStrategyByName
(String strategyName) GetsOpenSearchSearchStrategy
by provided name.protected boolean
isSupported
(OpenSearchSearchStrategy searchStrategy)
-
Field Details
-
indexConfigurationManager
-
registry
-
defaultStrategyName
-
-
Constructor Details
-
OpenSearchSearchStrategyProvider
public OpenSearchSearchStrategyProvider(IndexConfigurationManager indexConfigurationManager, Collection<OpenSearchSearchStrategy> searchStrategies, SearchProperties applicationProperties)
-
-
Method Details
-
getSearchStrategyByName
GetsOpenSearchSearchStrategy
by provided name. Throws exception if there is no strategy with such name.- Specified by:
getSearchStrategyByName
in interfaceSearchStrategyProvider<OpenSearchSearchStrategy>
- Parameters:
strategyName
- strategy name- Returns:
OpenSearchSearchStrategy
- Throws:
IllegalStateException
- if strategy with provided name not found
-
getDefaultSearchStrategy
Gets default search strategy.- Specified by:
getDefaultSearchStrategy
in interfaceSearchStrategyProvider<OpenSearchSearchStrategy>
- Returns:
OpenSearchSearchStrategy
-
getAllSearchStrategies
Returns all registered search strategies.- Specified by:
getAllSearchStrategies
in interfaceSearchStrategyProvider<OpenSearchSearchStrategy>
- Returns:
- all
OpenSearchSearchStrategy
-
findSearchStrategyByName
Returns aOpenSearchSearchStrategy
by provided name. Returns null if there is no strategy with such name.- Specified by:
findSearchStrategyByName
in interfaceSearchStrategyProvider<OpenSearchSearchStrategy>
- Parameters:
strategyName
- strategy name- Returns:
OpenSearchSearchStrategy
or null if no strategy was found
-
isSupported
-