Closed
Description
We need a new API that for a given flattened field lists field keys starting with a given string.
For example, the request below lists first 10 field keys for x_pack_telemetry
flattened field that start with "x_pack_telemetry.stack_stats".
GET my_index/_fields_enum
{
"field" : "x_pack_telemetry",
"string" : "x_pack_telemetry.stack_stats",
"size" : 10
}
Implementation-wise this could be either:
- similar to _terms_enum API.
- we would index all keys in the JSON object under a special subfield like _keys -- then a terms aggregation could be run on my_flat_object._keys to provide a list of available keys.