Mapping between 2 Indexed documents; Parent/Child

(Gabsi Ibrahim) #1

I have this relations between these objects :
An account contains many categories, each categories contains many emails,
each email has many attachment
I'm trying to index all these objects in order to make a multicriteria
search engine; bidirectionnel search.
Example: I'm able to search for categories that has an email_size inferior
to 25K and I'm able also to search for emails that has cateogry_name =
Is it correct to index the whole parent document in the child document in
this way:
{ "_id": 1
"subject" : "ES..",
"size" : "25",
"_parent" : {
"_id" : 475,
"nameCategory": "Dossier des emails",
"_parent" : {
"_id" : 2,
"nameAccount" : "Gmail"

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
To view this discussion on the web visit
For more options, visit

(system) #2