Module org.elasticsearch.server
Class FlattenedFieldSyntheticWriterHelper
java.lang.Object
org.elasticsearch.index.mapper.flattened.FlattenedFieldSyntheticWriterHelper
A helper class that reconstructs the field including keys and values
mapped by
FlattenedFieldMapper
. It looks at key/value pairs,
parses them and uses the XContentBuilder
to reconstruct the
original object.
Example: given the following set of sorted key value pairs read from
doc values:
"id": "AAAb12"
"package.id": "102938"
"root.asset_code": "abc"
"root.from": "New York"
"root.object.value": "10"
"root.object.items": "102202929"
"root.object.items": "290092911"
"root.to": "Atlanta"
it turns them into the corresponding object using XContentBuilder
.
If, for instance JSON is used, it generates the following after deserialization:
`{
"id": "AAAb12",
"package": {
"id": "102938"
},
"root": {
"asset_code": "abc",
"from": "New York",
"object": {
"items": ["102202929", "290092911"],
},
"to": "Atlanta"
}
}`-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
-
Constructor Summary
ConstructorsConstructorDescriptionFlattenedFieldSyntheticWriterHelper
(FlattenedFieldSyntheticWriterHelper.SortedKeyedValues sortedKeyedValues) -
Method Summary
-
Constructor Details
-
FlattenedFieldSyntheticWriterHelper
public FlattenedFieldSyntheticWriterHelper(FlattenedFieldSyntheticWriterHelper.SortedKeyedValues sortedKeyedValues)
-
-
Method Details
-
write
- Throws:
IOException
-