Package org.elasticsearch.index.search
Class QueryParserHelper
org.elasticsearch.index.search.QueryParserHelper
public final class QueryParserHelper
extends
Helpers to extract and expand field names and boosts
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
<> fields)
Returns true if any of the fields is the wildcard*
, false otherwise.static <,>
<> fields)
Convert a list of field names encoded with optional boosts to a map that associates the field name and its boost.static <,>
resolveMappingFields(SearchExecutionContext context, <,> fieldsAndWeights)
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Method Details
-
parseFieldsAndWeights
public static <,> parseFieldsAndWeights(<> fields)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
public static boolean hasAllFieldsWildcard(<> fields)Returns true if any of the fields is the wildcard*
, false otherwise.- Parameters:
fields
- A collection of field names
-