Пример #1
0
        public override System.Object Clone()
        {
            SpanFirstQuery spanFirstQuery = new SpanFirstQuery((SpanQuery)match.Clone(), end);

            spanFirstQuery.SetBoost(GetBoost());
            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.GetBoost() == other.GetBoost());
        }
Пример #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(Mono.Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
			{
				this.reader = reader;
				this.enclosingInstance = enclosingInstance;
				spans = Enclosing_Instance.match.GetSpans(reader);
			}
Пример #5
0
			public AnonymousClassSpans(Mono.Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
			{
				InitBlock(reader, enclosingInstance);
			}
Пример #6
0
		public override System.Object Clone()
		{
			SpanFirstQuery spanFirstQuery = new SpanFirstQuery((SpanQuery) match.Clone(), end);
			spanFirstQuery.SetBoost(GetBoost());
			return spanFirstQuery;
		}
Пример #7
0
 private void  InitBlock(Mono.Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
 {
     this.reader            = reader;
     this.enclosingInstance = enclosingInstance;
     spans = Enclosing_Instance.match.GetSpans(reader);
 }
Пример #8
0
 public AnonymousClassSpans(Mono.Lucene.Net.Index.IndexReader reader, SpanFirstQuery enclosingInstance)
 {
     InitBlock(reader, enclosingInstance);
 }