Expose group_shard_failures query_string parameter#32598
Expose group_shard_failures query_string parameter#32598javanna wants to merge 2 commits intoelastic:masterfrom
group_shard_failures query_string parameter#32598Conversation
The search, count, search_template, msearch and msearch_template API are supposed to support a query_string parameter at REST, called `group_shard_failures` that allows to disable grouping of shard failures that have the same reason (see RestActions#buildBroadcastShardsHeader). The parameter cannot be provided at REST though to date, hence it is not supported by any of the above API. This commit restores support for the parameter, adds it to the REST spec and add tests for it. It also introduces support for it to the Java high-level REST client.
|
Pinging @elastic/es-search-aggs |
| "description" : "A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.", | ||
| "default" : 128 | ||
| }, | ||
| "group_shard_failures" : { |
There was a problem hiding this comment.
with msearch and msearch_template, I had to go with exposing the param only globally. Given how it's read (through ToXContent.Params when outputting SearchResponse output, it becomes very complicated to support the option per item, and have each response item with its own value read from its own request item.
I also wonder if, in general, it is a good idea to expose this new parameter rather than removing support for it, given that it is not documented, we did not realize for a long time that it was not exposed, and we did not get any report about this either.
|
we discussed this and decided to try and remove the group_shard_failures parameter given that it has not been exposed for a long time, but try and introduce more info when grouping shard failures, to be able to know exactly which shards (and maybe nodes) the failure comes from. |
The search, count, search_template, msearch and msearch_template API are supposed to support a query_string parameter at REST, called
group_shard_failuresthat allows to disable grouping of shard failures that have the same reason (see RestActions#buildBroadcastShardsHeader). The parameter cannot be provided at REST though to date, hence it is not supported by any of the above API.This PR restores support for the parameter, adds it to the REST spec and add tests for it. It also introduces support for it to the Java high-level REST client.