Class IdFieldMapper

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

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

  • Constructor Details

  • Method Details

    • indexAnalyzers

      public Map<String,NamedAnalyzer> indexAnalyzers()
      Overrides:
      indexAnalyzers in class FieldMapper
    • 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.
    • reindexId

      public abstract String reindexId(String id)
      Build the _id to use on requests reindexing into indices using this _id.
    • 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.