-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use bit arrays for predicate matching in search. #8684
base: master
Are you sure you want to change the base?
Conversation
ServiceSearchQuery query, | ||
IndexedScore<String> packageScores, | ||
) { | ||
// TODO: implement pooling of this object similarly to [ScorePool]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to do this before landing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to do it in a subsequent PR, probably coupled with the other TODO.
(i) => now.difference(_documents[i].updated) > updatedDuration); | ||
} | ||
|
||
// TODO: find a better way to handle predicate-only filtering and scoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we open an issue for this?
@@ -48,6 +48,7 @@ dependencies: | |||
# pana version to be pinned | |||
pana: '0.22.20' | |||
# 3rd-party packages with pinned versions | |||
bit_array: 2.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonasfj are we ok with this dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the 80% of package:bit_array
is probably not needed for pub-dev
, and I have no issue with vendoring it.
Also: the package is using 32-bit ints for cross-compatibility in browsers, and it is possible we should benchmark using 64-bit ints for the server-only use case.
PackageScore
instance when theBitArray
would suffice.