-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip range optimization if it'd be slower (#65097)
Don't run the `date_histogram` and `range` aggregations as a `filters` aggregation if the cost of the filters is high. This should prevent the optimization from de-optimizing when it bumps into runtime fields which don't have index structures to speed their queries. For runtime fields we're better off running `date_histogram` and `range` using the native `range` aggregator. We detect this situation using `cost` on the `BulkScorer` from the queries to keep the change general. So it'll detect other sorts of queries that might be a poor choice for optimization.
- Loading branch information
Showing
6 changed files
with
230 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.