mirror of https://github.com/apache/lucene.git
LUCENE-3471: move comment up
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1176479 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
09c2d563f1
commit
4915dcc3f3
|
@ -752,11 +752,11 @@ public class IndexSearcher implements Closeable {
|
|||
public TopDocs call() throws IOException {
|
||||
final TopDocs docs = searcher.search (slice.leaves, weight, filter, after, nDocs);
|
||||
final ScoreDoc[] scoreDocs = docs.scoreDocs;
|
||||
//it would be so nice if we had a thread-safe insert
|
||||
lock.lock();
|
||||
try {
|
||||
for (int j = 0; j < scoreDocs.length; j++) { // merge scoreDocs into hq
|
||||
final ScoreDoc scoreDoc = scoreDocs[j];
|
||||
//it would be so nice if we had a thread-safe insert
|
||||
if (scoreDoc == hq.insertWithOverflow(scoreDoc)) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue