lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (LUCENE-986) Refactor segmentInfos from IndexReader into its subclasses
Date Thu, 23 Aug 2007 04:46:30 GMT


Hoss Man commented on LUCENE-986:

one aspect of this that should be considered: It may not make sense for MultiReader to extend
MultiSegmentReader ... as Michael says, only subclasses that own the index directory should
have segmentInfos, and a MultiReader (as defined on the trunk now) can never own it's own

I haven't worked through all the implications, but perhaps the most logical refactoring would

 * IndexReader abstract as possible given that we can't actually make methods abstract
    * DirectoryIndexReader extends IndexReader class, encapsulated all the segmentInfos and locking logic currently in 
          IndexReader (can definitely be made abstract if helpful)
       * SegmentReader extends DirectoryIndexReader
       * MultiSegmentReader extends DirectoryIndexReader
    * ParallelIndexReader extends IndexReader
    * FilterIndexReader extends IndexReader
    * MultiReader extends IndexReader
       ...(side note that i *really* haven't thought through completley: should 
          MultiReader extend FilterIndexReader?)

there would likely be some utlity functionality that could be reused between MultiReader and
MultiSegmentReader ... possible as static methods in IndexReader (or a new util class)

> Refactor segmentInfos from IndexReader into its subclasses
> ----------------------------------------------------------
>                 Key: LUCENE-986
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael Busch
>            Assignee: Michael Busch
>            Priority: Minor
>             Fix For: 2.3
> References to segmentInfos in IndexReader cause different kinds of problems
> for subclasses of IndexReader, like e. g. MultiReader.
> Only subclasses of IndexReader that own the index directory, namely 
> SegmentReader and MultiSegmentReader, should have a SegmentInfos object
> and be able to access it.
> Further information:
> A part of the refactoring work was already done in LUCENE-781

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:
For additional commands, e-mail:

View raw message