# Logstash output-elasticsearch action "update" not work 4 me

**URL:** <https://discuss.elastic.co/t/logstash-output-elasticsearch-action-update-not-work-4-me/81799>\
**Category:** Logstash\
**Created:** [April 10, 2017, 10:17am UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-action-update-not-work-4-me/81799 "2017-04-10T10:17:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonyjames3212](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@tonyjames3212](https://discuss.elastic.co/u/tonyjames3212)\
**Post date:** [April 10, 2017, 10:17am UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-action-update-not-work-4-me/81799/1 "2017-04-10T10:17:18Z")

</div>

version:v5.3.0  
[https://www.elastic.co/guide/en/logstash/5.2/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-action](https://www.elastic.co/guide/en/logstash/5.2/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-action)  
And my out put:

```auto
    elasticsearch {                                                                                                                                    
      action => "update"                                                                                                                               
      document_id => "%{dep_id}"                                                                                                                       
      hosts => ["localhost:9200"]                                                                                                                     
      index => "department"                                                                                                                    
      doc_as_upsert => true                                                                                                                            
    } 

```

My data is from the table _ **department** _ of Postgres 9.5 using the plugin input-jdbc.  
The records can be indexed into ES.  
Then I changed the field "department\_name" of one record in PGSql,but no more update in ES?And there was no err/warning logs in logstash.

How should I change the configuration?  
Any way,it works if I change the "update" to "delete".But it indeed can not be updated.  
Any idea?

---

<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:** [May 8, 2017, 10:22am UTC](https://discuss.elastic.co/t/logstash-output-elasticsearch-action-update-not-work-4-me/81799/2 "2017-05-08T10:22:26Z")

</div>

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