lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r467559 - /lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java
Date Wed, 25 Oct 2006 04:24:11 GMT
Author: yonik
Date: Tue Oct 24 21:24:10 2006
New Revision: 467559

URL: http://svn.apache.org/viewvc?view=rev&rev=467559
Log:
factor boost into hashCode and equals to pass generic tests: LUCENE-698

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java?view=diff&rev=467559&r1=467558&r2=467559
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java Tue Oct 24 21:24:10
2006
@@ -176,13 +176,13 @@
   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());
   }
 }



Mime
View raw message