Elasticquery

That would help not spending time with wrong answers. Please do that next time.

It's always better to provide a full recreation script as described in About the Elasticsearch category. It helps to better understand what you are doing.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Anyway, you can run a terms aggregation and then a top_hits agg with size:1 in it.