You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Greg Miller (Jira)" <ji...@apache.org> on 2021/08/05 16:12:00 UTC

[jira] [Created] (LUCENE-10045) Extend ConjunctionUtils to support LongValues and DoubleValues

Greg Miller created LUCENE-10045:
------------------------------------

             Summary: 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


{{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: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org