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 mi...@apache.org on 2009/08/10 17:29:55 UTC
svn commit: r802825 - in
/lucene/java/trunk/src/java/org/apache/lucene/search: BooleanQuery.java
DisjunctionMaxQuery.java
Author: mikemccand
Date: Mon Aug 10 15:29:55 2009
New Revision: 802825
URL: http://svn.apache.org/viewvc?rev=802825&view=rev
Log:
LUCENE-1784: make Weight impls for BooleanQuery & DisjunctionMaxQuery protected to permit expert subclassing
Modified:
lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java
lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
Modified: lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java?rev=802825&r1=802824&r2=802825&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java Mon Aug 10 15:29:55 2009
@@ -172,8 +172,18 @@
/** 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)
Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java?rev=802825&r1=802824&r2=802825&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 Mon Aug 10 15:29:55 2009
@@ -85,11 +85,19 @@
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 {