added missing extractTerms() to DisjunctionMaxQuery: LUCENE-541

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@391897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-04-06 04:16:36 +00:00
parent 6c32f48074
commit 901d7ca635
2 changed files with 13 additions and 0 deletions

View File

@ -38,6 +38,9 @@ Bug fixes
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

View File

@ -22,6 +22,7 @@ import java.io.IOException;
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
@ -193,6 +194,15 @@ public class DisjunctionMaxQuery extends Query {
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
* @return a string that shows what we do, of the form "(disjunct1 | disjunct2 | ... | disjunctn)^boost"