fix NPE introduced on optimization of index status on docs status creation

This commit is contained in:
kimchy 2010-08-19 15:37:06 +03:00
parent 70c344b079
commit 04ae1581a0
1 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,9 @@ public class IndexStatus implements Iterable<IndexShardStatus> {
if (shard.docs() == null) { if (shard.docs() == null) {
continue; continue;
} }
if (docs == null) {
docs = new DocsStatus();
}
docs.numDocs += shard.docs().numDocs(); docs.numDocs += shard.docs().numDocs();
docs.maxDoc += shard.docs().maxDoc(); docs.maxDoc += shard.docs().maxDoc();
docs.deletedDocs += shard.docs().deletedDocs(); docs.deletedDocs += shard.docs().deletedDocs();