mirror of https://github.com/apache/lucene.git
Fix test failure because of wrong cast. Hard stuff :( Could be implemented better, the hq is used for 2 different types
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@828024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
33be3177a1
commit
bede45aaa3
|
@ -199,7 +199,7 @@ class MultiSearcherThread extends Thread {
|
||||||
private int nDocs;
|
private int nDocs;
|
||||||
private TopDocs docs;
|
private TopDocs docs;
|
||||||
private int i;
|
private int i;
|
||||||
private PriorityQueue<?> hq;
|
private PriorityQueue<? extends ScoreDoc> hq;
|
||||||
private int[] starts;
|
private int[] starts;
|
||||||
private IOException ioe;
|
private IOException ioe;
|
||||||
private Sort sort;
|
private Sort sort;
|
||||||
|
@ -230,6 +230,7 @@ class MultiSearcherThread extends Thread {
|
||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings ("unchecked")
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
docs = (sort == null) ? searchable.search (weight, filter, nDocs)
|
docs = (sort == null) ? searchable.search (weight, filter, nDocs)
|
||||||
|
@ -266,7 +267,7 @@ class MultiSearcherThread extends Thread {
|
||||||
scoreDoc.doc += starts[i]; // convert doc
|
scoreDoc.doc += starts[i]; // convert doc
|
||||||
//it would be so nice if we had a thread-safe insert
|
//it would be so nice if we had a thread-safe insert
|
||||||
synchronized (hq) {
|
synchronized (hq) {
|
||||||
if (scoreDoc == ((HitQueue) hq).insertWithOverflow(scoreDoc))
|
if (scoreDoc == ((PriorityQueue<ScoreDoc>) hq).insertWithOverflow(scoreDoc))
|
||||||
break;
|
break;
|
||||||
} // no more scores > minScore
|
} // no more scores > minScore
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue