Question on top hits aggregation

Hello

I need to use the top hits aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html
for a grouping feature. The aggregation should be applied on nested fields.

e.g. My nested field is F with path P.

Would appreciate it if someone can share an example to create a top hits
aggregation query for this scenario.

Thanks !

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1fedd65a-c7af-407b-a1db-cd1e5c0918d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

In that case you would need to wrap a terms agg in a nested aggregation
(with the desired path) and a top_hits inside that terms aggregation.
Unfortunately the top_hits aggregation doesn't yet work inside a nested
aggregation. However work is being done that will add this support:

Martijn

On 14 September 2014 20:45, AgentV coder.agentv@gmail.com wrote:

Hello

I need to use the top hits aggregation
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregation.html
for a grouping feature. The aggregation should be applied on nested fields.

e.g. My nested field is F with path P.

Would appreciate it if someone can share an example to create a top hits
aggregation query for this scenario.

Thanks !

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/1fedd65a-c7af-407b-a1db-cd1e5c0918d7%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/1fedd65a-c7af-407b-a1db-cd1e5c0918d7%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Met vriendelijke groet,

Martijn van Groningen

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CA%2BA76TwbOKqvHOfGU6zgUSzZE8wXtsodnDroJa3OUktKh%3DM4Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.