add some infoStream verbosity on details of the returned NRT reader for future debugging

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@916769 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-02-26 17:46:25 +00:00
parent 21044e1c8f
commit e358c3f2dd
1 changed files with 5 additions and 1 deletions

View File

@ -404,7 +404,11 @@ public class IndexWriter implements Closeable {
// just like we do when loading segments_N
synchronized(this) {
applyDeletes();
return new ReadOnlyDirectoryReader(this, segmentInfos, termInfosIndexDivisor);
final IndexReader r = new ReadOnlyDirectoryReader(this, segmentInfos, termInfosIndexDivisor);
if (infoStream != null) {
message("return reader version=" + r.getVersion() + " reader=" + r);
}
return r;
}
}