# Don't override elasticsearch index with null values from logstash pipeline

**URL:** https://discuss.elastic.co/t/dont-override-elasticsearch-index-with-null-values-from-logstash-pipeline/357069
**Category:** Logstash
**Created:** [April 9, 2024, 12:57pm UTC](https://discuss.elastic.co/t/dont-override-elasticsearch-index-with-null-values-from-logstash-pipeline/357069 "2024-04-09T12:57:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Pedro\_Lopez\_Gonzalez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pedro_lopez_gonzalez/32/131886_2.png) [@Pedro\_Lopez\_Gonzalez](https://discuss.elastic.co/u/Pedro_Lopez_Gonzalez)
#### Post date: [April 9, 2024, 12:57pm UTC](https://discuss.elastic.co/t/dont-override-elasticsearch-index-with-null-values-from-logstash-pipeline/357069/1 "2024-04-09T12:57:45Z")

</div>

Hi All

Im updating an index in logstash pipeline,  
it's working right, but I need not override the fields with null values.

how can i do this?

That is my config

```auto
elasticsearch {
    hosts => ["HOST"]
    index => "index-test-%{+yyyy.MM.dd}"
    document_id => "%{[taskID]}"
    action => "update"
    doc_as_upsert => true 
}

```

Thanks

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [April 9, 2024, 3:34pm UTC](https://discuss.elastic.co/t/dont-override-elasticsearch-index-with-null-values-from-logstash-pipeline/357069/2 "2024-04-09T15:34:04Z")

</div>

> [@Pedro\_Lopez\_Gonzalez](#):
>
> it's working right, but I need not override the fields with null values

If you want to remove null fields from the event that you are upserting then you might be able to use the [blacklist\_values](https://www.elastic.co/guide/en/logstash/current/plugins-filters-prune.html#plugins-filters-prune-blacklist_values) option of a prune filter.
