# Dissect processor before multiline parser

**URL:** <https://discuss.elastic.co/t/dissect-processor-before-multiline-parser/378578>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 27, 2025, 10:07am UTC](https://discuss.elastic.co/t/dissect-processor-before-multiline-parser/378578 "2025-05-27T10:07:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dano\_Logos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dano_logos/32/140180_2.png) [@Dano\_Logos](https://discuss.elastic.co/u/Dano_Logos)\
**Post date:** [May 27, 2025, 10:07am UTC](https://discuss.elastic.co/t/dissect-processor-before-multiline-parser/378578/1 "2025-05-27T10:07:33Z")

</div>

Hello,  
I first want to filter prefixes from logs and then merge them into multiline. Currently you can do both as a single feature and also dissect after multiline, but you first can create multilines and then manipulate prefixes - the order is set.

```auto
  multiline.type: pattern
  multiline.pattern: '^.* \| \[[0-9]{4}-[0-9]{2}-[0-9]{2}'
  multiline.negate: true
  multiline.match: after

  processors:
    - dissect:
        tokenizer: "%{prefix} | %{message}"
        field: "message"
        target_prefix: ""

```

How would you currently handle it to get the reverse order?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [May 29, 2025, 1:10am UTC](https://discuss.elastic.co/t/dissect-processor-before-multiline-parser/378578/2 "2025-05-29T01:10:59Z")

</div>

You cannot change the order. Multiline aggregation is built into the input (like `log` or `filestream`), and processors are always run on the events emitted from the inputs.

The current design of processors doesn’t support aggregation, so we couldn’t move multiline into that stage. Processors follow a model of one event in and one event out, so this interface doesn’t allow aggregating multiple events into a single one.
