-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose group_shard_failures
query_string parameter
#32598
Expose group_shard_failures
query_string parameter
#32598
Conversation
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 |
@@ -33,6 +33,10 @@ | |||
"type" : "number", | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_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 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.