[
https://issues.apache.org/jira/browse/LUCENE-10045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Greg Miller reassigned LUCENE-10045:
------------------------------------
Assignee: Greg Miller
> Extend ConjunctionUtils to support LongValues and DoubleValues
> --------------------------------------------------------------
>
> Key: LUCENE-10045
> URL: https://issues.apache.org/jira/browse/LUCENE-10045
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Affects Versions: main (9.0)
> Reporter: Greg Miller
> Assignee: Greg Miller
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{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):
> {code:java}
> LongValues fv = [...];
> DocIdSetIterator docs = [...];
> for (int doc = docs.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; ) {
> if (fv.advanceExact(doc)) {
> // do something
> }
> doc = docs.nextDoc();
> }{code}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]