mirror of https://github.com/apache/lucene.git
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457707 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e698e86004
commit
f5e1b888b3
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue