List<ZoieIndexReader<IndexReader>> readerList = idxSystem.getIndexReaders();
// test UIDs from TestInRangeDataInterpreter 0-9
for(ZoieIndexReader<IndexReader> reader : readerList)
{
int maxDoc = reader.maxDoc();
DocIDMapper gmapper = reader.getDocIDMaper();
ZoieIndexReader[] readers = gmapper.getSubReaders();
log.info(Arrays.toString(readers));
int[] starts = gmapper.getStarts();
for(long uid = 0; uid<10; uid++)
{
int readeridx = gmapper.getReaderIndex(uid);
if (readeridx<0 || reader.isDeleted(gmapper.getDocID(uid)))
{
continue;
}
log.info(
"uid: " + uid + " global:" +gmapper.getDocID(uid)+ " start: " + starts[readeridx] +
" local:" + readers[readeridx].getDocIDMaper().getDocID(uid) +
"?=" + (gmapper.getDocID(uid)-starts[readeridx])+
(reader.isDeleted(gmapper.getDocID(uid))?"deleted":""));
assertTrue("", (gmapper.getDocID(uid)-starts[readeridx]) == readers[readeridx].getDocIDMaper().getDocID(uid));
}
}
for(ZoieIndexReader<IndexReader> reader : readerList)
{
DocIDMapper mapper = reader.getDocIDMaper();
log.info(mapper);
if (!(mapper instanceof DocIDMapperImpl))
{
numDiskIdx++;
}