public override Query Rewrite(IndexReader reader)
        {
            SpanPositionCheckQuery clone = null;

            var rewritten = (SpanQuery)m_match.Rewrite(reader);

            if (rewritten != m_match)
            {
                clone         = (SpanPositionCheckQuery)this.Clone();
                clone.m_match = rewritten;
            }

            if (clone != null)
            {
                return(clone); // some clauses rewrote
            }
            else
            {
                return(this); // no clauses rewrote
            }
        }
 public PositionCheckSpan(SpanPositionCheckQuery outerInstance, AtomicReaderContext context, IBits acceptDocs, IDictionary <Term, TermContext> termContexts)
 {
     this.outerInstance = outerInstance;
     spans = outerInstance.m_match.GetSpans(context, acceptDocs, termContexts);
 }
Exemplo n.º 3
0
 public PositionCheckSpan(SpanPositionCheckQuery outerInstance, AtomicReaderContext context, Bits acceptDocs, IDictionary<Term, TermContext> termContexts)
 {
     this.OuterInstance = outerInstance;
     Spans = outerInstance.match.GetSpans(context, acceptDocs, termContexts);
 }