Logstash not able to read data from elasticsearch

I've found the solution for this problem when i ran logstash in debug mode and analysed its logs, looks like if you don't mention any index in input plugin for elastic search, it takes a default index of "logstash-*". However in my case the index was 77777. I modified my conf file and it solved the problem.

input {

Read all documents from Elasticsearch matching the given query

elasticsearch {
hosts => "localhost:9200"
index => "77777"
query => '{ "query": { "match": { "func_name": "MPMComponentAudioStopDecodingReal" } }, "sort": [ "_doc" ] }'
}
}

output {
stdout { codec => rubydebug }
}