# Does Dissect's mapping able to match multiple pattern?

**URL:** <https://discuss.elastic.co/t/does-dissects-mapping-able-to-match-multiple-pattern/220259>\
**Category:** Logstash\
**Created:** [February 20, 2020, 7:40pm UTC](https://discuss.elastic.co/t/does-dissects-mapping-able-to-match-multiple-pattern/220259 "2020-02-20T19:40:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhammad\_Ariful\_Isla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muhammad_ariful_isla/32/55732_2.png) [@Muhammad\_Ariful\_Isla](https://discuss.elastic.co/u/Muhammad_Ariful_Isla)\
**Post date:** [February 20, 2020, 7:40pm UTC](https://discuss.elastic.co/t/does-dissects-mapping-able-to-match-multiple-pattern/220259/1 "2020-02-20T19:40:27Z")

</div>

As my log have multiple pattern I need to use multiple dissect pattern so that if one pattern fails to recognize the log other can capture. Following pseudo configuration works,

```
"message" => "pattern1"

```

Or

```
"message" => "pattern2"

```

But following configuration is not working,

```
"message" => ["pattern1", "pattern2"]

```

Does dissect support these kinds of match?

I saw something like this on @Christian_Dahlqvist’s answer on the following link,

> <https://github.com/logstash-plugins/logstash-filter-dissect/issues/56#issuecomment-384229224>
>
> There are a few drivers for this.
> People are familiar with this from Grok.
> Beats and Ingest Node would like support Dissect style...

Especially in the following part,

```auto
dissect {
 break_on_match => true
 mapping => {
   "message" => [
     "%{ts->} %{+ts} %{+ts} %{host} %{command}(pam_unix)[%{pid}]: %{action} %{+action} for user %{user} by (uid=%{uid})%{}",
     "%{ts->} %{+ts} %{+ts} %{host} %{command}(pam_unix)[%{pid}]: %{action} %{+action} for user %{user}",
     "%{ts->} %{+ts} %{+ts} %{host} %{command}(pam_unix)[%{pid}]: %{action} %{+action}; %{params}"
 }
}

```

---

<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:** [February 21, 2020, 3:15pm UTC](https://discuss.elastic.co/t/does-dissects-mapping-able-to-match-multiple-pattern/220259/2 "2020-02-21T15:15:57Z")

</div>

> [@Muhammad\_Ariful\_Isla](#):
>
> Does dissect support these kinds of match?

No, it does not. The issue you linked to is a suggestion for a possible modification to the design of the filter, it has not been implemented.

---

<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:** [March 20, 2020, 3:29pm UTC](https://discuss.elastic.co/t/does-dissects-mapping-able-to-match-multiple-pattern/220259/3 "2020-03-20T15:29:02Z")

</div>

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