# Push\_previous\_map\_as\_event if fields exist

**URL:** https://discuss.elastic.co/t/push-previous-map-as-event-if-fields-exist/250566
**Category:** Logstash
**Created:** [September 30, 2020, 9:08pm UTC](https://discuss.elastic.co/t/push-previous-map-as-event-if-fields-exist/250566 "2020-09-30T21:08:24Z")
**Posts on this page:** 1
**Showing post:** 8

<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: [October 1, 2020, 9:46pm UTC](https://discuss.elastic.co/t/push-previous-map-as-event-if-fields-exist/250566/8 "2020-10-01T21:46:34Z")

</div>

It is certainly possible to have two aggregate filters in a pipeline. An example [here](https://discuss.elastic.co/t/aggregate-filter-push-on-event-size-limit/180875/2) shows how to join events together into aggregate events with a size limit.

However, the documentation says "all timeout options have to be defined in only one aggregate filter per task\_id pattern (per pipeline)". I am wondering if that implies per task\_id pattern and per pipeline are equivalent or whether it is saying that in each pipeline you can only have one aggregate with timeout options for each task\_id pattern.

If you cannot get it to work then you could try using pipeline to pipeline communication with a [forked path](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#forked-path-pattern) pattern. Possibly later using a [collector pattern](https://www.elastic.co/guide/en/logstash/current/pipeline-to-pipeline.html#collector-pattern) if you want a common output, or have common processing after the aggregation.

---

_[View the full topic](https://discuss.elastic.co/t/push-previous-map-as-event-if-fields-exist/250566)._
