remove searcher reference from MatchAllDocsQuery so it's Serializable

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@413965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2006-06-13 19:45:55 +00:00
parent e4ffe0679e
commit 025936b4ae
2 changed files with 5 additions and 3 deletions

View File

@ -35,6 +35,8 @@ Bug fixes
4. LUCENE-587: Explanation.toHtml was producing malformed HTML
(Chris Hostetter)
5. Fix to allow MatchAllDocsQuery to be used with RemoteSearcher (Yonik Seeley)
Optimizations

View File

@ -82,12 +82,12 @@ public class MatchAllDocsQuery extends Query {
}
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 class MatchAllDocsQuery extends Query {
}
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) {