Count unique visitors via elasticsearch

Hi guys. I’ve a grafana installation which is connected to Elasticsearch. Nginx’s access log is being written into index. I need to create a graf which would show unique users count based on those logs. For now I’ve no idea about query I should use…
Here’s how I count successfull login requests
request : index.html AND status : 200
But how do I male grafana to count uniqueness ?