# How to delete/drop the fields while the value matches a specific pattern?

**URL:** <https://discuss.elastic.co/t/how-to-delete-drop-the-fields-while-the-value-matches-a-specific-pattern/234937>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 29, 2020, 2:29pm UTC](https://discuss.elastic.co/t/how-to-delete-drop-the-fields-while-the-value-matches-a-specific-pattern/234937 "2020-05-29T14:29:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuo\_Hugo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kuo_hugo/32/1641_2.png) [@Kuo\_Hugo](https://discuss.elastic.co/u/Kuo_Hugo)\
**Post date:** [May 29, 2020, 2:29pm UTC](https://discuss.elastic.co/t/how-to-delete-drop-the-fields-while-the-value-matches-a-specific-pattern/234937/1 "2020-05-29T14:29:26Z")

</div>

I'm using dissect plugin to parse logs.

The log looks like this:

```auto
a b c d - f - h

```

The dissect is

```auto
%{f1} %{f2} %{f3} %{f4} %{f5} %{f6} %{f7}

```

So the **"f4": -**

I'm looking for a way to drop the field with **dash (-)** from the event. Any suggestion for doing this. The dash means empty value from my application so it can be ignored. I don't want elasticsearch to store empty indexes.

Thanks // Hugo

---

<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:** [June 26, 2020, 2:29pm UTC](https://discuss.elastic.co/t/how-to-delete-drop-the-fields-while-the-value-matches-a-specific-pattern/234937/2 "2020-06-26T14:29:31Z")

</div>

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