git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457707 13f79535-47bb-0310-9956-ffa450edef68

This commit is contained in:
Shai Erera 2013-03-18 11:00:51 +00:00
parent e698e86004
commit f5e1b888b3
1 changed files with 2 additions and 8 deletions

View File

@ -160,14 +160,8 @@ public class DirectoryTaxonomyReader extends TaxonomyReader {
protected DirectoryTaxonomyReader doOpenIfChanged() throws IOException {
ensureOpen();
final DirectoryReader r2;
if (taxoWriter == null) {
// not NRT
r2 = DirectoryReader.openIfChanged(indexReader);
} else {
// NRT
r2 = DirectoryReader.openIfChanged(indexReader, taxoWriter.getInternalIndexWriter(), false);
}
// This works for both NRT and non-NRT readers (i.e. an NRT reader remains NRT).
final DirectoryReader r2 = DirectoryReader.openIfChanged(indexReader);
if (r2 == null) {
return null; // no changes, nothing to do
}