Skip to content
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

Closed

Conversation

javanna
Copy link
Member

@javanna javanna commented Aug 2, 2018

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.

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.
@javanna javanna added >enhancement review :Search/Search Search-related issues that do not fall into other categories v7.0.0 v6.5.0 labels Aug 2, 2018
@elasticmachine
Copy link
Collaborator

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" : {
Copy link
Member Author

@javanna javanna Aug 2, 2018

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.

@javanna
Copy link
Member Author

javanna commented Aug 7, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants