[Enhancement] Enable Partial Flat_object Field Type #7136
Labels
enhancement
Enhancement or improvement to existing feature or request
Search
Search query, autocomplete ...etc
v2.9.0
'Issues and PRs related to version v2.9.0'
Is your feature request related to a problem? Please describe.
Currently, Only root fields of a json object can be defined as a flat object. You cannot define an object that is part of another JSON object as a flat object because when a flat object it is parses to a string, the nested architecture of the leaves is lost.
Describe the solution you'd like
in flat_object, there are no subfields in mapping, but when querying, flat_object field mapper dynamically create a new flat_object field type for the subfields, if they are not existed in then mappings, then when the query finished, the flat_object field type will be pop out of stack. It does not add to mappings.
The idea solution is to make the dynamically flat_object type to remember the path before it gets partially flatten.
For example, for a
sample
issue document:Currently, we need to define the mapping from the root of JSON,
In the enhancement, we can define part of the JSON to be other field type, such as double and keyword
ideal use case 1:
issue.number
to be keyword type, whileissue.labels
is a flat_object type.ideal use case 2:
issue.number
to be double type, whileissue.labels
is a flat_object type. Users can do aggregation the documents onissue.number
. This can resolve the concerns that flat_object can not support numerical parsing operations, then the users can define part of the json to be type specific field type when aggregation, sorting are needed.The text was updated successfully, but these errors were encountered: