Document childDoc = new Document();
childDoc.add(newField("child", "2", Field.Store.NO, Field.Index.NOT_ANALYZED));
w.addDocuments(Arrays.asList(childDoc, parentDoc));
// Need single seg:
w.forceMerge(1);
IndexReader r = w.getReader();
w.close();
IndexSearcher s = newSearcher(r, false);
Query tq = new TermQuery(new Term("child", "2"));
final Filter parentsFilter = new CachingWrapperFilter(new RawTermFilter(new Term("isparent", "yes")),