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 Type
    Method
    Description
    static 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

      public static <,​> resolveMappingFields(SearchExecutionContext context, <,​> fieldsAndWeights)
    • 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