Class AllTermsSingleFieldSearchStrategy

java.lang.Object
io.jmix.search.searching.impl.AbstractSearchStrategy
io.jmix.search.searching.impl.AllTermsSingleFieldSearchStrategy
All Implemented Interfaces:
SearchStrategy

@Component("search_AllTermsSingleFieldSearchStrategy") public class AllTermsSingleFieldSearchStrategy extends AbstractSearchStrategy
Describes SearchStrategy that searches documents with at least one field matches all input terms in any order. Fields with partial match a not suitable.
  • Constructor Details

    • AllTermsSingleFieldSearchStrategy

      public AllTermsSingleFieldSearchStrategy()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: SearchStrategy
      Provides the name of this search strategy. Name should be unique among all search strategies in application.
      Returns:
      name
    • configureRequest

      public void configureRequest(org.elasticsearch.action.search.SearchRequest searchRequest, SearchContext searchContext)
      Description copied from interface: SearchStrategy
      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. Custom highlighting can be configured here. If it wasn't - the default one will be used.

      Size and offset shouldn't be configured here - these parameters will be overwritten.

      Parameters:
      searchRequest - Elasticsearch SearchRequest
      searchContext - SearchContext