Skip to content

Apache Lucene open-source search software

Complete the javadoc for DirectoryReader#indexExists (#14136)

Craig Perkinsb87757c2d2f7
diff --git a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
index d50ae3a85cb..7571a7f0d07 100644
--- a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
+++ b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
@@ -305,7 +305,8 @@ public abstract class DirectoryReader extends BaseCompositeReader<LeafReader> {
/**
* Returns <code>true</code> if an index likely exists at the specified directory. Note that if a
- * corrupt index exists, or if an index in the process of committing
+ * corrupt index exists, or if an index in the process of committing the return value is not
+ * reliable.
*
* @param directory the directory to check for an index
* @return <code>true</code> if an index exists; <code>false</code> otherwise