Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
9.0
-
None
-
None
-
New
Description
ConjunctionUtils provides nice support for wrapping a list of DISIs or Scorers into one DISI for easy conjunctive iteration, but intersecting DISIs/Scorers with LongValues or DoubleValues remains more burdensome. We have this pattern in a few different places (particularly in faceting code, but I suspect it exists elsewhere as well):
LongValues fv = [...]; DocIdSetIterator docs = [...]; for (int doc = docs.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; ) { if (fv.advanceExact(doc)) { // do something } doc = docs.nextDoc(); }
It would be nice to encapsulate this logic in a common implementation, accessible through ConjunctionUtils. Note that this works great for things like NumericDocValues since they implement DISI and can be wrapped, but LongValues/DoubleValues don't implement DISI (and can't lead iteration), so we would need a separate implementation that explicitly takes a "lead" iterator and then a collection of LongValues/DoubleValues to intersect.
Attachments
Issue Links
- links to