Skip to content

Field key suggester API for flattened field #73968

Closed
@mayya-sharipova

Description

@mayya-sharipova

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories>enhancementTeam:SearchMeta label for search team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions