@Test public void require_that_not_works_when_k_is_1() { ConjunctionIndexBuilder builder = new ConjunctionIndexBuilder(); IndexableFeatureConjunction c1 = indexableConj( conj( feature("a").inSet("1"), not(feature("b").inSet("1")))); IndexableFeatureConjunction c2 = indexableConj( conj( feature("a").inSet("1"), not(feature("b").inSet("1")), not(feature("c").inSet("1")))); IndexableFeatureConjunction c3 = indexableConj( conj( feature("a").inSet("1"), not(feature("b").inSet("1")), not(feature("c").inSet("1")), not(feature("d").inSet("1")))); builder.indexConjunction(c1); builder.indexConjunction(c2); builder.indexConjunction(c3); ConjunctionIndex index = builder.build(); ConjunctionIndex.Searcher searcher = index.searcher(); PredicateQuery query = new PredicateQuery(); assertTrue(searcher.search(query).isEmpty()); query.addFeature("a", "1"); assertHitsEquals(searcher.search(query), c1, c2, c3); query.addFeature("b", "1"); assertTrue(searcher.search(query).isEmpty()); query.addFeature("c", "1"); assertTrue(searcher.search(query).isEmpty()); query.addFeature("d", "1"); assertTrue(searcher.search(query).isEmpty()); }
public Searcher searcher() { return new Searcher(); }
ConjunctionIndex { public Searcher searcher() { return new Searcher(); } }
ConjunctionIndex { public Searcher searcher() { return new Searcher(); } ConjunctionIndex(IntObjectMap<FeatureIndex> kIndex, int[] zList, long[] idMapping); }
ConjunctionIndex { public Searcher searcher() { return new Searcher(); } ConjunctionIndex(IntObjectMap<FeatureIndex> kIndex, int[] zList, long[] idMapping); Searcher searcher(); void writeToOutputStream(DataOutputStream out); static ConjunctionIndex fromInputStream(DataInputStream in); }
ConjunctionIndex { public Searcher searcher() { return new Searcher(); } ConjunctionIndex(IntObjectMap<FeatureIndex> kIndex, int[] zList, long[] idMapping); Searcher searcher(); void writeToOutputStream(DataOutputStream out); static ConjunctionIndex fromInputStream(DataInputStream in);  }