Multiple inputs and outputs in logstash conf file

logstash is getting data using filebeat. Below is my output file. mitrologs index is getting created but not the others.

output {
if "scheduledwork" in [tags] {
elasticsearch {
hosts => ["http://10.238.114.142:9200"]
index => "scheduledwork-%{+YYYY-MM-dd}"
}
}
if "emitroLog" in [tags] {
elasticsearch {
hosts => ["http://10.238.114.142:9200"]
index => "emitrolog-%{+YYYY-MM-dd}"
document_type => "_doc"
}
}
else {
elasticsearch {
hosts => "10.238.114.142:9200"
index => "mitrologs-%{+YYYY.MM.dd}"
}
}
stdout { codec => rubydebug }
}