public void Add(string dim, params string[] path)
{
if (drillDownDims.ContainsKey(dim))
{
Merge(dim, path);
return;
}
string indexedField = config.GetDimConfig(dim).IndexFieldName;
BooleanQuery bq = new BooleanQuery(true); // disable coord
bq.Add(new TermQuery(Term(indexedField, dim, path)), Occur.SHOULD);
Add(dim, bq);
}
public virtual void TestAndOrs() { IndexSearcher searcher = NewSearcher(reader); // test (a/1 OR a/2) AND b/1 DrillDownQuery q = new DrillDownQuery(config); q.Add("a", "1"); q.Add("a", "2"); q.Add("b", "1"); TopDocs docs = searcher.Search(q, 100); Assert.AreEqual(5, docs.TotalHits); }