mirror of
https://github.com/apache/lucene.git
synced 2025-02-06 10:08:58 +00:00
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:
parent
e4ffe0679e
commit
025936b4ae
@ -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
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user