-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Open
Labels
:Search Relevance/SearchCatch all for Search RelevanceCatch all for Search Relevance>bugTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineersA label for assessing bug priority to be used by ES engineers
Description
Elasticsearch version (bin/elasticsearch --version): v8.1.0, v7.16.2 and at least v7.15.1
Description of the problem including expected versus actual behavior:
Indexing a document with a missing date time value, then ascending sorting it with "missing": "_first" results in Field Year cannot be printed as the value -292275055 exceeds the maximum print width of 4 if it would be the only document returned, ie size: 1.
The formatter is trying to format the sentinel value of -9223372036854775808.
Steps to reproduce:
PUT test
{
"mappings" : {
"properties" : {
"field1" : {
"type" : "integer"
},
"dt" : {
"type" : "date",
"format" : "strict_date_time||strict_date_time_no_millis"
}
}
}
}
POST _bulk
{"index":{"_index":"test","_id":"1"}}
{"field1": 1243, "dt": "2021-12-20T23:14:20+00:00"}
{"index":{"_index":"test","_id":"2"}}
{"field2": 4567}
GET test/_search
{
"size": 1,
"query": {
"match_all": {}
},
"sort": [
{
"dt": {
"missing": "_first",
"order": "asc"
}
}
]
}
This is #73763 with targetNumericType == NumericType.DATE
Using "missing": 0 works around the issue.
DavidGoodwin, idobrodushniy, kislay98, HainPalaxo, DavidPalaxo and 2 more
Metadata
Metadata
Assignees
Labels
:Search Relevance/SearchCatch all for Search RelevanceCatch all for Search Relevance>bugTeam:Search RelevanceMeta label for the Search Relevance team in ElasticsearchMeta label for the Search Relevance team in Elasticsearchpriority:normalA label for assessing bug priority to be used by ES engineersA label for assessing bug priority to be used by ES engineers