Fastest query for returning 1 result for each term

I have an index of tweets where each document has a URL, text and 1 or more
tags.

A terms facet on tags gets produces the top 20 most popular tags - this is
great.

In a second query, for each of these 20 distinct tags, I'd like to pull out
a sample document (doesn't matter which one).

Is this possible within a single query or does it need multi-search?

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

IMHO, multisearch is the way to go.

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 10 mai 2013 à 00:00, Nariman Haghighi auspicious@gmail.com a écrit :

I have an index of tweets where each document has a URL, text and 1 or more tags.

A terms facet on tags gets produces the top 20 most popular tags - this is great.

In a second query, for each of these 20 distinct tags, I'd like to pull out a sample document (doesn't matter which one).

Is this possible within a single query or does it need multi-search?

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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.