Beispiel #1
0
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            FuzzyLikeThisQuery other = (FuzzyLikeThisQuery)obj;

            if (analyzer == null)
            {
                if (other.analyzer != null)
                {
                    return(false);
                }
            }
            else if (!analyzer.Equals(other.analyzer))
            {
                return(false);
            }
            if (fieldVals == null)
            {
                if (other.fieldVals != null)
                {
                    return(false);
                }
            }
            else if (!fieldVals.Equals(other.fieldVals))
            {
                return(false);
            }
            if (ignoreTF != other.ignoreTF)
            {
                return(false);
            }
            if (maxNumTerms != other.maxNumTerms)
            {
                return(false);
            }
            return(true);
        }
Beispiel #2
0
        public override bool Equals(System.Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || GetType() != o.GetType())
            {
                return(false);
            }

            SpanOrQuery that = (SpanOrQuery)o;

            if (!clauses.Equals(that.clauses))
            {
                return(false);
            }
            if (!(clauses.Count == 0) && !field.Equals(that.field))
            {
                return(false);
            }

            return(Boost == that.Boost);
        }