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

Simon Willnauer commented on LUCENE-2831:
-----------------------------------------

bq. ReaderContextBuilder.numLeafes uses an AtomicInt, but ReaderUtil.Gather 
doesn't do any threading.
that way I can update it in the annonymous class - not do any threading doesn't 
really matter that operation is not time critical at all. Impl. detail IMO 
which is just convenient 

bq. ReaderContext.leaves() is a method - shouldn't it just be a member for 
consistency? I don't really understand the javadoc on that method either, since 
I don't see how I could walk the tree myself - there are no child pointers.
well they are in CompositeReaderContext but that jdoc is missleading. I added 
it to prevent a cast to check if there are leaves I don't see why this is 
problematic here though. I would rather add a children() method for consistency 
here though.

bq. Is ReaderContext.isTopLevel redundant (i.e. it will always be equal to 
parent==null)? Maybe the same thing for isAtomic and leaves==null?
yeah we could do that but I would prefer the simple booleans since they are way 
more expressive and easier to understand.



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