"nested" aggregation for parent/child relations?

Hi,

Does anyone know if it is possible to do aggregations that are similar to
the "nested" aggregation but for parent/child relationships? I have the
following example:

parent doc:
{
"_id": "123456",
"name": "I am the parent"
}

child1:
{
"_parent": "123456",
"country": "Germany"
}

child2:
{
"_parent": "123456",
"language": "German"
}

I would like to execute a terms aggregation by language and a terms
sub-aggregation by country. Is that possible? I've done it with nested
relationships instead of parent/child, but we update this data often, and
nested relationships are harder to insert.

Many thanks!

Jad.

--
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/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Jad,

This is a feature that we are considering but parent/child joins are
typically much more expensive to do than nested (block) joins so we still
need to figure out if we can expose such an aggregation with a reasonable
cost.

On Mon, May 19, 2014 at 7:03 PM, Jad jnaous@gmail.com wrote:

Hi,

Does anyone know if it is possible to do aggregations that are similar to
the "nested" aggregation but for parent/child relationships? I have the
following example:

parent doc:
{
"_id": "123456",
"name": "I am the parent"
}

child1:
{
"_parent": "123456",
"country": "Germany"
}

child2:
{
"_parent": "123456",
"language": "German"
}

I would like to execute a terms aggregation by language and a terms
sub-aggregation by country. Is that possible? I've done it with nested
relationships instead of parent/child, but we update this data often, and
nested relationships are harder to insert.

Many thanks!

Jad.

--
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/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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/CAL6Z4j7qcke7DbXwwDAE100pQ2AkA6796E5o_ooT-4VwgV06Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thanks, Adrien!
On May 20, 2014 12:19 AM, "Adrien Grand" adrien.grand@elasticsearch.com
wrote:

Hi Jad,

This is a feature that we are considering but parent/child joins are
typically much more expensive to do than nested (block) joins so we still
need to figure out if we can expose such an aggregation with a reasonable
cost.

On Mon, May 19, 2014 at 7:03 PM, Jad jnaous@gmail.com wrote:

Hi,

Does anyone know if it is possible to do aggregations that are similar to
the "nested" aggregation but for parent/child relationships? I have the
following example:

parent doc:
{
"_id": "123456",
"name": "I am the parent"
}

child1:
{
"_parent": "123456",
"country": "Germany"
}

child2:
{
"_parent": "123456",
"language": "German"
}

I would like to execute a terms aggregation by language and a terms
sub-aggregation by country. Is that possible? I've done it with nested
relationships instead of parent/child, but we update this data often, and
nested relationships are harder to insert.

Many thanks!

Jad.

--
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/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/Ojd2ZyEMV3I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7qcke7DbXwwDAE100pQ2AkA6796E5o_ooT-4VwgV06Tg%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7qcke7DbXwwDAE100pQ2AkA6796E5o_ooT-4VwgV06Tg%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAET%3DrD%3Dxr7epNSw8apkz4vm-Gk09rBm__mOHj3v%2BvPDAk_o2iQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hey guys,

I'm interested in similar architecture. I have company -> employee ->
availability structure. Any update on grandchild aggregation?
While on 2nd level I get data, on 3rd level I'm always getting doc_count 0.
Or is this completely different issue?

Best,
Pete

On Tuesday, 20 May 2014 16:04:00 UTC+2, Jad wrote:

Thanks, Adrien!
On May 20, 2014 12:19 AM, "Adrien Grand" <adrien...@elasticsearch.com
<javascript:>> wrote:

Hi Jad,

This is a feature that we are considering but parent/child joins are
typically much more expensive to do than nested (block) joins so we still
need to figure out if we can expose such an aggregation with a reasonable
cost.

On Mon, May 19, 2014 at 7:03 PM, Jad <jna...@gmail.com <javascript:>>
wrote:

Hi,

Does anyone know if it is possible to do aggregations that are similar
to the "nested" aggregation but for parent/child relationships? I have the
following example:

parent doc:
{
"_id": "123456",
"name": "I am the parent"
}

child1:
{
"_parent": "123456",
"country": "Germany"
}

child2:
{
"_parent": "123456",
"language": "German"
}

I would like to execute a terms aggregation by language and a terms
sub-aggregation by country. Is that possible? I've done it with nested
relationships instead of parent/child, but we update this data often, and
nested relationships are harder to insert.

Many thanks!

Jad.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/587022cc-cedd-48e9-b6ba-4cef8c996432%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/Ojd2ZyEMV3I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7qcke7DbXwwDAE100pQ2AkA6796E5o_ooT-4VwgV06Tg%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7qcke7DbXwwDAE100pQ2AkA6796E5o_ooT-4VwgV06Tg%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/b4b71907-cf4b-4bc5-89a5-0f9cb8da03d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.