Class AllTermsAnyFieldOpenSearchSearchStrategy
java.lang.Object
io.jmix.search.searching.impl.AbstractSearchStrategy
io.jmix.searchopensearch.searching.strategy.impl.AllTermsAnyFieldOpenSearchSearchStrategy
- All Implemented Interfaces:
SearchStrategy,OpenSearchSearchStrategy
@Component("search_AllTermsAnyFieldOpenSearchSearchStrategy")
public class AllTermsAnyFieldOpenSearchSearchStrategy
extends AbstractSearchStrategy
implements OpenSearchSearchStrategy
Describes
SearchStrategy that searches documents with fields match all input terms in any order.
Different terms can be present in different fields.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureRequest(org.opensearch.client.opensearch.core.SearchRequest.Builder requestBuilder, SearchContext searchContext) Configures OpenSearchSearchRequest.getName()Provides the name of this search strategy.Methods inherited from class io.jmix.search.searching.impl.AbstractSearchStrategy
toString
-
Constructor Details
-
AllTermsAnyFieldOpenSearchSearchStrategy
public AllTermsAnyFieldOpenSearchSearchStrategy()
-
-
Method Details
-
getName
Description copied from interface:SearchStrategyProvides the name of this search strategy. Name should be unique among all search strategies in application.- Specified by:
getNamein interfaceSearchStrategy- Returns:
- name
-
configureRequest
public void configureRequest(org.opensearch.client.opensearch.core.SearchRequest.Builder requestBuilder, SearchContext searchContext) Description copied from interface:OpenSearchSearchStrategyConfigures OpenSearchSearchRequest.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.
- Specified by:
configureRequestin interfaceOpenSearchSearchStrategy- Parameters:
requestBuilder- allows to configure search requestsearchContext- contains details about search being performed
-