Esempio n. 1
0
        /// <summary>Returns true if <code>o</code> is equal to this. </summary>
        public override bool Equals(System.Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (!(o is ConstantScoreRangeQuery))
            {
                return(false);
            }
            ConstantScoreRangeQuery other = (ConstantScoreRangeQuery)o;

            if ((System.Object) this.fieldName != (System.Object)other.fieldName || this.includeLower != other.includeLower || this.includeUpper != other.includeUpper)
            {
                return(false);
            }
            if (this.lowerVal != null ? !this.lowerVal.Equals(other.lowerVal) : other.lowerVal != null)
            {
                return(false);
            }
            if (this.upperVal != null ? !this.upperVal.Equals(other.upperVal) : other.upperVal != null)
            {
                return(false);
            }
            return(this.GetBoost() == other.GetBoost());
        }
Esempio n. 2
0
        override public System.Object Clone()
        {
            // {{Aroush-1.9}} is this all that we need to clone?!
            ConstantScoreRangeQuery clone = (ConstantScoreRangeQuery)base.Clone();

            clone.fieldName    = (System.String) this.fieldName.Clone();
            clone.lowerVal     = (System.String) this.lowerVal.Clone();
            clone.upperVal     = (System.String) this.upperVal.Clone();
            clone.includeLower = this.includeLower;
            clone.includeUpper = this.includeUpper;
            return(clone);
        }
        override public object Clone()
        {
            // {{Aroush-1.9}} is this all that we need to clone?!
            ConstantScoreRangeQuery clone = (ConstantScoreRangeQuery)base.Clone();

            clone.fieldName    = (System.String) this.fieldName.Clone();
            clone.lowerVal     = (System.String) this.lowerVal.Clone();
            clone.upperVal     = (System.String) this.upperVal.Clone();
            clone.includeLower = this.includeLower;
            clone.includeUpper = this.includeUpper;
            if (this.collator != null)
            {
                clone.collator = this.collator; // {{DSale-2.4}} need to clone collator?
            }
            return(clone);
        }
Esempio n. 4
0
 public virtual Query VisitConstantScoreRangeQuery(ConstantScoreRangeQuery constantScoreRangeq)
 {
     var field = constantScoreRangeq.GetField();
     var visitedField = VisitField(field);
     if (field == visitedField)
         return constantScoreRangeq;
     return new ConstantScoreRangeQuery(visitedField, constantScoreRangeq.GetLowerVal(), constantScoreRangeq.GetUpperVal(), constantScoreRangeq.IncludesLower(), constantScoreRangeq.IncludesUpper());
 }
Esempio n. 5
0
 public override Query VisitConstantScoreRangeQuery(ConstantScoreRangeQuery constantScoreRangeq)
 {
     throw new NotSupportedException("Cannot compile ConstantScoreRangeQuery to SQL expression.");
 }
Esempio n. 6
0
 public override Query VisitConstantScoreRangeQuery(ConstantScoreRangeQuery constantScoreRangeq)
 {
     var q = (ConstantScoreRangeQuery)base.VisitConstantScoreRangeQuery(constantScoreRangeq);
     _dump.AppendFormat("ConstantScoreRangeQ({0}:{1}{2} TO {3}{4}{5})",
         q.GetField(), q.IncludesLower() ? "[" : "{",
         q.GetLowerVal(), q.GetUpperVal(), q.IncludesUpper() ? "]" : "}", BoostToString(q));
     return q;
 }