java.lang.Object
org.elasticsearch.index.mapper.FieldArrayContext
- Direct Known Subclasses:
FlattenedFieldArrayContext
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected final Map<String, FieldArrayContext.Offsets> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToLuceneDocument(DocumentParserContext context) protected static org.apache.lucene.util.BytesRefEncodes per-array offsets (in document parsing order) recording which distinct value occupies each slot in a recorded array.static StringgetOffsetsFieldName(MapperBuilderContext context, Mapper.SourceKeepMode indexSourceKeepMode, boolean hasDocValues, boolean isStored, FieldMapper.Builder fieldMapperBuilder, IndexVersion indexCreatedVersion, IndexVersion minSupportedVersionMain) static int[]voidrecordNull(String field) voidrecordOffset(String field, Comparable<?> value)
-
Field Details
-
OFFSETS_FIELD_NAME_SUFFIX
- See Also:
-
offsetsPerField
-
-
Constructor Details
-
FieldArrayContext
public FieldArrayContext()
-
-
Method Details
-
recordOffset
-
recordNull
-
addToLuceneDocument
- Throws:
IOException
-
encodeOffsetArray
protected static org.apache.lucene.util.BytesRef encodeOffsetArray(FieldArrayContext.Offsets offset) throws IOException Encodes per-array offsets (in document parsing order) recording which distinct value occupies each slot in a recorded array.The array takes the form
[slot count][ordinal 0][ordinal 1]..., whereslot countis the number of leaf positions (one per indexed array element, includingnulls) and each following ordinal is either a non-negative index into the per-document sorted set of array values, or-1when that slot isnull. Decoding usesparseOffsetArray(org.elasticsearch.common.io.stream.StreamInput).- Throws:
IOException
-
parseOffsetArray
- Throws:
IOException
-
getOffsetsFieldName
public static String getOffsetsFieldName(MapperBuilderContext context, Mapper.SourceKeepMode indexSourceKeepMode, boolean hasDocValues, boolean isStored, FieldMapper.Builder fieldMapperBuilder, IndexVersion indexCreatedVersion, IndexVersion minSupportedVersionMain)
-