# Logstash sending same message to multiple indexes in ES

**URL:** <https://discuss.elastic.co/t/logstash-sending-same-message-to-multiple-indexes-in-es/92464>\
**Category:** Logstash\
**Created:** [July 10, 2017, 12:18pm UTC](https://discuss.elastic.co/t/logstash-sending-same-message-to-multiple-indexes-in-es/92464 "2017-07-10T12:18:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 12, 2017, 12:29pm UTC](https://discuss.elastic.co/t/logstash-sending-same-message-to-multiple-indexes-in-es/92464/2 "2017-07-12T12:29:35Z")

</div>

> ```
> if [type] == "app1_app_log" or "app1_web_log" {
> 
> ```

This doesn't mean what you think it means. Use either

```
if [type] in ["app1_app_log", "app1_web_log"] {

```

or

```
if [type] == "app1_app_log" or [type] == "app1_web_log" {

```

instead.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-sending-same-message-to-multiple-indexes-in-es/92464)._
