Class FieldNamesFieldMapper.FieldNamesFieldType

Enclosing class:
FieldNamesFieldMapper

public static final class FieldNamesFieldMapper.FieldNamesFieldType
extends TermBasedFieldType
  • Constructor Details

    • FieldNamesFieldType

      public FieldNamesFieldType​(boolean enabled)
  • Method Details

    • typeName

      public java.lang.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
    • isEnabled

      public boolean isEnabled()
    • valueFetcher

      public ValueFetcher valueFetcher​(SearchExecutionContext context, java.lang.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
    • existsQuery

      public org.apache.lucene.search.Query existsQuery​(SearchExecutionContext context)
      Overrides:
      existsQuery in class MappedFieldType
    • termQuery

      public org.apache.lucene.search.Query termQuery​(java.lang.Object value, SearchExecutionContext context)
      Description copied from class: MappedFieldType
      Generates a query that will only match documents that contain the given value. The default implementation returns a TermQuery over the value bytes, boosted by MappedFieldType.boost().
      Overrides:
      termQuery in class TermBasedFieldType