Class StartsWithOpenSearchSearchStrategy
java.lang.Object
io.jmix.search.searching.impl.AbstractSearchStrategy<org.opensearch.client.opensearch.core.SearchRequest.Builder,OpenSearchQueryConfigurer>
io.jmix.searchopensearch.searching.strategy.impl.AbstractOpenSearchStrategy
io.jmix.searchopensearch.searching.strategy.impl.StartsWithOpenSearchSearchStrategy
- All Implemented Interfaces:
SearchStrategy<org.opensearch.client.opensearch.core.SearchRequest.Builder>,OpenSearchSearchStrategy
@Component("search_StartsWithOpenSearchSearchStrategy")
public class StartsWithOpenSearchSearchStrategy
extends AbstractOpenSearchStrategy
Class that encapsulates logic of
SearchStrategy that searches documents by prefix.-
Field Summary
FieldsFields inherited from class io.jmix.search.searching.impl.AbstractSearchStrategy
queryConfigurator -
Constructor Summary
ConstructorsConstructorDescriptionStartsWithOpenSearchSearchStrategy(OpenSearchQueryConfigurer queryConfigurator, SearchProperties searchProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureRequest(SearchRequestContext<org.opensearch.client.opensearch.core.SearchRequest.Builder> requestContext) protected voidconfigureTermsQuery(SearchRequestContext<org.opensearch.client.opensearch.core.SearchRequest.Builder> requestContext) protected voidconfigureWildcardQuery(SearchRequestContext<org.opensearch.client.opensearch.core.SearchRequest.Builder> requestContext) getName()Provides the name of this search strategy.protected booleanisSearchTermExceedMaxPrefixSize(String searchText, int maxPrefixSize) Methods inherited from class io.jmix.searchopensearch.searching.strategy.impl.AbstractOpenSearchStrategy
configureRequestMethods inherited from class io.jmix.search.searching.impl.AbstractSearchStrategy
toString
-
Field Details
-
searchProperties
-
-
Constructor Details
-
StartsWithOpenSearchSearchStrategy
public StartsWithOpenSearchSearchStrategy(OpenSearchQueryConfigurer queryConfigurator, SearchProperties searchProperties)
-
-
Method Details
-
getName
Description copied from interface:SearchStrategyProvides the name of this search strategy. Name should be unique among all search strategies in application.- Returns:
- name
-
configureRequest
public void configureRequest(SearchRequestContext<org.opensearch.client.opensearch.core.SearchRequest.Builder> requestContext) -
configureTermsQuery
protected void configureTermsQuery(SearchRequestContext<org.opensearch.client.opensearch.core.SearchRequest.Builder> requestContext) -
configureWildcardQuery
protected void configureWildcardQuery(SearchRequestContext<org.opensearch.client.opensearch.core.SearchRequest.Builder> requestContext) -
isSearchTermExceedMaxPrefixSize
-