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

            if (this.GetBoost() != other.GetBoost())
            {
                return(false);
            }
            if (this.clauses.Count != other.clauses.Count)
            {
                return(false);
            }
            for (int i = 0; i < this.clauses.Count; i++)
            {
                if (this.clauses[i].Equals(other.clauses[i]) == false)
                {
                    return(false);
                }
            }
            return(this.GetMinimumNumberShouldMatch() == other.GetMinimumNumberShouldMatch());
        }
Beispiel #2
0
        /// <summary>Returns true iff <code>o</code> is equal to this. </summary>
        public override bool Equals(System.Object o)
        {
            if (!(o is BooleanQuery))
            {
                return(false);
            }
            BooleanQuery other = (BooleanQuery)o;

            return((this.GetBoost() == other.GetBoost()) &&
                   this.clauses.Equals(other.clauses) &&
                   this.GetMinimumNumberShouldMatch() == other.GetMinimumNumberShouldMatch() &&
                   this.disableCoord == other.disableCoord);
        }