Package org.elasticsearch.index.search
Class QueryParserHelper
java.lang.Object
org.elasticsearch.index.search.QueryParserHelper
Helpers to extract and expand field names and boosts
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasAllFieldsWildcard
(Collection<String> fields) Returns true if any of the fields is the wildcard*
, false otherwise.parseFieldsAndWeights
(List<String> fields) Convert a list of field names encoded with optional boosts to a map that associates the field name and its boost.resolveMappingFields
(SearchExecutionContext context, Map<String, Float> fieldsAndWeights)
-
Method Details
-
parseFieldsAndWeights
Convert a list of field names encoded with optional boosts to a map that associates the field name and its boost.- Parameters:
fields
- The list of fields encoded with optional boosts (e.g. ^0.35).- Returns:
- The converted map with field names and associated boosts.
-
resolveMappingFields
-
hasAllFieldsWildcard
Returns true if any of the fields is the wildcard*
, false otherwise.- Parameters:
fields
- A collection of field names
-