Skip to content

Consider retry if fields emulation on CCS fails without available _source #78620

@cbuescher

Description

@cbuescher

We added an emulation layer to the "fields" option in #77749 that is able to translate search requests using the "fields" option for pre-7.10 nodes, e.g. in a mixed cluster or CCS use case.
The emulation works by trying to fetch fields requested through the fields API via source filtering. This, however, cannot work if "_source" is for some reason disabled in some of the targeted indices. In this case we currently fail the respective shard requests and deliver the error (an IAE) in the response alongside the succesful hits. Before introducing the bwc emulation layer, remote nodes simply ignored the "fields" option and returned hits without the "fields" section, but without erroring. On the other hand, before using the "field" option at all, clients like "discover" in Kibana relied on source filtering to retrieve document fields and thus had to expect errors when "_source" was disabled in some indices.
I'd like to open this issue to think about the possibility of introducing some retry logic in the fields emulation implementation. I'm not sure this is necessary and if it is feasible, but this can be part of the discussion here.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions