forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix hashCode values of aggregations' BytesValues.
This commit removes FilterBytesValues which is very trappy as the default implementation forwards all method calls to the delegate. So if you do any non-trivial modification to the terms or to the order of the terms, you need to remember to override currentValueHash, copyShared, and this is very error-prone. FieldDataSource.WithScript.BytesValues and ScriptBytesValues now return correct hash codes, future bugs here would be catched by the new assertion in SortedUniqueBytesValues. This bug was causing performance issues with scripts as all terms were assumed to have the same hash code. Close elastic#5004
- Loading branch information
Showing
3 changed files
with
11 additions
and
77 deletions.
There are no files selected for viewing
61 changes: 0 additions & 61 deletions
61
src/main/java/org/elasticsearch/index/fielddata/FilterBytesValues.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