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

            spanFirstQuery.Boost = Boost;
            return(spanFirstQuery);
        }
示例#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);
        }
示例#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
            }
        }
示例#4
0
 private void  InitBlock(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
 {
     this.reader            = reader;
     this.enclosingInstance = enclosingInstance;
     spans = Enclosing_Instance.match.GetSpans(reader);
 }
示例#5
0
 public AnonymousClassSpans(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
 {
     InitBlock(reader, enclosingInstance);
 }
示例#6
0
			private void  InitBlock(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
			{
				this.reader = reader;
				this.enclosingInstance = enclosingInstance;
				spans = Enclosing_Instance.match.GetSpans(reader);
			}
示例#7
0
			public AnonymousClassSpans(Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
			{
				InitBlock(reader, enclosingInstance);
			}
示例#8
0
		public override System.Object Clone()
		{
			SpanFirstQuery spanFirstQuery = new SpanFirstQuery((SpanQuery) match.Clone(), end);
			spanFirstQuery.Boost = Boost;
			return spanFirstQuery;
		}