mirror of https://github.com/apache/lucene.git
LUCENE-1784: make Weight impls for BooleanQuery & DisjunctionMaxQuery protected to permit expert subclassing
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@802825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08c69caca6
commit
7b9856b7d2
|
@ -172,8 +172,18 @@ public class BooleanQuery extends Query {
|
|||
/** Returns the list of clauses in this query. */
|
||||
public List clauses() { return clauses; }
|
||||
|
||||
private class BooleanWeight extends QueryWeight {
|
||||
/**
|
||||
* Expert: the Weight for BooleanQuery, used to
|
||||
* normalize, score and explain these queries.
|
||||
*
|
||||
* <p>NOTE: this API and implementation is subject to
|
||||
* change suddenly in the next release.</p>
|
||||
*/
|
||||
protected class BooleanWeight extends QueryWeight {
|
||||
/** The Similarity implementation. */
|
||||
protected Similarity similarity;
|
||||
|
||||
/** The Weights for our subqueries, in 1-1 correspondence with clauses */
|
||||
protected ArrayList weights;
|
||||
|
||||
public BooleanWeight(Searcher searcher)
|
||||
|
|
|
@ -85,11 +85,19 @@ public class DisjunctionMaxQuery extends Query {
|
|||
return disjuncts.iterator();
|
||||
}
|
||||
|
||||
/* The Weight for DisjunctionMaxQuery's, used to normalize, score and explain these queries */
|
||||
private class DisjunctionMaxWeight extends QueryWeight {
|
||||
/**
|
||||
* Expert: the Weight for DisjunctionMaxQuery, used to
|
||||
* normalize, score and explain these queries.
|
||||
*
|
||||
* <p>NOTE: this API and implementation is subject to
|
||||
* change suddenly in the next release.</p>
|
||||
*/
|
||||
protected class DisjunctionMaxWeight extends QueryWeight {
|
||||
/** The Similarity implementation. */
|
||||
protected Similarity similarity;
|
||||
|
||||
private Similarity similarity; // The similarity which we are associated.
|
||||
private ArrayList weights = new ArrayList(); // The Weight's for our subqueries, in 1-1 correspondence with disjuncts
|
||||
/** The Weights for our subqueries, in 1-1 correspondence with disjuncts */
|
||||
protected ArrayList weights = new ArrayList();
|
||||
|
||||
/* Construct the Weight for this Query searched by searcher. Recursively construct subquery weights. */
|
||||
public DisjunctionMaxWeight(Searcher searcher) throws IOException {
|
||||
|
|
Loading…
Reference in New Issue