// we can't put deleted docs before the nested reader, because
// it will throw off the docIds
IndexReader[] readers = new IndexReader[] {
edge < 0 ? r : IndexReader.open(makeEmptyIndex(0)),
IndexReader.open(makeEmptyIndex(0)),
new MultiReader(new IndexReader[] {
IndexReader.open(makeEmptyIndex(edge < 0 ? 4 : 0)),
IndexReader.open(makeEmptyIndex(0)),
0 == edge ? r : IndexReader.open(makeEmptyIndex(0))
}),
IndexReader.open(makeEmptyIndex(0 < edge ? 0 : 7)),
IndexReader.open(makeEmptyIndex(0)),
new MultiReader(new IndexReader[] {
IndexReader.open(makeEmptyIndex(0 < edge ? 0 : 5)),
IndexReader.open(makeEmptyIndex(0)),
0 < edge ? r : IndexReader.open(makeEmptyIndex(0))
})
};
IndexSearcher out = new IndexSearcher(new MultiReader(readers));
out.setSimilarity(s.getSimilarity());
return out;
}