public Searcher searcher() {
        return new Searcher();
    }
@Test
    void require_that_subqueries_are_supported() {
        ConjunctionIndexBuilder builder = new ConjunctionIndexBuilder();
        IndexableFeatureConjunction c1 = indexableConj(
                conj(
                        feature("a").inSet("1"),
                        feature("b").inSet("3"),
                        not(feature("c").inSet("4"))));
        IndexableFeatureConjunction c2 = indexableConj(
                conj(
                        feature("a").inSet("1"),
                        feature("b").inSet("3")));
        IndexableFeatureConjunction c3 = indexableConj(
                conj(
                        feature("a").inSet("2"),
                        feature("b").inSet("3")));
        IndexableFeatureConjunction c4 = indexableConj(
                conj(
                        feature("e").inSet("5"),
                        feature("f").inSet("6"))
        );
        builder.indexConjunction(c1);
        builder.indexConjunction(c2);
        builder.indexConjunction(c3);
        builder.indexConjunction(c4);
        ConjunctionIndex index = builder.build();
        ConjunctionIndex.Searcher searcher = index.searcher();

        PredicateQuery query = new PredicateQuery();

        //subquery 0: a=2 and b=3
        //subquery 1: a=1 and b=3
        //subquery 2: a=1 and b=3
        query.addFeature("a", "1", 0b110);
        query.addFeature("a", "2", 0b001);
        query.addFeature("b", "3", 0b111);
        List<ConjunctionHit> expectedHits = matchingConjunctionList(
                new ConjunctionHit(c1.id, 0b110),
                new ConjunctionHit(c2.id, 0b110),
                new ConjunctionHit(c3.id, 0b001)
        );

        List<ConjunctionHit> hits = searcher.search(query);
        assertHitsEquals(expectedHits, hits);

        //subquery 0: a=2 and b=3 and c=4
        //subquery 1: a=1 and b=3
        //subquery 2: a=1 and b=3 and c=4
        query.addFeature("c", "4", 0b101);
        expectedHits = matchingConjunctionList(
                new ConjunctionHit(c1.id, 0b010),
                new ConjunctionHit(c2.id, 0b110),
                new ConjunctionHit(c3.id, 0b001)
        );
        hits = searcher.search(query);
        assertHitsEquals(expectedHits, hits);

        // subquery 0: a=2 and e=5
        // subquery 1: b=3 and f=6
        PredicateQuery query2 = new PredicateQuery();
        query2.addFeature("a", "2", 0b01);
        query2.addFeature("b", "3", 0b10);
        query2.addFeature("e", "5", 0b01);
        query2.addFeature("f", "6", 0b10);
        expectedHits = matchingConjunctionList(
                new ConjunctionHit(c1.id, 0b010),
                new ConjunctionHit(c2.id, 0b110),
                new ConjunctionHit(c3.id, 0b001)
        );
        hits = searcher.search(query);
        assertHitsEquals(expectedHits, hits);
    }