[ 
https://issues.apache.org/jira/browse/LUCENE-2694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974265#action_12974265
 ] 

Michael McCandless commented on LUCENE-2694:
--------------------------------------------

bq. after all I think this must be done in a different issue though

+1

If, when we now pass a naked IndexReader (eg to Weight.scorer, Weight.explain, 
Filter.getDocIdSet) we replace that with a ReaderContext which has reader, its 
parent, and its ord, then this precursor makes both TermState (this issue) and 
the awesome PK speedup (LUCENE-2829) much simpler.  And I agree we should break 
it out as its own issue.  It's good to do that as its own issue since that's a 
rote API cutover -- we are passing a struct instead of a naked reader, but 
otherwise no change.

This also lets us solve cases where the Filter needs the full context, eg 
LUCENE-2348.

Also, with this I think we should sharpen in the jdocs that when you call 
Query.rewrite the returned query must be searched only against he same reader 
you rewrote against.  Similarly when you create a Weight, it should only be 
used against the same Searcher used to create it from a Query.

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

Reply via email to