lucene 4: Fixed BitsetExecutionChildQuerySearchTests class.

This commit is contained in:
Martijn van Groningen 2012-11-08 22:50:48 +01:00 committed by Shay Banon
parent 9a79fb40bf
commit e2c33ed659
1 changed files with 2 additions and 2 deletions

View File

@ -80,13 +80,13 @@ public class ChildCollector extends Collector {
return; return;
} }
for (Tuple<AtomicReader, IdReaderTypeCache> tuple : readers) { for (Tuple<AtomicReader, IdReaderTypeCache> tuple : readers) {
IndexReader indexReader = tuple.v1(); AtomicReader indexReader = tuple.v1();
IdReaderTypeCache idReaderTypeCache = tuple.v2(); IdReaderTypeCache idReaderTypeCache = tuple.v2();
if (idReaderTypeCache == null) { // might be if we don't have that doc with that type in this reader if (idReaderTypeCache == null) { // might be if we don't have that doc with that type in this reader
continue; continue;
} }
int parentDocId = idReaderTypeCache.docById(parentId); int parentDocId = idReaderTypeCache.docById(parentId);
if (parentDocId != -1) { if (parentDocId != -1 && (indexReader.getLiveDocs() == null || indexReader.getLiveDocs().get(parentDocId))) {
FixedBitSet docIdSet = parentDocs().get(indexReader.getCoreCacheKey()); FixedBitSet docIdSet = parentDocs().get(indexReader.getCoreCacheKey());
if (docIdSet == null) { if (docIdSet == null) {
docIdSet = new FixedBitSet(indexReader.maxDoc()); docIdSet = new FixedBitSet(indexReader.maxDoc());