# Removing duplications in output block

**URL:** <https://discuss.elastic.co/t/removing-duplications-in-output-block/91549>\
**Category:** Logstash\
**Created:** [July 2, 2017, 10:18am UTC](https://discuss.elastic.co/t/removing-duplications-in-output-block/91549 "2017-07-02T10:18:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 3, 2017, 6:18am UTC](https://discuss.elastic.co/t/removing-duplications-in-output-block/91549/2 "2017-07-03T06:18:30Z")

</div>

As the only thing that differs is the index prefix, you can set the index prefix in a metadata parameter in the index block and then reference this in a single output as described [in this post](https://discuss.elastic.co/t/syntactic-error-on-logstash-config/91466/2). This means that you only need one elasticsearch output irrespective of index name, which in addition to clean up the configuration also can improve performance as a batch only will result in a single, larger bulk request.

---

_[View the full topic](https://discuss.elastic.co/t/removing-duplications-in-output-block/91549)._
