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

Yonik Seeley commented on LUCENE-2831:
--------------------------------------

Regarding this assert in IndexSearcher:
    // TODO: eable this assert once SolrIndexReader and friends are refactored 
to use ReaderContext
    // We can't assert this here since SolrIndexReader will fail in some 
contexts - once solr is consistent we should be fine here
    // assert context.isTopLevel: "IndexSearcher's ReaderContext must be 
topLevel for reader" + context.reader;

This is a bug in ReaderUtil.build() that when passed a segment reader, it sets 
isTopLevel to false.
You got bit by those extra booleans ;-) 

When I hacked ReaderContext to just set isTopLevel to parent==null, all the 
solr tests passed w/ the assertion enabled.

> Revise Weight#scorer & Filter#getDocIdSet API to pass Readers context
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-2831
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2831
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 4.0
>
>         Attachments: LUCENE-2831.patch, LUCENE-2831.patch, LUCENE-2831.patch, 
> LUCENE-2831.patch, LUCENE-2831.patch, LUCENE-2831.patch
>
>
> Spinoff from LUCENE-2694 - instead of passing a reader into Weight#scorer(IR, 
> boolean, boolean) we should / could revise the API and pass in a struct that 
> has parent reader, sub reader, ord of that sub. The ord mapping plus the 
> context with its parent would make several issues way easier. See 
> LUCENE-2694, LUCENE-2348 and LUCENE-2829 to name some.

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