From cb5d9c56ff021e3105121a522a5a53e449102cd0 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Tue, 26 May 2009 18:35:50 +0000 Subject: [PATCH] fix CheckIndex -fix to immediately abort if no segments file is present git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@778834 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/index/CheckIndex.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/java/org/apache/lucene/index/CheckIndex.java b/src/java/org/apache/lucene/index/CheckIndex.java index 6dbd07e957b..2181dbbd13a 100644 --- a/src/java/org/apache/lucene/index/CheckIndex.java +++ b/src/java/org/apache/lucene/index/CheckIndex.java @@ -713,6 +713,9 @@ public class CheckIndex { checker.setInfoStream(System.out); Status result = checker.checkIndex(onlySegments); + if (result.missingSegments) { + System.exit(1); + } if (!result.clean) { if (!doFix) {