add NaN handling for specific hit score as well
This commit is contained in:
parent
1fccaf06e9
commit
6194b3ab0f
|
@ -226,7 +226,11 @@ public class InternalSearchHit implements SearchHit {
|
|||
// builder.field("_node", shard.nodeId());
|
||||
builder.field("_type", type());
|
||||
builder.field("_id", id());
|
||||
builder.field("_score", score);
|
||||
if (Float.isNaN(score)) {
|
||||
builder.nullField("_score");
|
||||
} else {
|
||||
builder.field("_score", score);
|
||||
}
|
||||
if (source() != null) {
|
||||
if (XContentFactory.xContentType(source()) == builder.contentType()) {
|
||||
builder.rawField("_source", source());
|
||||
|
|
Loading…
Reference in New Issue