-
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.
Speed counting filters/range/date_histogram aggs (#81322)
Lucene has a `Weight#count` method which will return a count of matching documents if it can do so in constant time. We have similar code in the `filters` aggregator and it seems silly to maintain two copies of the same thing. Better yet, Lucene knows how to take the constant time count path in a few cases that aggs don't and we get to pick those up. Namely, we can now get a constant time count for `match_all` even when there are deleted documents or document level security. We can also go the constant time count path on cached queries now which is a lovel speed bump. Co-authored-by: Adrien Grand <jpountz@gmail.com> (seriously, he really rescued this thing)
- Loading branch information
Showing
13 changed files
with
259 additions
and
221 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 81322 | ||
summary: Speed counting filters/range/date_histogram aggs | ||
area: Aggregations | ||
type: enhancement | ||
issues: [] |
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
60 changes: 0 additions & 60 deletions
60
...java/org/elasticsearch/search/aggregations/bucket/filter/DocValuesFieldExistsAdapter.java
This file was deleted.
Oops, something went wrong.
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
44 changes: 0 additions & 44 deletions
44
...in/java/org/elasticsearch/search/aggregations/bucket/filter/TermQueryToFilterAdapter.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.