Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 23, 2020

Backport of #53873

…stic#53873)

This commit changes the pre_filter_shard_size default from 128 to unspecified.
This allows to apply heuristics based on the request and the target indices when deciding
whether the can match phase should run or not. When unspecified, this pr runs the can match phase
automatically if one of these conditions is met:
  * The request targets more than 128 shards.
  * The request contains read-only indices.
  * The primary sort of the query targets an indexed field.
Users can opt-out from this behavior by setting the `pre_filter_shard_size` to a static value.

Closes elastic#39835
@jimczi jimczi added :Search/Search Search-related issues that do not fall into other categories backport labels Mar 23, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@jimczi jimczi merged commit 9e3f7f4 into elastic:7.x Mar 24, 2020
@jimczi jimczi deleted the pre_filter_shard_size_heuristic_backport branch March 24, 2020 01:05
jimczi added a commit to jimczi/elasticsearch that referenced this pull request Mar 24, 2020
This change re-enables bwc tests now that elastic#54007 is merged in 7x.
@jimczi jimczi mentioned this pull request Mar 24, 2020
jimczi added a commit that referenced this pull request Mar 24, 2020
This change re-enables bwc tests now that #54007 is merged in 7x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :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