[ https://issues.apache.org/jira/browse/LUCENE-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654923#action_12654923 ]
Jason Rutherglen commented on LUCENE-1475: ------------------------------------------ RE: "It should return an empty array, not null when there are no sub readers." It should return null because there are no results. An empty array almost implies the SegmentReader can contain other readers or that they may show up in the future. IMO the API is garbage anyways because it should be using an interface like the JDK classes do. MM: "What should be returned if a Multi*Reader has embedded Multi*Readers as sub-readers?" I don't like this approach and the comments seem sound like over engineering a simple solution. If the user wants all the sub of sub readers, they need to write that code externally to Lucene. Otherwise it is not easy to know what the sub readers are for the given reader. > Expose sub-IndexReaders from MultiReader or MultiSegmentReader > -------------------------------------------------------------- > > Key: LUCENE-1475 > URL: https://issues.apache.org/jira/browse/LUCENE-1475 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Affects Versions: 2.4 > Reporter: Jason Rutherglen > Priority: Minor > Attachments: LUCENE-1475.patch > > Original Estimate: 4h > Remaining Estimate: 4h > > MultiReader and MultiSegmentReader are package protected and do not expose > the underlying sub-IndexReaders. A way to expose the sub-readers is to have > an interface that an IndexReader may be cast to that exposes the underlying > readers. > This is for realtime indexing. -- 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]