diff --git a/src/java/org/apache/lucene/search/FilteredQuery.java b/src/java/org/apache/lucene/search/FilteredQuery.java index d1c4852bd5b..92c005bbdcf 100644 --- a/src/java/org/apache/lucene/search/FilteredQuery.java +++ b/src/java/org/apache/lucene/search/FilteredQuery.java @@ -176,13 +176,13 @@ extends Query { public boolean equals(Object o) { if (o instanceof FilteredQuery) { FilteredQuery fq = (FilteredQuery) o; - return (query.equals(fq.query) && filter.equals(fq.filter)); + return (query.equals(fq.query) && filter.equals(fq.filter) && getBoost()==fq.getBoost()); } return false; } /** Returns a hash code value for this object. */ public int hashCode() { - return query.hashCode() ^ filter.hashCode(); + return query.hashCode() ^ filter.hashCode() + Float.floatToRawIntBits(getBoost()); } }