Package io.jmix.search.searching.impl
Class PhraseSearchStrategy
java.lang.Object
io.jmix.search.searching.impl.AbstractSearchStrategy
io.jmix.search.searching.impl.PhraseSearchStrategy
- All Implemented Interfaces:
- SearchStrategy
@Component("search_PhraseSearchStrategy")
public class PhraseSearchStrategy
extends AbstractSearchStrategy
Describes 
SearchStrategy that searches documents with at least one field matches entire phrase - all input terms in provided order.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidconfigureRequest(org.elasticsearch.action.search.SearchRequest searchRequest, SearchContext searchContext) Configures ElasticsearchSearchRequest.getName()Provides the name of this search strategy.Methods inherited from class io.jmix.search.searching.impl.AbstractSearchStrategytoString
- 
Constructor Details- 
PhraseSearchStrategypublic PhraseSearchStrategy()
 
- 
- 
Method Details- 
getNameDescription copied from interface:SearchStrategyProvides the name of this search strategy. Name should be unique among all search strategies in application.- Returns:
- name
 
- 
configureRequestpublic void configureRequest(org.elasticsearch.action.search.SearchRequest searchRequest, SearchContext searchContext) Description copied from interface:SearchStrategyConfigures ElasticsearchSearchRequest.The main step - create appropriate query based on provided SearchContextand 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
 
 
-