public boolean insert(FieldDoc fdoc) { updateMaxScore(fdoc); return super.insert(fdoc); }
public boolean insert(FieldDoc fdoc) { updateMaxScore(fdoc); return super.insert(fdoc); }
public void run() { try { docs = (sort == null) ? searchable.search (query, filter, nDocs) : searchable.search (query, filter, nDocs, sort); } // Store the IOException for later use by the caller of this thread catch (IOException ioe) { this.ioe = ioe; } if (ioe == null) { // if we are sorting by fields, we need to tell the field sorted hit queue // the actual type of fields, in case the original list contained AUTO. // if the searchable returns null for fields, we'll have problems. if (sort != null) { ((FieldDocSortedHitQueue)hq).setFields (((TopFieldDocs)docs).fields); } ScoreDoc[] scoreDocs = docs.scoreDocs; for (int j = 0; j < scoreDocs.length; j++) { // merge scoreDocs into hq ScoreDoc scoreDoc = scoreDocs[j]; scoreDoc.doc += starts[i]; // convert doc //it would be so nice if we had a thread-safe insert synchronized (hq) { if (!hq.insert(scoreDoc)) break; } // no more scores > minScore } } }
public void run() { try { docs = (sort == null) ? searchable.search (weight, filter, nDocs) : searchable.search (weight, filter, nDocs, sort); } // Store the IOException for later use by the caller of this thread catch (IOException ioe) { this.ioe = ioe; } if (ioe == null) { // if we are sorting by fields, we need to tell the field sorted hit queue // the actual type of fields, in case the original list contained AUTO. // if the searchable returns null for fields, we'll have problems. if (sort != null) { ((FieldDocSortedHitQueue)hq).setFields (((TopFieldDocs)docs).fields); } ScoreDoc[] scoreDocs = docs.scoreDocs; for (int j = 0; j < scoreDocs.length; j++) { // merge scoreDocs into hq ScoreDoc scoreDoc = scoreDocs[j]; scoreDoc.doc += starts[i]; // convert doc //it would be so nice if we had a thread-safe insert synchronized (hq) { if (!hq.insert(scoreDoc)) break; } // no more scores > minScore } } }
public void run() { try { docs = (sort == null) ? searchable.search (weight, filter, nDocs) : searchable.search (weight, filter, nDocs, sort); } // Store the IOException for later use by the caller of this thread catch (IOException ioe) { this.ioe = ioe; } if (ioe == null) { // if we are sorting by fields, we need to tell the field sorted hit queue // the actual type of fields, in case the original list contained AUTO. // if the searchable returns null for fields, we'll have problems. if (sort != null) { ((FieldDocSortedHitQueue)hq).setFields (((TopFieldDocs)docs).fields); } ScoreDoc[] scoreDocs = docs.scoreDocs; for (int j = 0; j < scoreDocs.length; j++) { // merge scoreDocs into hq ScoreDoc scoreDoc = scoreDocs[j]; scoreDoc.doc += starts[i]; // convert doc //it would be so nice if we had a thread-safe insert synchronized (hq) { if (!hq.insert(scoreDoc)) break; } // no more scores > minScore } } }