# Error updating field name that starts with a number

**URL:** <https://discuss.elastic.co/t/error-updating-field-name-that-starts-with-a-number/164835>\
**Category:** Elasticsearch\
**Created:** [January 18, 2019, 4:52pm UTC](https://discuss.elastic.co/t/error-updating-field-name-that-starts-with-a-number/164835 "2019-01-18T16:52:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KBoohene](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@KBoohene](https://discuss.elastic.co/u/KBoohene)\
**Post date:** [January 18, 2019, 4:52pm UTC](https://discuss.elastic.co/t/error-updating-field-name-that-starts-with-a-number/164835/1 "2019-01-18T16:52:59Z")

</div>

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"  
}  
}  
})

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 15, 2019, 4:52pm UTC](https://discuss.elastic.co/t/error-updating-field-name-that-starts-with-a-number/164835/2 "2019-02-15T16:52:59Z")

</div>

Closed on February 15, 2019, 4:52pm UTC

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