This is similar to the question I asked last week.
https://groups.google.com/forum/#!topic/elasticsearch/w4C1m1u55FA
On Tuesday, May 27, 2014 12:39:22 AM UTC-4, John wrote:
>
> 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/b1ebc645-610f-4f66-a572-01e7e5cbb597%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.