# Dissect filter - Empty data between delimiter: unexpected behavior

**URL:** https://discuss.elastic.co/t/dissect-filter-empty-data-between-delimiter-unexpected-behavior/223171
**Category:** Logstash
**Created:** [March 11, 2020, 3:31pm UTC](https://discuss.elastic.co/t/dissect-filter-empty-data-between-delimiter-unexpected-behavior/223171 "2020-03-11T15:31:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tvdruenen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tvdruenen/32/59035_2.png) [@tvdruenen](https://discuss.elastic.co/u/tvdruenen)
#### Post date: [March 11, 2020, 3:31pm UTC](https://discuss.elastic.co/t/dissect-filter-empty-data-between-delimiter-unexpected-behavior/223171/1 "2020-03-11T15:31:59Z")

</div>

[https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html#\_empty\_data\_between\_delimiters](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html#_empty_data_between_delimiters)

I have the following dissect config:

```
if "log" in [tags] {
  dissect {
    mapping => {
      "message" => "%{Accept_Encoding}|%{Accept_Language}|'%{Cipher_Version}'"
    }
  }
}

```

If I send:  
"gzip|en|'TLSv1.2'"

I'll get (as expected):

```
{
  "Accept_Encoding": "gzip",
  "Accept_Language": "en",
  "Cipher_Version": "TLSv1.2"
}

```

If I send:  
"gzip||TLSv1.2"

I'll get (as expected):

```
{
  "Accept_Encoding": "gzip",
  "Cipher_Version": "TLSv1.2"
}

```

But.. If I send:  
"|en|TLSv1.2"

So my message starts with a delimiter, my complete message is screwed up and enters Elasticsearch as something like:

```
{
  "Cipher_Version": "|en|TLSv1.2"
}

```

Is this expected behavior?

If so, it would be nice to add to the documentation that using the Logstash delimiter filter you must always be sure your first value is filled.

---

<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: [April 8, 2020, 3:31pm UTC](https://discuss.elastic.co/t/dissect-filter-empty-data-between-delimiter-unexpected-behavior/223171/2 "2020-04-08T15:31:59Z")

</div>

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