Class IgnoreMalformedStoredValues

java.lang.Object
org.elasticsearch.index.mapper.IgnoreMalformedStoredValues

public abstract class IgnoreMalformedStoredValues extends Object
Saves malformed values to stored fields so they can be loaded for synthetic _source.
  • Constructor Details

    • IgnoreMalformedStoredValues

      public IgnoreMalformedStoredValues()
  • Method Details

    • storedField

      public static org.apache.lucene.document.StoredField storedField(String name, XContentParser parser) throws IOException
      Creates a stored field that stores malformed data to be used in synthetic source. Name of the stored field is original name of the field with added conventional suffix.
      Parameters:
      name - original name of the field
      parser - parser to grab field content from
      Returns:
      Throws:
      IOException
    • storedField

      public static org.apache.lucene.document.StoredField storedField(String name, XContentBuilder builder) throws IOException
      Creates a stored field that stores malformed data to be used in synthetic source. Name of the stored field is original name of the field with added conventional suffix.
      Parameters:
      name - original name of the field
      builder - malformed data
      Returns:
      Throws:
      IOException
    • empty

      public static IgnoreMalformedStoredValues empty()
      Build a IgnoreMalformedStoredValues that never contains any values.
    • stored

      public static IgnoreMalformedStoredValues stored(String fieldName)
      Build a IgnoreMalformedStoredValues that loads from stored fields.
    • storedFieldLoaders

      A Stream mapping stored field paths to a place to put them so they can be included in the next document.
    • count

      public abstract int count()
      How many values has this field loaded for this document?
    • write

      public abstract void write(XContentBuilder b) throws IOException
      Write values for this document.
      Throws:
      IOException
    • reset

      public abstract void reset()
      Remove stored values for this document and return to clean state to process next document.
    • name

      public static String name(String fieldName)