Incomplete hostname list

I have connected to elasticsearch datasource and able to pull hostnames using templating. However, I’m unable to find a reason why it is not pulling whole list of hosts. I get a partial list of hostnames. I’m able to see all the hosts on kibana.
Is there a config in grafana that limits the amount of hosts it pulls?

yes, there is a default limit of 500, set "size": 10000 in your json templating query to set your own limit. This seems to be missing in the docs, so adding it now!