max_score == NaN, closes #263.
This commit is contained in:
parent
3006183191
commit
e61dc78c21
|
@ -2,10 +2,12 @@
|
|||
<dictionary name="kimchy">
|
||||
<words>
|
||||
<w>addr</w>
|
||||
<w>amazonaws</w>
|
||||
<w>appendable</w>
|
||||
<w>args</w>
|
||||
<w>asciifolding</w>
|
||||
<w>attr</w>
|
||||
<w>auth</w>
|
||||
<w>banon</w>
|
||||
<w>bindhost</w>
|
||||
<w>birthdate</w>
|
||||
|
|
|
@ -98,7 +98,11 @@ public class InternalSearchHits implements SearchHits {
|
|||
@Override public void toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.startObject("hits");
|
||||
builder.field("total", totalHits);
|
||||
if (Float.isNaN(maxScore)) {
|
||||
builder.nullField("max_score");
|
||||
} else {
|
||||
builder.field("max_score", maxScore);
|
||||
}
|
||||
builder.field("hits");
|
||||
builder.startArray();
|
||||
for (SearchHit hit : hits) {
|
||||
|
|
Loading…
Reference in New Issue