You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexis Torres Paderewski (JIRA)" <ji...@apache.org> on 2013/05/28 11:58:20 UTC

[jira] [Created] (LUCENE-5021) NextDoc safety for bulk collecting

Alexis Torres Paderewski created LUCENE-5021:
------------------------------------------------

             Summary: NextDoc safety for bulk collecting
                 Key: LUCENE-5021
                 URL: https://issues.apache.org/jira/browse/LUCENE-5021
             Project: Lucene - Core
          Issue Type: Improvement
          Components: core/index, core/other
    Affects Versions: 3.6.2
         Environment: Any with custom filters
            Reporter: Alexis Torres Paderewski


Hello,

I want to apply ACL once as a PostFilter and I would need to bulk this call since round trips would decrease severely performances.

I tryed to just stack them on the DelegatingCollector using this collect :

    @Override
    public void collect(int doc) throws IOException {
        while ((doc = scorer.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
            docs.put(getDocumentId(doc), doc);
        }

        batchCollect();
    }

Sometime it works, when Scorer calling me are "Safe" like the ConstantScorer, but when DisjunctionSumScorer calls me, it either assert on NO_MORE_DOCS if assert are enabled, or it throw a NPE.

Should we copy DisjunctionMaxScorer mechanism to protect nextDoc of an exausted iterator using either current doc or checking numbers of subScorers ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org