Interface ElasticsearchSearchStrategy
- All Superinterfaces:
SearchStrategy<co.elastic.clients.elasticsearch.core.SearchRequest.Builder>
- All Known Implementing Classes:
AbstractElasticSearchStrategy,AllTermsAnyFieldElasticsearchSearchStrategy,AllTermsSingleFieldElasticsearchSearchStrategy,AnyTermAnyFieldElasticsearchSearchStrategy,PhraseElasticsearchSearchStrategy,StartsWithElasticsearchSearchStrategy
public interface ElasticsearchSearchStrategy
extends SearchStrategy<co.elastic.clients.elasticsearch.core.SearchRequest.Builder>
Represents a search strategy specifically designed for Elasticsearch integration.
An implementation of this interface configures an Elasticsearch
SearchRequest
based on the provided search context.-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureRequest(co.elastic.clients.elasticsearch.core.SearchRequest.Builder requestBuilder, SearchContext searchContext) Deprecated, for removal: This API element is subject to removal in a future version.Because the new method with a more flexible signature is created.default voidconfigureRequest(SearchRequestContext<co.elastic.clients.elasticsearch.core.SearchRequest.Builder> requestContext) Configures the provided search request context based on the current search strategy.Methods inherited from interface io.jmix.search.searching.SearchStrategy
getName
-
Method Details
-
configureRequest
@Deprecated(since="2.7", forRemoval=true) void configureRequest(co.elastic.clients.elasticsearch.core.SearchRequest.Builder requestBuilder, SearchContext searchContext) Deprecated, for removal: This API element is subject to removal in a future version.Because the new method with a more flexible signature is created. UseconfigureRequest(SearchRequestContext)Configures ElasticsearchSearchRequest.The main step - create appropriate query based on provided
SearchContextand set it to request.Configuration of another request parameters is optional.
Highlighting, size and offset shouldn't be configured here - these parameters will be overwritten.
- Parameters:
requestBuilder- allows search request configuringsearchContext- contains details about search being performed
-
configureRequest
default void configureRequest(SearchRequestContext<co.elastic.clients.elasticsearch.core.SearchRequest.Builder> requestContext) Description copied from interface:SearchStrategyConfigures the provided search request context based on the current search strategy.- Specified by:
configureRequestin interfaceSearchStrategy<co.elastic.clients.elasticsearch.core.SearchRequest.Builder>- Parameters:
requestContext- theSearchRequestContextto configure, which provides the necessary metadata and state of the search preparation process. The type parameterTrepresents the platform-specific request builder associated with the context.
-