How to aggregate on the query results to receive only unique results?

This post was flagged by the community and is temporarily hidden.

Take a look at multi fields allowing you to index a single field from your JSON document in different ways in Elasticsearch, so you can pick whatever you want to use for each kind of query.

Note: I linked the 7.9 docs, you need to take a look at older documentation. Also 5.6 is EOL, so consider upgrading.