Apache Lucene open-source search software
LUCENE-4055: turn cache back on
Robert Muir3f3a3594a5ba
diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java b/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.javaindex 4f45d03495d..7de2cd1ba35 100644--- a/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java+++ b/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java@@ -383,8 +383,9 @@ public final class SegmentInfo implements Cloneable {public List<String> files() throws IOException {final long fisVersion = fieldInfosVersion;- // nocommit: fix this once we detangle- if (true /* fisVersion != (fieldInfosVersion = getFieldInfos().getVersion()) */) {+ // nocommit+ FieldInfos infos = getFieldInfos();+ if (infos instanceof MutableFieldInfos && fisVersion != (fieldInfosVersion = ((MutableFieldInfos)infos).getVersion())) {clearFilesCache(); // FIS has modifications - need to recompute} else if (files != null) {// Already cached: