Skip to content

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Mar 30, 2022

The double script field uses hppc's LongSet to store the unique values
to be queried. However, this set should be relatively small. This commit
changes the internals of the runtime double script field to use Set.

relates #84735

The double script field uses hppc's LongSet to store the unique values
to be queried. However, this set should be relatively small. This commit
changes the internals of the runtime double script field to use Set.

relates elastic#84735
@rjernst rjernst added :Search/Search Search-related issues that do not fall into other categories >refactoring v8.2.0 labels Mar 30, 2022
@rjernst rjernst requested a review from nik9000 March 30, 2022 02:10
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Mar 30, 2022
@elasticmachine
Copy link
Collaborator

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

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Ryan!

int i = 0;
for (LongCursor lc : terms) {
result[i++] = Double.longBitsToDouble(lc.value);
for (long l : terms) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe replace this with stream/mapToDouble.

@rjernst rjernst merged commit 578f95e into elastic:master Apr 1, 2022
@rjernst rjernst deleted the hppc/double_scriptfield branch April 1, 2022 01:29
@rjernst rjernst mentioned this pull request Apr 1, 2022
43 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>refactoring :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants