Esempio n. 1
0
        public override System.Object Clone()
        {
            SpanFirstQuery spanFirstQuery = new SpanFirstQuery((SpanQuery)match.Clone(), end);

            spanFirstQuery.Boost = Boost;
            return(spanFirstQuery);
        }
Esempio n. 2
0
        public override bool Equals(System.Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (!(o is SpanFirstQuery))
            {
                return(false);
            }

            SpanFirstQuery other = (SpanFirstQuery)o;

            return(this.end == other.end && this.match.Equals(other.match) && this.Boost == other.Boost);
        }
Esempio n. 3
0
        public override Query Rewrite(IndexReader reader)
        {
            SpanFirstQuery clone = null;

            SpanQuery rewritten = (SpanQuery)match.Rewrite(reader);

            if (rewritten != match)
            {
                clone       = (SpanFirstQuery)this.Clone();
                clone.match = rewritten;
            }

            if (clone != null)
            {
                return(clone);                // some clauses rewrote
            }
            else
            {
                return(this);                // no clauses rewrote
            }
        }
Esempio n. 4
0
 private void  InitBlock(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
 {
     this.reader            = reader;
     this.enclosingInstance = enclosingInstance;
     spans = Enclosing_Instance.match.GetSpans(reader);
 }
Esempio n. 5
0
 public AnonymousClassSpans(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
 {
     InitBlock(reader, enclosingInstance);
 }
Esempio n. 6
0
			private void  InitBlock(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
			{
				this.reader = reader;
				this.enclosingInstance = enclosingInstance;
				spans = Enclosing_Instance.match.GetSpans(reader);
			}
Esempio n. 7
0
			public AnonymousClassSpans(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
			{
				InitBlock(reader, enclosingInstance);
			}
Esempio n. 8
0
		public override System.Object Clone()
		{
			SpanFirstQuery spanFirstQuery = new SpanFirstQuery((SpanQuery) match.Clone(), end);
			spanFirstQuery.Boost = Boost;
			return spanFirstQuery;
		}