lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Busch (JIRA)" <>
Subject [jira] Commented: (LUCENE-743) IndexReader.reopen()
Date Fri, 20 Jul 2007 07:11:06 GMT


Michael Busch commented on LUCENE-743:

> i somehow missed seeing this issues before ... 

actually, me too... first I came across this thread:;#31592

in which Doug suggested adding a static method 
which would either return the passed in IndexReader instance in case is is
up to date or return a new, refreshed instance. 

I started implementing this, using Dougs and Roberts ideas and then realized 
that there was already this open issue. But the code here is quite outdated.

> in generally we should probably try to approach reopening a reader as a 
> recursive operation

Yeah we could do that. However, this might not be so easy to implement.
For example, if a user creates a MultiReader instance and adds whatever
subreaders, we would have to recursively refresh the underlying readers.
But if the MultiReader was created automatically by just
calling refresh on the subreaders is not enough. New SegmentReaders have to
be opened for new segments.

Also the recursive walk would have to take place within the FindSegmentsFile

I decided therefore to only allow IndexReaders to be refreshed if they were
created by one of the methods. I'm going to submit a first
version of my patch soon. Do you think this is too limiting? 

> IndexReader.reopen()
> --------------------
>                 Key: LUCENE-743
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Otis Gospodnetic
>            Assignee: Michael Busch
>            Priority: Minor
>         Attachments:,,
> This is Robert Engels' implementation of IndexReader.reopen() functionality, as a set
of 3 new classes (this was easier for him to implement, but should probably be folded into
the core, if this looks good).

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