Class CompletionFieldMapper.CompletionFieldType

Enclosing class:
CompletionFieldMapper

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

  • Method Details

    • setContextMappings

      public void setContextMappings(ContextMappings contextMappings)
    • hasContextMappings

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

      public ContextMappings getContextMappings()
      Returns:
      associated context mappings for this field type
    • postingsFormat

      public static org.apache.lucene.codecs.PostingsFormat postingsFormat()
      Returns:
      postings format to use for this field-type
    • prefixQuery

      public org.apache.lucene.search.suggest.document.CompletionQuery prefixQuery(Object value)
      Completion prefix query
    • regexpQuery

      public org.apache.lucene.search.suggest.document.CompletionQuery regexpQuery(Object value, int flags, int maxDeterminizedStates)
      Completion prefix regular expression query
    • fuzzyQuery

      public org.apache.lucene.search.suggest.document.CompletionQuery 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