Why using parent/child relationship instead of a simple parent_id relation?

I am asking myself why i would use a parent/child relationship to retrieve
childs docs instead of creating a parent_id field in childs documents and
query on this field?

thank you

--
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.

Because you can execute queries against the parents and have the children
of the matching documents returned or vice versa. It is much more powerful
than simple filtering of a field.

On Tue, Jun 4, 2013 at 9:50 AM, Mathieu Roy mr.math.roy@gmail.com wrote:

I am asking myself why i would use a parent/child relationship to retrieve
childs docs instead of creating a parent_id field in childs documents and
query on this field?

thank you

--
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.

ah ok, i understand better now.

Thank you

Le mardi 4 juin 2013 12:57:58 UTC-4, Matt Weber a écrit :

Because you can execute queries against the parents and have the children
of the matching documents returned or vice versa. It is much more powerful
than simple filtering of a field.

On Tue, Jun 4, 2013 at 9:50 AM, Mathieu Roy <mr.ma...@gmail.com<javascript:>

wrote:

I am asking myself why i would use a parent/child relationship to
retrieve childs docs instead of creating a parent_id field in childs
documents and query on this field?

thank you

--
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:>.
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.