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/06/13 21:45:56 UTC
svn commit: r413965 - in /lucene/java/trunk: CHANGES.txt
src/java/org/apache/lucene/search/MatchAllDocsQuery.java
Author: yonik
Date: Tue Jun 13 12:45:55 2006
New Revision: 413965
URL: http://svn.apache.org/viewvc?rev=413965&view=rev
Log:
remove searcher reference from MatchAllDocsQuery so it's Serializable
Modified:
lucene/java/trunk/CHANGES.txt
lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=413965&r1=413964&r2=413965&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Tue Jun 13 12:45:55 2006
@@ -35,6 +35,8 @@
4. LUCENE-587: Explanation.toHtml was producing malformed HTML
(Chris Hostetter)
+
+ 5. Fix to allow MatchAllDocsQuery to be used with RemoteSearcher (Yonik Seeley)
Optimizations
Modified: lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java?rev=413965&r1=413964&r2=413965&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java Tue Jun 13 12:45:55 2006
@@ -82,12 +82,12 @@
}
private class MatchAllDocsWeight implements Weight {
- private Searcher searcher;
+ private Similarity similarity;
private float queryWeight;
private float queryNorm;
public MatchAllDocsWeight(Searcher searcher) {
- this.searcher = searcher;
+ this.similarity = searcher.getSimilarity();
}
public String toString() {
@@ -113,7 +113,7 @@
}
public Scorer scorer(IndexReader reader) {
- return new MatchAllScorer(reader, getSimilarity(searcher), this);
+ return new MatchAllScorer(reader, similarity, this);
}
public Explanation explain(IndexReader reader, int doc) {