Apache Solr open-source search software
Correct BooleanQuery.equals such that every clause is compared
Erik Hatcherf14428eef432
diff --git a/src/java/org/apache/lucene/search/BooleanQuery.java b/src/java/org/apache/lucene/search/BooleanQuery.javaindex 1d5af9ac124..c755fa12d9b 100644--- a/src/java/org/apache/lucene/search/BooleanQuery.java+++ b/src/java/org/apache/lucene/search/BooleanQuery.java@@ -18,6 +18,8 @@ package org.apache.lucene.search;import java.io.IOException;import java.util.Vector;+import java.util.Arrays;+import org.apache.lucene.index.IndexReader;/** A Query that matches documents matching boolean combinations of other@@ -403,7 +405,7 @@ public class BooleanQuery extends Query {return false;BooleanQuery other = (BooleanQuery)o;return (this.getBoost() == other.getBoost())- && this.clauses.equals(other.clauses);+ && Arrays.equals(this.getClauses(), other.getClauses());}/** Returns a hash code value for this object.*/