Example #1
0
        public NearSpansUnordered(SpanNearQuery query, IndexReader reader)
        {
            this.query = query;
            this.slop  = query.GetSlop();

            SpanQuery[] clauses = query.GetClauses();
            queue = new CellQueue(this, clauses.Length);
            for (int i = 0; i < clauses.Length; i++)
            {
                SpansCell cell = new SpansCell(this, clauses[i].GetSpans(reader), i);
                ordered.Add(cell);
            }
        }
        private int totalLength; // sum of current lengths

        #endregion Fields

        #region Constructors

        public NearSpansUnordered(SpanNearQuery query, IndexReader reader)
        {
            this.query = query;
            this.slop = query.GetSlop();

            SpanQuery[] clauses = query.GetClauses();
            queue = new CellQueue(this, clauses.Length);
            for (int i = 0; i < clauses.Length; i++)
            {
                SpansCell cell = new SpansCell(this, clauses[i].GetPayloadSpans(reader), i);
                ordered.Add(cell);
            }
        }
Example #3
0
        public NearSpans(SpanNearQuery query, IndexReader reader)
        {
            this.query   = query;
            this.slop    = query.GetSlop();
            this.inOrder = query.IsInOrder();

            SpanQuery[] clauses = query.GetClauses();             // initialize spans & list
            queue = new CellQueue(this, clauses.Length);
            for (int i = 0; i < clauses.Length; i++)
            {
                SpansCell cell = new SpansCell(this, clauses[i].GetSpans(reader), i);
                ordered.Add(cell);                 // add to ordered
            }
        }
Example #4
0
        public NearSpansUnordered(SpanNearQuery query, AtomicReaderContext context, Bits acceptDocs, IDictionary <Term, TermContext> termContexts)
        {
            this.Query = query;
            this.Slop  = query.Slop;

            SpanQuery[] clauses = query.Clauses;
            Queue    = new CellQueue(this, clauses.Length);
            subSpans = new Spans[clauses.Length];
            for (int i = 0; i < clauses.Length; i++)
            {
                SpansCell cell = new SpansCell(this, clauses[i].GetSpans(context, acceptDocs, termContexts), i);
                Ordered.Add(cell);
                subSpans[i] = cell.Spans;
            }
        }
Example #5
0
        public NearSpansUnordered(SpanNearQuery query, IndexReader reader, IState state)
        {
            this.query = query;
            this.slop  = query.Slop;

            SpanQuery[] clauses = query.GetClauses();
            queue    = new CellQueue(this, clauses.Length);
            subSpans = new Spans[clauses.Length];
            for (int i = 0; i < clauses.Length; i++)
            {
                SpansCell cell = new SpansCell(this, clauses[i].GetSpans(reader, state), i);
                ordered.Add(cell);
                subSpans[i] = cell.spans;
            }
        }
		public NearSpans(SpanNearQuery query, Monodoc.Lucene.Net.Index.IndexReader reader)
		{
			this.query = query;
			this.slop = query.GetSlop();
			this.inOrder = query.IsInOrder();
			
			SpanQuery[] clauses = query.GetClauses(); // initialize spans & list
			queue = new CellQueue(this, clauses.Length);
			for (int i = 0; i < clauses.Length; i++)
			{
				SpansCell cell = new SpansCell(this, clauses[i].GetSpans(reader), i);
				ordered.Add(cell); // add to ordered
			}
		}