diff --git a/lucene/join/src/java/org/apache/lucene/search/join/CheckJoinIndex.java b/lucene/join/src/java/org/apache/lucene/search/join/CheckJoinIndex.java index c6c3213dc3e..4f2e0ad6a8c 100644 --- a/lucene/join/src/java/org/apache/lucene/search/join/CheckJoinIndex.java +++ b/lucene/join/src/java/org/apache/lucene/search/join/CheckJoinIndex.java @@ -63,7 +63,7 @@ public class CheckJoinIndex { for (int child = prevParentDoc + 1; child != parentDoc; child++) { final boolean childIsLive = liveDocs.get(child); if (parentIsLive != childIsLive) { - if (childIsLive) { + if (parentIsLive) { throw new IllegalStateException( "Parent doc " + parentDoc