Class DateFieldMapper

java.lang.Object
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<Mapper>, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public final class DateFieldMapper
extends FieldMapper
A FieldMapper for dates.
  • Field Details

  • Method Details

    • getMergeBuilder

      public FieldMapper.Builder getMergeBuilder()
      Description copied from class: FieldMapper
      Returns a FieldMapper.Builder to be used for merging and serialization Implement as follows: return new MyBuilder(simpleName()).init(this);
      Specified by:
      getMergeBuilder in class FieldMapper
    • fieldType

      public DateFieldMapper.DateFieldType fieldType()
      Overrides:
      fieldType in class FieldMapper
    • contentType

      protected java.lang.String contentType()
      Specified by:
      contentType in class FieldMapper
    • parseCreateField

      protected void parseCreateField​(ParseContext context) throws java.io.IOException
      Description copied from class: FieldMapper
      Parse the field value and populate the fields on ParseContext.doc(). Implementations of this method should ensure that on failing to parse parser.currentToken() must be the current failing token
      Specified by:
      parseCreateField in class FieldMapper
      Throws:
      java.io.IOException
    • indexScriptValues

      protected void indexScriptValues​(SearchLookup searchLookup, org.apache.lucene.index.LeafReaderContext readerContext, int doc, ParseContext parseContext)
      Description copied from class: FieldMapper
      Run the script associated with the field and index the values that it emits This method should only be called if FieldMapper.hasScript() has returned true
      Overrides:
      indexScriptValues in class FieldMapper
      Parameters:
      searchLookup - a SearchLookup to be passed the script
      readerContext - a LeafReaderContext exposing values from an incoming document
      doc - the id of the document to execute the script against
      parseContext - the ParseContext over the incoming document
    • getIgnoreMalformed

      public boolean getIgnoreMalformed()
    • getNullValue

      public java.lang.Long getNullValue()