private void  InitBlock(Monodoc.Lucene.Net.Index.IndexReader reader, SpanOrQuery enclosingInstance)
			{
				this.reader = reader;
				this.enclosingInstance = enclosingInstance;
				all = new System.Collections.ArrayList(Enclosing_Instance.clauses.Count);
				queue = new SpanQueue(enclosingInstance, Enclosing_Instance.clauses.Count);
				System.Collections.IEnumerator i = Enclosing_Instance.clauses.GetEnumerator();
				while (i.MoveNext())
				{
					// initialize all
					all.Add(((SpanQuery) i.Current).GetSpans(reader));
				}
			}
Esempio n. 2
0
 private void  InitBlock(Monodoc.Lucene.Net.Index.IndexReader reader, SpanOrQuery enclosingInstance)
 {
     this.reader            = reader;
     this.enclosingInstance = enclosingInstance;
     all   = new System.Collections.ArrayList(Enclosing_Instance.clauses.Count);
     queue = new SpanQueue(enclosingInstance, Enclosing_Instance.clauses.Count);
     System.Collections.IEnumerator i = Enclosing_Instance.clauses.GetEnumerator();
     while (i.MoveNext())
     {
         // initialize all
         all.Add(((SpanQuery)i.Current).GetSpans(reader));
     }
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 private bool InitSpanQueue(int target)
 {
     queue = new SpanQueue(outerInstance.clauses.Count);
     foreach (var clause in outerInstance.clauses)
     {
         Spans spans = clause.GetSpans(context, acceptDocs, termContexts);
         cost += spans.GetCost();
         if (((target == -1) && spans.MoveNext()) || ((target != -1) && spans.SkipTo(target)))
         {
             queue.Add(spans);
         }
     }
     return(queue.Count != 0);
 }
Esempio n. 5
0
			private bool InitSpanQueue(int target)
			{
				queue = new SpanQueue(enclosingInstance, Enclosing_Instance.clauses.Count);
				System.Collections.IEnumerator i = Enclosing_Instance.clauses.GetEnumerator();
				while (i.MoveNext())
				{
					Spans spans = ((SpanQuery) i.Current).GetSpans(reader);
					if (((target == - 1) && spans.Next()) || ((target != - 1) && spans.SkipTo(target)))
					{
						queue.Put(spans);
					}
				}
				return queue.Size() != 0;
			}
Esempio n. 6
0
 private bool InitSpanQueue(int target, IState state)
 {
     queue = new SpanQueue(enclosingInstance, Enclosing_Instance.clauses.Count);
     System.Collections.Generic.IEnumerator <SpanQuery> i = Enclosing_Instance.clauses.GetEnumerator();
     while (i.MoveNext())
     {
         Spans spans = i.Current.GetSpans(reader, state);
         if (((target == -1) && spans.Next(state)) || ((target != -1) && spans.SkipTo(target, state)))
         {
             queue.Add(spans);
         }
     }
     return(queue.Size() != 0);
 }
Esempio n. 7
0
            private bool InitSpanQueue(int target)
            {
                queue = new SpanQueue(enclosingInstance, Enclosing_Instance.clauses.Count);
                foreach (SpanQuery i in Enclosing_Instance.clauses)
                {
                    Spans spans = i.GetSpans(reader);
                    if (((target == -1) && spans.Next()) || ((target != -1) && spans.SkipTo(target)))
                    {
                        queue.Put(spans);
                    }
                }

                return(queue.Size() != 0);
            }
Esempio n. 8
0
            private bool InitSpanQueue(int target)
            {
                queue = new SpanQueue(outerInstance, outerInstance.clauses.Count);
                IEnumerator <SpanQuery> i = outerInstance.clauses.GetEnumerator();

                while (i.MoveNext())
                {
                    Spans spans = i.Current.GetSpans(context, acceptDocs, termContexts);
                    cost += spans.GetCost();
                    if (((target == -1) && spans.Next()) || ((target != -1) && spans.SkipTo(target)))
                    {
                        queue.Add(spans);
                    }
                }
                return(queue.Count != 0);
            }