[
https://issues.apache.org/jira/browse/LUCENE-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974251#action_12974251
]
Simon Willnauer commented on LUCENE-2694:
-----------------------------------------
bq. I think instead of ReaderView we could change Weight.scorer API so that
instead of receiving IndexReader reader, it receives a struct that has parent
reader, sub reader, ord of that sub?
so I changed the Weight#scorer API to use a class called ScoreContext that
holds the parent reader, the current sub and the subs ord. That change is
absolutely massive! I don't upload that change since I think if we do that we
need to do it in a different issue anyway. I ran into a couple of problems:
* if we pass in such a context we also need to change the explain interface
since its calling Weight#scorer here and there
* Once we pass in the Context stuff like QueryWrapperFilter doesn't work
anymore since it doesn't know which ord the incoming reader has. So Filters
would need a context too. I don't like that!
* Stuff like scoreDocsInOrder are hard to put into such a context since almost
all scorers internally are called with scoreDocsInOrder=true with a contant.
meaning that nobody really respects the incoming value for subscorers though.
but if i just forward the context the member needs to be set to true or the
context needs to be cloned for subs - see BooleanQuery for instance.
* such a context would somehow enforce that MTQ are only executed against the
Reader they where rewritten against. Which is how it should be IMO but we are
also depending on that everybody who uses a MTQ knows exactly how the query was
rewritten which is kind of not obvious. I think we need a better way to enforce
stuff like that.
after all I think this must be done in a different issue though. This issue was
meant to make MTQ single pass so lets do that first.... progress over
perfection ey mike :).
Nonetheless, it seems like that we need to rethink the Weight API entirely I
also don't like that Weight operates on Searcher instead of IndexSearcher
though.
> MTQ rewrite + weight/scorer init should be single pass
> ------------------------------------------------------
>
> Key: LUCENE-2694
> URL: https://issues.apache.org/jira/browse/LUCENE-2694
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Reporter: Michael McCandless
> Assignee: Simon Willnauer
> Fix For: 4.0
>
> Attachments: LUCENE-2694-FTE.patch, LUCENE-2694.patch,
> LUCENE-2694.patch, LUCENE-2694.patch, LUCENE-2694.patch, LUCENE-2694.patch,
> LUCENE-2694.patch
>
>
> Spinoff of LUCENE-2690 (see the hacked patch on that issue)...
> Once we fix MTQ rewrite to be per-segment, we should take it further and make
> weight/scorer init also run in the same single pass as rewrite.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]