Class TsidExtractingIdFieldMapper

All Implemented Interfaces:
Iterable<Mapper>, ToXContent, ToXContentFragment

public class TsidExtractingIdFieldMapper extends IdFieldMapper
A mapper for the _id field that builds the _id from the _tsid and @timestamp.
  • Field Details

  • Method Details

    • createField

      public static org.apache.lucene.util.BytesRef createField(DocumentParserContext context, RoutingHashBuilder routingBuilder, org.apache.lucene.util.BytesRef tsid)
    • createId

      public static String createId(int routingHash, org.apache.lucene.util.BytesRef tsid, long timestamp)
    • extractTimestampFromId

      public static long extractTimestampFromId(byte[] id)
    • createId

      public static String createId(boolean dynamicMappersExists, RoutingHashBuilder routingBuilder, org.apache.lucene.util.BytesRef tsid, long timestamp, byte[] suffix)
    • createSyntheticIdBytesRef

      public static org.apache.lucene.util.BytesRef createSyntheticIdBytesRef(org.apache.lucene.util.BytesRef tsid, long timestamp, int routingHash)
    • createSyntheticId

      public static String createSyntheticId(org.apache.lucene.util.BytesRef tsid, long timestamp, int routingHash)
    • extractTimeSeriesIdFromSyntheticId

      public static org.apache.lucene.util.BytesRef extractTimeSeriesIdFromSyntheticId(org.apache.lucene.util.BytesRef id)
    • extractTimestampFromSyntheticId

      public static long extractTimestampFromSyntheticId(org.apache.lucene.util.BytesRef id)
    • extractRoutingHashFromSyntheticId

      public static int extractRoutingHashFromSyntheticId(org.apache.lucene.util.BytesRef id)
    • extractRoutingHashBytesFromSyntheticId

      public static org.apache.lucene.util.BytesRef extractRoutingHashBytesFromSyntheticId(org.apache.lucene.util.BytesRef id)
    • documentDescription

      public String documentDescription(DocumentParserContext context)
      Description copied from class: IdFieldMapper
      Description of the document being parsed used in error messages. Not called unless there is an error.
      Specified by:
      documentDescription in class IdFieldMapper
    • documentDescription

      public String documentDescription(ParsedDocument parsedDocument)
      Description copied from class: IdFieldMapper
      Description of the document being indexed used after parsing for things like version conflicts.
      Specified by:
      documentDescription in class IdFieldMapper
    • reindexId

      public String reindexId(String id)
      Description copied from class: IdFieldMapper
      Build the _id to use on requests reindexing into indices using this _id.
      Specified by:
      reindexId in class IdFieldMapper