public virtual bool SkipTo(int target) { if (moreInclude) { // skip include moreInclude = includeSpans.SkipTo(target); } if (!moreInclude) { return(false); } if (moreExclude && includeSpans.Doc() > excludeSpans.Doc()) { moreExclude = excludeSpans.SkipTo(includeSpans.Doc()); } while (moreExclude && includeSpans.Doc() == excludeSpans.Doc() && excludeSpans.End() <= includeSpans.Start()) { moreExclude = excludeSpans.Next(); // increment exclude } if (!moreExclude || includeSpans.Doc() != excludeSpans.Doc() || includeSpans.End() <= excludeSpans.Start()) { return(true); // we found a match } return(Next()); // scan to next match }
public virtual bool SkipTo(int target) { if (!spans.SkipTo(target)) { return(false); } return((spans.End() <= Enclosing_Instance.end) || Next()); }
private bool InitSpanQueue(int target) { queue = new SpanQueue(enclosingInstance, Enclosing_Instance.clauses.Count); System.Collections.IEnumerator i = Enclosing_Instance.clauses.GetEnumerator(); while (i.MoveNext()) { PayloadSpans spans = ((SpanQuery)i.Current).GetPayloadSpans(reader); if (((target == -1) && spans.Next()) || ((target != -1) && spans.SkipTo(target))) { queue.Put(spans); } } return(queue.Size() != 0); }
public virtual bool SkipTo(int target) { return(Adjust(spans.SkipTo(target))); }