mirror of https://github.com/apache/lucene.git
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:
parent
6c32f48074
commit
901d7ca635
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue