Error updating field name that starts with a number

I created a field starting with an integer, eg. tasks:{ "4ujdedufh":{}}. I created this using the Kibana platform and it worked fine.

The problem is, I tried updating this field using the JS API(node js):
"ctx._source.filters.tasks.4ujdedufh.firstname = 'jake'"

But I get an error, stating that "illegal argument exception ".
The interesting thing is when I change "4ujdedufh" to "Eujdedufh" it works fine.

I realized, I also get the same error whenever I start the field name with any number.
I was wondering what causes this error in elasticsearch, and if there is any way around it?

Example of the code I used is below:
esClient
.update({
index: elasticIndex,
id: info.userId,
type: info.testId,
body: {
script: {
inline: "ctx._source.filters.tasks.4ujdedufh.firstname = 'jake'",
lang: "painless"
}
}
})

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.