-
Notifications
You must be signed in to change notification settings - Fork 1.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
Implement IntersectVisitor#visit(IntsRef) whenever it makes sense #14138
Conversation
This makes sense to me, if the This makes me wonder if we should instead introduce |
Thanks @jpountz. I added the method to the BulkAdder. The good thing is that for the buffer case we can use |
Unrelated test error:
|
I made BulkAdder sealed so we are sure they will always just two implementations. |
Actually we can make BulkAdder a sealed interface and the implementations are Java records. |
@jimczi This test is failing because we go through a slightly different code path on the first doc of a segment, which generates a slightly different exception message it seems. |
…4138) Implement IntersectVisitor#visit(IntsRef) in many of the current implementations and add BulkAdder#add(IntsRef) method. They should provide better performance due to less virtual method calls and more efficient bulk processing.
I opened a PR for the test failure: #14146 |
In #13149, the method Implement IntersectVisitor#visit(IntsRef) was introduced which is a nice. trick to avoid multiple virtual calls to IntersectVisitor#visit(int).
This was only implemented for PointRangeQuery but it is useful for all implementation that expects hitting that code path. Therefore in this PR we proposed to implement this method wherever it make sense.