# Update by query, field.keyword doens't updated!

**URL:** <https://discuss.elastic.co/t/update-by-query-field-keyword-doenst-updated/138597>\
**Category:** Elasticsearch\
**Created:** [July 4, 2018, 4:47pm UTC](https://discuss.elastic.co/t/update-by-query-field-keyword-doenst-updated/138597 "2018-07-04T16:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedrotcm](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@pedrotcm](https://discuss.elastic.co/u/pedrotcm)\
**Post date:** [July 4, 2018, 4:47pm UTC](https://discuss.elastic.co/t/update-by-query-field-keyword-doenst-updated/138597/1 "2018-07-04T16:47:56Z")

</div>

I made an update by query and my field `props.eventTypeTraduction`, however the `props.eventTypeTraductio.keyword` with the old value still exists. If you execute a query with the old value it still keeps bringing the records. How do I update the `props.eventTypeTraductio.keyword`?

I executed:  
`POST /dash_raw_measurement_discarded/_update_by_query { "query": { "term": { "props.eventTypeTraduction.keyword": { "value": "Jitter (SCM7)" } } }, "script": { "inline": "ctx._source[params.field] = params.value;", "params": { "field": "props.eventTypeTraduction", "value": "Jitter" } } }`

But when I look for the old value, it still exists in the keyword.  
`GET /dash_raw_measurement_discarded/_search { "query": { "term": { "props.eventTypeTraduction.keyword": { "value": "Jitter (SCM7)" } } } }`  
Result:  
`{ "took": 3, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 31080, "max_score": 0.8503687,`

---

<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:** [August 1, 2018, 4:47pm UTC](https://discuss.elastic.co/t/update-by-query-field-keyword-doenst-updated/138597/2 "2018-08-01T16:47:57Z")

</div>

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