SOLR-5974: Remove ShardDoc.score and use parent's ScoreDoc.score

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1588580 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Ernst 2014-04-18 22:10:26 +00:00
parent 4df4a1c902
commit 2af485f151
3 changed files with 4 additions and 5 deletions

View File

@ -122,6 +122,9 @@ Other Changes
* SOLR-3862: Add remove" as update option for atomically removing a value
from a multivalued field (Jim Musli, Steven Bower, Alaknantha via Erick Erickson)
* SOLR-5974: Remove ShardDoc.score and use parent's ScoreDoc.score.
(Tomás Fernández Löbbe via Ryan Ernst)
================== 4.8.0 ==================
Versions of Major Components

View File

@ -1025,7 +1025,6 @@ public class QueryComponent extends SearchComponent
List<Object> nextCursorMarkValues = new ArrayList<>(sortFields.length);
for (SortField sf : sortFields) {
if (sf.getType().equals(SortField.Type.SCORE)) {
assert null != lastDoc.score : "lastDoc has null score";
nextCursorMarkValues.add(lastDoc.score);
} else {
assert null != sf.getField() : "SortField has null field";
@ -1152,7 +1151,7 @@ public class QueryComponent extends SearchComponent
Object id = doc.getFieldValue(keyFieldName);
ShardDoc sdoc = rb.resultIds.get(id.toString());
if (sdoc != null) {
if (returnScores && sdoc.score != null) {
if (returnScores) {
doc.setField("score", sdoc.score);
}
if (removeKeyField) {

View File

@ -23,7 +23,6 @@ import org.apache.lucene.search.SortField;
import org.apache.lucene.util.PriorityQueue;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.search.SolrIndexSearcher;
import java.io.IOException;
import java.util.ArrayList;
@ -45,8 +44,6 @@ public class ShardDoc extends FieldDoc {
// this is currently the uniqueKeyField but
// may be replaced with internal docid in a future release.
Float score;
NamedList sortFieldValues;
// sort field values for *all* docs in a particular shard.
// this doc's values are in position orderInShard