Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class IgnoreMalformedStoredValues
java.lang.Object
org.elasticsearch.index.mapper.IgnoreMalformedStoredValues
Saves malformed values to stored fields so they can be loaded for synthetic
_source
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
count()
How many values has this field loaded for this document?static IgnoreMalformedStoredValues
empty()
Build aIgnoreMalformedStoredValues
that never contains any values.static IgnoreMalformedStoredValues
Build aIgnoreMalformedStoredValues
that loads from stored fields.static org.apache.lucene.document.StoredField
storedField
(String fieldName, XContentParser parser) Build aStoredField
for the value on which the parser is currently positioned.AStream
mapping stored field paths to a place to put them so they can be included in the next document.abstract void
Write values for this document.
-
Constructor Details
-
IgnoreMalformedStoredValues
public IgnoreMalformedStoredValues()
-
-
Method Details
-
storedField
public static org.apache.lucene.document.StoredField storedField(String fieldName, XContentParser parser) throws IOException Build aStoredField
for the value on which the parser is currently positioned.We try to use
StoredField
's native types for fields where possible but we have to preserve more type information than stored fields support, so we encode all of those into stored fields'byte[]
type and then encode type information in the first byte.- Throws:
IOException
-
empty
Build aIgnoreMalformedStoredValues
that never contains any values. -
stored
Build aIgnoreMalformedStoredValues
that loads from stored fields. -
storedFieldLoaders
public abstract Stream<Map.Entry<String,SourceLoader.SyntheticFieldLoader.StoredFieldLoader>> storedFieldLoaders()AStream
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
Write values for this document.- Throws:
IOException
-