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

Michael McCandless commented on LUCENE-2831:
--------------------------------------------

I like the full ReaderInfo!

It holds details not only relative to top-level reader but also
relative to its immediate parent.  This way we don't lose any
information on the full tree structure (in case there are apps that
care).

I think we should add the sub-ReaderInfos too, so the tree is
doubly-linked?

bq. ReaderInfo (info about parents, and reader context in general) should not 
be kept on the IndexReader since a reader can be used in multiple contexts.

Actually I think we can and should store this in IndexReader?

But, only the top-level reader is allowed to hold ReaderInfo for all
subs it [recurisvely] contains.  Ie a given IR is not allowed to hold
"its" ReaderInfo, since it can in general have more than one
ReaderInfo if it belongs to multiple top-level readers.

So eg IR would have a getTopReaderInfo(), to return its own top-level
ReaderInfo.  From there, eg, IS would walk the subs down to gather the
leaf ReaderInfo array that are the subs visited for searching.

Man I wish we had done this back in 2.9 w/ the per-segment cutover,
instead of passing around naked readers this whole time!!


> 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
>
>
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to