-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make ConjunctionDISI package-private and add ConjunctionUtils factory class #148
Conversation
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.
LGTM. Let's add tests for the Spans fork of ConjunctionDISI?
+1 to this change -- looks great! But:
it looks like you didn't have to do this (fork / make a full copy of |
Unfortunately no, if we do this then Spans don't use two-phase iteration any more. What might work instead though would be to make |
We need to add three more methods to |
I've pushed the intervals change as well, turns out it's very simple and allows us to remove more duplication. |
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.
Looks great, thanks @romseygeek!
ConjunctionDISI is really an internal implementation of DocIdSetIterator,
and would ideally be package-private. However, it is used in a few
other places:
This commit refactors Spans to use their own copy of ConjunctionDISI,
and adds a public helper class ConjunctionUtils that allows easy
intersection of iterators for use by other modules. This means that
ConjunctionDISI itself can become package-private. It also removes
a reference to Spans from core classes, which will make it easier to
migrate Spans to the queries module.