Scripting: ctx._now is different when using Bulk API compared to Update API #45254
Labels
>bug
:Distributed Indexing/Distributed
A catch all label for anything in the Distributed Area. Please avoid if you can.
Elasticsearch version (
bin/elasticsearch --version
): 7.2.0Plugins installed: ["ingest-attachment", "analysis-icu"]
JVM version (
java -version
):openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)
OS version (
uname -a
if on a Unix-like system):Windows Server 2016 Datacenter, Windows Server 2012 Standard, Windows 10
Description of the problem including expected versus actual behavior:
When using the Bulk API, an update operation with a script that sets a field to the value of ctx._now seems to set a numeric value around 1 billion. When using the Update API directly, the value that gets set appears to be the expected milliseconds from Unix epoch time.
It is expected for the update through the bulk API to be the same as a direct update using the Update API.
Steps to reproduce:
Using Kibana to send the requests:
Using Update API:
Response of
GET test/_doc/1
:Bulk Request:
Response of
GET test/_doc/1
:Possibly related issues:
#23169
#23175
The text was updated successfully, but these errors were encountered: