Is there someway in elasticsearch to adapt the following query so that it 
only produces unique results. For example I have the following data:

Name | Age | Height
--------------------
John | 10  | 4'6
John | 11  | 4'8
John | 12  | 4'10
John | 12  | 4'11
Adam | 12  | 4'12

I want to adjust the following query:

{
    "query": {
        "match_all": {}
     }, 
     "terms": {
        "field": "name"
     }
}

So that it returns the following:

Name | Age | Height
--------------------
John | 12  | 4'11
Adam | 12  | 4'12

Also, how can I adjust it to group by two fields?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/571309b4-05df-4a08-b90e-6a9cb115021f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to