I want to get the exact distinct count and the docs in query

Cardinality aggregations in Elasticsearch are always an approximation. Have a look at this thread for discussion on the topic.