# Cannot start field with “0”

**URL:** <https://discuss.elastic.co/t/cannot-start-field-with-0/144650>\
**Category:** Elasticsearch\
**Created:** [August 16, 2018, 7:57am UTC](https://discuss.elastic.co/t/cannot-start-field-with-0/144650 "2018-08-16T07:57:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jianwei](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jianwei](https://discuss.elastic.co/u/jianwei)\
**Post date:** [August 16, 2018, 7:57am UTC](https://discuss.elastic.co/t/cannot-start-field-with-0/144650/1 "2018-08-16T07:57:55Z")

</div>

![222](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d61d893cf7a7bf2fd9e1d79568e5eefe42c3e18f.png) ![003](https://us1.discourse-cdn.com/elastic/original/3X/1/2/12e3ac08d6ca43f59c65d873a46ea0a562b61aff.png)

003 and 222 are keyword type。

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [August 17, 2018, 3:50pm UTC](https://discuss.elastic.co/t/cannot-start-field-with-0/144650/2 "2018-08-17T15:50:41Z")

</div>

Field names that start with `0` will clash with the way painless parses map keys. You might have better luck by switching to `map[key]` syntax for that:

```auto
{
  "script": {
    "lang": "painless",
    "source": "ctx._source['003'] = params['003']",
    "params": {
      "003": "33"
    }
  }
}

```

---

<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:** [September 14, 2018, 3:50pm UTC](https://discuss.elastic.co/t/cannot-start-field-with-0/144650/3 "2018-09-14T15:50:42Z")

</div>

Closed on September 14, 2018, 3:50pm UTC

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