From c5b8eead419c4d99b24fd6a3b70fdbeda41d2a5b Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 16 May 2014 19:45:46 +0000 Subject: [PATCH] improve test coverage for IW.expungeDeletes; fix infoStream logging in BDS to write something meaningful git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1595324 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/BufferedUpdatesStream.java | 9 ++++++++- .../lucene/search/grouping/GroupFacetCollectorTest.java | 5 ++--- .../java/org/apache/lucene/index/RandomIndexWriter.java | 7 ++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java b/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java index 11f860c2756..b75bc4df6f5 100644 --- a/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java +++ b/lucene/core/src/java/org/apache/lucene/index/BufferedUpdatesStream.java @@ -30,6 +30,7 @@ import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.Query; import org.apache.lucene.search.QueryWrapperFilter; +import org.apache.lucene.store.Directory; import org.apache.lucene.store.IOContext; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.InfoStream; @@ -332,7 +333,13 @@ class BufferedUpdatesStream { } if (infoStream.isEnabled("BD")) { - infoStream.message("BD", "prune sis=" + segmentInfos + " minGen=" + minGen + " packetCount=" + updates.size()); + Directory dir; + if (segmentInfos.size() > 0) { + dir = segmentInfos.info(0).info.dir; + } else { + dir = null; + } + infoStream.message("BD", "prune sis=" + segmentInfos.toString(dir) + " minGen=" + minGen + " packetCount=" + updates.size()); } final int limit = updates.size(); for(int delIDX=0;delIDX