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 Type
    Method
    Description
    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.
    default void
    configureRequest(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. Use configureRequest(SearchRequestContext)
      Configures Elasticsearch SearchRequest.

      The main step - create appropriate query based on provided SearchContext and 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 configuring
      searchContext - contains details about search being performed
    • configureRequest

      default void configureRequest(SearchRequestContext<co.elastic.clients.elasticsearch.core.SearchRequest.Builder> requestContext)
      Description copied from interface: SearchStrategy
      Configures the provided search request context based on the current search strategy.
      Specified by:
      configureRequest in interface SearchStrategy<co.elastic.clients.elasticsearch.core.SearchRequest.Builder>
      Parameters:
      requestContext - the SearchRequestContext to configure, which provides the necessary metadata and state of the search preparation process. The type parameter T represents the platform-specific request builder associated with the context.