You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/04/23 15:45:15 UTC

[jira] [Created] (LUCENE-4952) DrillSideways should expose "scoreSubDocsAtOnce" control

Michael McCandless created LUCENE-4952:
------------------------------------------

             Summary: DrillSideways should expose "scoreSubDocsAtOnce" control
                 Key: LUCENE-4952
                 URL: https://issues.apache.org/jira/browse/LUCENE-4952
             Project: Lucene - Core
          Issue Type: Bug
            Reporter: Michael McCandless
            Assignee: Michael McCandless
             Fix For: 5.0, 4.4


I hit this when running a ToParentBlockJoinCollector/Query under
DrillSideways ... the problem is ToParentBlockJoinCollector.collect
expects that all sub-scorers are positioned on the docID being
collected, but DrillSideways sometimes scores with a in-order
BooleanScorer-like scorer that advances each sub-scorer in chunks
... this breaks ToParentBlockJoinCollector.

This is the same issue as LUCENE-2686, where apps that want to peek at
the sub-scorers from their collector need those sub-scorers to all be
"on" the current docID being collected...

One way to "fix" this would be to switch based on
Collector.acceptsDocsOutOfOrder() ... but that's really a hack ... it
only "works" for BooleanQuery because BooleanScorer is an out-of-order
scorer (well and because we fixed all BS2s to keep sub-scorers
positioned on the doc being collected in LUCENE-3505).

But if for example we added MUST clauses back into BooleanScorer
(which I think we should!) then it could easily score those queries
in-order.  Really we need another boolean (scoreSubDocsAtOnce or
something) to Weight.scorer... but that's a big change...

I think for this issue I'll just add an expert protected method to
DrillSideways that returns this boolean, and an app could subclass to
override.  Apps that "know" they are using queries/collectors like
ToParentBlockJoinQuery/Collector must subclass and override
... DrillSideways already has other expert methods that you subclass &
override.


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