# How to avoid storing original xml when using the XML filter

**URL:** https://discuss.elastic.co/t/how-to-avoid-storing-original-xml-when-using-the-xml-filter/154091
**Category:** Logstash
**Created:** [October 26, 2018, 4:45am UTC](https://discuss.elastic.co/t/how-to-avoid-storing-original-xml-when-using-the-xml-filter/154091 "2018-10-26T04:45:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anp](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@anp](https://discuss.elastic.co/u/anp)
#### Post date: [October 26, 2018, 4:45am UTC](https://discuss.elastic.co/t/how-to-avoid-storing-original-xml-when-using-the-xml-filter/154091/1 "2018-10-26T04:45:43Z")

</div>

I have defined this XML filter:  
xml {  
source =\> "xml\_descriptors"  
target =\> "json\_descriptors"  
force\_array =\> false  
}

With the above my ES index contains both the original xml\_descriptors (as XML) and the transformed json\_descriptors (as JSON).

If I set store\_xml =\> false then nothing gets stored in the index.

How can I just store json\_descriptors and completely omit xml\_descriptors from the index?

---

<div class="post-metadata">

### Author: ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)
#### Post date: [October 26, 2018, 5:46am UTC](https://discuss.elastic.co/t/how-to-avoid-storing-original-xml-when-using-the-xml-filter/154091/2 "2018-10-26T05:46:25Z")

</div>

you can use below code, hope this works,

mutate {  
remove\_field =\> ["xml\_descriptors"]  
}

---

<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: [November 23, 2018, 5:46am UTC](https://discuss.elastic.co/t/how-to-avoid-storing-original-xml-when-using-the-xml-filter/154091/3 "2018-11-23T05:46:32Z")

</div>

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