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

Michael McCandless commented on LUCENE-1483:
--------------------------------------------

You shouldn't need to subtract base from the filter's docID, since the filter 
is operating in the docID space of the sub-reader.

Is it TestSort.testTopDocScores that you see failing (that's what I see)?

Unfortunately, the filter in that test is assuming that the IndexReader it's 
passed in is equal to the "full" IndexReader, because it references 
docs1.scoreDocs[0].doc, which is the docID space of the full reader.

I would say the test is buggy (it's making an assumption about the API that 
happens to be true but was not guaranteed).  However, this could mean similar 
filters "out there" think they can grab docIDs from the top-level IndexReader, 
cache them, and then assign them inside the getDocIdSet method.

> Change IndexSearcher to use MultiSearcher semantics for sorted searches
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-1483
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1483
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 2.9
>            Reporter: Mark Miller
>            Priority: Minor
>         Attachments: LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch, 
> LUCENE-1483.patch, LUCENE-1483.patch
>
>
> Here is a quick test patch. FieldCache for sorting is done at the individual 
> IndexReader level and reloading the fieldcache on reopen can be much faster 
> as only changed segments need to be reloaded.

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