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

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

Remember that we may be dealing with a tree with a depth > 2, so If we want to 
preserve maximum information, we may want something like this:

{code}
public static final class ReaderInfo {
    public final IndexReader reader;

    /** the reader info for this reader's immediate parent, or null if none */
    public final ReaderInfo parent;

    /** the ord of this reader in the parent */
    public final int ordInParent;

    /** the offset of this reader in the parent */
   public final int offsetInParent;

   /** the ord of this reader in the top level reader */
   public final int ord;

  /** the offset of this reader in the top level reader */
  public final int offset;
{code}


> 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