-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Open
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>bugTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra team
Description
Elasticsearch Version
7.17.12
Installed Plugins
No response
Java Version
bundled
OS Version
Linux aa933ae49f18 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
When trying to delete a field from an index, which contains an epoch_second
date field with a decimal number, an unexpected error occurs on the date field and the deletion doesn't happen.
Seems like in a certain scenario, ES does not recognise decimal numbers in the scientific notation it itself saves the data in.
Steps to Reproduce
PUT /test_ts
{
"mappings": {
"properties": {
"update_datetime" : {
"type" : "date",
"format" : "epoch_second"
},
"is_private" : {
"type" : "boolean"
}
}
}
}
POST test_ts/_doc/1
{
"update_datetime": 1716462600.37034
}
POST test_ts/_update_by_query
{
"script": {
"source": "ctx._source.remove('is_private');",
"lang": "painless"
}
}
Results in:
failed to parse field [update_datetime] of type [date] in document with id '1'. Preview of field's value: '1.71646260037034E9'
Strangely reindexing works fine with no errors:
POST _reindex
{
"source": {
"index": "test_ts"
},
"dest": {
"index": "test_ts_1"
}
}
Logs (if relevant)
No response
Metadata
Metadata
Assignees
Labels
:Core/Infra/ScriptingScripting abstractions, Painless, and MustacheScripting abstractions, Painless, and Mustache>bugTeam:Core/InfraMeta label for core/infra teamMeta label for core/infra team