You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by yo...@apache.org on 2006/04/06 06:16:40 UTC

svn commit: r391897 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/search/DisjunctionMaxQuery.java

Author: yonik
Date: Wed Apr  5 21:16:36 2006
New Revision: 391897

URL: http://svn.apache.org/viewcvs?rev=391897&view=rev
Log:
added missing extractTerms() to DisjunctionMaxQuery: LUCENE-541

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/CHANGES.txt?rev=391897&r1=391896&r2=391897&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Wed Apr  5 21:16:36 2006
@@ -38,6 +38,9 @@
     subsequent String sorts with different locales to sort identically.
     (Paul Cowan via Yonik Seeley)
 
+ 8. LUCENE-541: Add missing extractTerms() to DisjunctionMaxQuery
+    (Stefan Will via Yonik Seeley)
+
 1.9.1
 
 Bug fixes

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java?rev=391897&r1=391896&r2=391897&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java Wed Apr  5 21:16:36 2006
@@ -22,6 +22,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Collection;
+import java.util.Set;
 
 /**
  * A query that generates the union of the documents produced by its subqueries, and that scores each document as the maximum
@@ -192,6 +193,15 @@
     clone.disjuncts = (ArrayList)this.disjuncts.clone();
     return clone;
   }
+
+
+  // inherit javadoc
+  public void extractTerms(Set terms) {
+      for (int i = 0; i < disjuncts.size(); i++) {
+          ((Query)disjuncts.get(i)).extractTerms(terms);
+      }
+  }
+
 
   /** Prettyprint us.
    * @param field the field to which we are applied