Class AbstractSearchQueryConfigurer<RB,QB,OB>

java.lang.Object
io.jmix.search.searching.AbstractSearchQueryConfigurer<RB,QB,OB>
Type Parameters:
RB - platform-specific SearchRequestBuilder type
QB - platform-specific QueryBuilder type
OB - platform-specific ObjectBuilder type
All Implemented Interfaces:
SearchQueryConfigurer<RB,QB,OB>
Direct Known Subclasses:
ElasticSearchQueryConfigurer, OpenSearchQueryConfigurer

public abstract class AbstractSearchQueryConfigurer<RB,QB,OB> extends Object implements SearchQueryConfigurer<RB,QB,OB>
Implements common logic for all platform-specific implementations. Contains "out of the box" SubfieldsProvider-s for the typical cases.
  • Field Details

  • Constructor Details

  • Method Details

    • configureRequest

      public void configureRequest(SearchRequestContext<RB> requestContext, SearchQueryConfigurer.BusinessQueryConfigurer<QB,OB> businessQueryConfigurer)
      Description copied from interface: SearchQueryConfigurer
      Configures a search request using the provided request context and query configuration logic.
      Specified by:
      configureRequest in interface SearchQueryConfigurer<RB,QB,OB>
      Parameters:
      requestContext - the context containing request building information, including the request builder and processing state management
      businessQueryConfigurer - an interface for building and applying business-specific query configurations to a single index
    • configureRequest

      public void configureRequest(SearchRequestContext<RB> requestContext, VirtualSubfieldsProvider virtualSubfieldsProvider, SearchQueryConfigurer.BusinessQueryConfigurer<QB,OB> businessQueryConfigurer)
      Description copied from interface: SearchQueryConfigurer
      Configures request for the data querying from the search server. Provides an ability to add subfields to the query.
      Specified by:
      configureRequest in interface SearchQueryConfigurer<RB,QB,OB>
      Parameters:
      requestContext - request context for the request building.
      virtualSubfieldsProvider - provider that provides additional subfields by the VirtualSubfieldsProvider.FieldInfo
      businessQueryConfigurer - an interface for building and applying business-specific query configurations to a single index
    • setQueryToRequestBuilder

      protected abstract void setQueryToRequestBuilder(SearchRequestContext<RB> requestContext, SearchQueryConfigurer.BusinessQueryConfigurer<QB,OB> businessQueryConfigurer, List<IndexSearchRequestScope> indexSearchRequestScopes)
      Configures the search query in the provided request builder by applying business-specific configurations and setting up the query parameters within the specified search request scopes.
      Parameters:
      requestContext - context of the search request, providing the request builder and related information
      businessQueryConfigurer - business-specific query configuration logic to apply to the query builder
      indexSearchRequestScopes - list of search request scopes that define the boundaries of the search query
    • createQuery

      protected OB createQuery(SearchQueryConfigurer.BusinessQueryConfigurer<QB,OB> businessQueryConfigurer, List<IndexSearchRequestScope> indexSearchRequestScopes)
      Creates a query object based on the provided query configuration and the given index search request scopes.
      Parameters:
      businessQueryConfigurer - business-specific query configuration logic to apply to the query builder
      indexSearchRequestScopes - list of index search request scopes defining the boundaries of the query
      Returns:
      configured query object for single or multiple index search request scopes
    • createQueryForSingleIndex

      protected abstract OB createQueryForSingleIndex(SearchQueryConfigurer.BusinessQueryConfigurer<QB,OB> businessQueryConfigurer, IndexSearchRequestScope indexSearchRequestScope)
      Creates a query object for a single index based on the provided query configuration and the given index search request scope.
      Parameters:
      businessQueryConfigurer - the business-specific query configuration logic to apply to the query builder
      indexSearchRequestScope - the index search request scope defining the boundaries of the query
      Returns:
      configured query object for the specified single index search request scope
    • createQueryForMultipleIndexes

      protected abstract OB createQueryForMultipleIndexes(SearchQueryConfigurer.BusinessQueryConfigurer<QB,OB> businessQueryConfigurer, List<IndexSearchRequestScope> indexSearchRequestScopes)
      Creates a query object for multiple indexes based on the provided query configuration and the list of index search request scopes.
      Parameters:
      businessQueryConfigurer - the business-specific query configuration logic to apply to the query builder
      indexSearchRequestScopes - the list of index search request scopes defining the boundaries of the query
      Returns:
      configured query object for the specified multiple index search request scopes