Appending data in Elasticsearch indexes

I have 2 servers where Elasticsearch Indexes are stored with same index name but different data on both the indexes, now there is requirement of putting that data into one server, so I want to append the data of both the indexes(present on 2 different servers) into single index, how i can do that.
Currently, I am using this configuration for appending the data.

input {
elasticsearch {
hosts => "server1:9200"
index => "logstash-2015.12.16"
}
}
filter {
mutate {
remove_field => [ "@version", "@timestamp" ]
}
}
output {
elasticsearch {
host => "localhost"
port => 9200
protocol => "http"
manage_template => false
index => "logstash-2015.12.16"
}
}

Does that not work?

No, it does not work

Why does it not work?

Logstash shows the error of connection refused
I tried after opening all ports and public access to elasticsearch was given

Providing the error would be helpful.

Apologies for the very late reply.
The above configuration is working fine.