Exemple #1
0
            public override Explanation Explain(AtomicReaderContext ir, int i)
            {
                Explanation      inner            = weight.Explain(ir, i);
                Filter           f                = outerInstance.filter;
                DocIdSet         docIdSet         = f.GetDocIdSet(ir, ir.AtomicReader.LiveDocs);
                DocIdSetIterator docIdSetIterator = docIdSet == null?DocIdSetIterator.GetEmpty() : docIdSet.GetIterator();

                if (docIdSetIterator == null)
                {
                    docIdSetIterator = DocIdSetIterator.GetEmpty();
                }
                if (docIdSetIterator.Advance(i) == i)
                {
                    return(inner);
                }
                else
                {
                    Explanation result = new Explanation(0.0f, "failure to match filter: " + f.ToString());
                    result.AddDetail(inner);
                    return(result);
                }
            }
Exemple #2
0
 public override DocIdSetIterator GetIterator()
 {
     return(DocIdSetIterator.GetEmpty());
 }