Class IdFieldMapper

All Implemented Interfaces:
Cloneable, Iterable<Mapper>, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment
Direct Known Subclasses:
ProvidedIdFieldMapper, TsidExtractingIdFieldMapper

public abstract class IdFieldMapper extends MetadataFieldMapper
A mapper for the _id field.
  • Field Details

  • Constructor Details

  • Method Details

    • contentType

      protected final String contentType()
      Specified by:
      contentType in class FieldMapper
    • documentDescription

      public abstract String documentDescription(DocumentParserContext context)
      Description of the document being parsed used in error messages. Not called unless there is an error.
    • documentDescription

      public abstract String documentDescription(ParsedDocument parsedDocument)
      Description of the document being indexed used after parsing for things like version conflicts.
    • standardIdField

      public static org.apache.lucene.document.Field standardIdField(String id)
      Create a Field to store the provided _id that "stores" the _id so it can be fetched easily from the index.