-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ascending sort with missing _first
fails on datefields with missing values
#81960
Comments
Pinging @elastic/es-search (Team:Search) |
Additional details about the issue, since I faced the same problem ⬇️ TLDR
Workaround
Platforms My conclusion 🐛
Details 🔍 Then, ES will try to format these datetime to return it in This is the log I have in my ES docker container ⬇️ (what is interesting though, is that in version
|
Hi @stu-elastic @kpollich , do we have plan to fix this issue? Or related PR has already fixed it? Thanks. |
+1 on this one, still happens in 8.8.2. |
Users might apply any of |
I have tried in the latest version of Elasticsearch, and it sorts just fine, where the doc with the malformed value is populated to the top.
Now, adjusting the request, I do get an error, but it sort of makes sense to me...
You are trying to format the smallest possible date time and it just fails. Maybe I don't know the desired behavior here. Should it just pick the smallest date that fits the format? |
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Elasticsearch version (
bin/elasticsearch --version
): v8.1.0, v7.16.2 and at least v7.15.1Description 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 inField Year cannot be printed as the value -292275055 exceeds the maximum print width of 4
if it would be the only document returned, iesize: 1
.The formatter is trying to format the sentinel value of
-9223372036854775808
.Steps to reproduce:
This is #73763 with
targetNumericType == NumericType.DATE
Using
"missing": 0
works around the issue.The text was updated successfully, but these errors were encountered: