lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
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.


-Hoss


---------------------------------------------------------------------
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