Class CompletionFieldMapper.CompletionFieldType

Enclosing class:

public static final class CompletionFieldMapper.CompletionFieldType extends TermBasedFieldType
  • Constructor Details

  • Method Details

    • setContextMappings

      public void setContextMappings(ContextMappings contextMappings)
    • hasContextMappings

      public boolean hasContextMappings()
      true if there are one or more context mappings defined for this field type
    • getContextMappings

      public ContextMappings getContextMappings()
      associated context mappings for this field type
    • prefixQuery

      public prefixQuery(Object value)
      Completion prefix query
    • regexpQuery

      public regexpQuery(Object value, int flags, int maxDeterminizedStates)
      Completion prefix regular expression query
    • fuzzyQuery

      public fuzzyQuery(String value, Fuzziness fuzziness, int nonFuzzyPrefixLength, int minFuzzyPrefixLength, int maxExpansions, boolean transpositions, boolean unicodeAware)
      Completion prefix fuzzy query
    • typeName

      public String typeName()
      Description copied from class: MappedFieldType
      Returns the name of this type, as would be specified in mapping properties
      Specified by:
      typeName in class MappedFieldType
    • valueFetcher

      public ValueFetcher valueFetcher(SearchExecutionContext context, String format)
      Description copied from class: MappedFieldType
      Create a helper class to fetch field values during the FetchFieldsPhase.

      New field types must implement this method in order to support the search 'fields' option. Except for metadata fields, field types should not throw UnsupportedOperationException since this could cause a search retrieving multiple fields (like "fields": ["*"]) to fail.

      Specified by:
      valueFetcher in class MappedFieldType