lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <ysee...@gmail.com>
Subject Re: optimized reopen?
Date Wed, 11 May 2005 21:49:30 GMT
Things are cached using an IndexReader as the key, so you would have
to be careful not to break the current behaviour (that an
IndexReader's view of an index doesn't change - deletes from that
specific reader aside).

Maybe you could invoke reopen() on an existing IndexReader and it
would return a new IndexReader that shares sub-readers that haven't
changed?  But I don't think that sub-readers can be shared like this
right now... the difficulty may lie in deleted-docs.

-Yonik


On 5/11/05, Robert Engels <rengels@ix.netcom.com> wrote:
> Is there any way to optimize the closing & reopening of an Index?
> 
> Since the IndexReader.open() opens a MultiReader is there are multiple
> segments, it seems a reopen() method could be implemented, which detects
> which segments are the same as the current open index, and then passes those
> SegementReaders to a new Multireader rather than creating new SegmentReaders
> for the unmodified segments.
> 
> Does this sounds feasible? Would it improve the performance?
> 
> Thanks
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message