lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: index reopen question
Date Sat, 12 Apr 2008 00:30:01 GMT

: 1)  looking at the code:
:     if (this.hasChanges || this.isCurrent()) {
:       // the index hasn't changed - nothing to do here
:       return this;
:     }

:    Shouldn't it be !this.hasChanges?

...that's from DirectoryIndexReader, and it sure looks like a bug to me.

: 2) FilterIndexReader calls the ensureOpen() method from the super class
: instead of overriding the method and call the inner reader's ensureOpen, is
: that expected?

FilterIndexReader doesn't call super.ensureOpen(), it just calls 
ensureOpen() so that subclasses can do whatever house keepingthey 
want in that method.  The "inner" reader is responsiblefor calling it's 
own ensureOpen method as appropriate.

: 3) When you reopen an index, the inner reference count is not updated, is
: that ok?

which class are you refering to? what do you mean by "inner" reference 
count ?  ... I'm guessing FilterIndexReader based on your question #2, but 
it doesn't support reopen.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message