@Component(value="search_AnyTermAnyFieldSearchStrategy") public class AnyTermAnyFieldSearchStrategy extends AbstractSearchStrategy
SearchStrategy that searches documents with at least one field matches at least one input term.| Constructor and Description |
|---|
AnyTermAnyFieldSearchStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureRequest(org.elasticsearch.action.search.SearchRequest searchRequest,
SearchContext searchContext)
Configures Elasticsearch
SearchRequest. |
java.lang.String |
getName()
Provides the name of this search strategy.
|
toStringpublic java.lang.String getName()
SearchStrategypublic void configureRequest(org.elasticsearch.action.search.SearchRequest searchRequest,
SearchContext searchContext)
SearchStrategySearchRequest.
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.
searchRequest - Elasticsearch SearchRequestsearchContext - SearchContext