Facets that include child objects in the count

Is there are a way to include child object in the facet count. For example,
if in my mapping i had this structure:

{
"myObject": {
"properties": {
"topCategory": {
"type": "string",
"name": "top",
"category1": {
"type": "string",
"name": "category2",
"category2": {
"type": "string",
"name": "category2"
}
}
}
}
}
}

And I used topCategory as a facet field, is there away to include category1
and category2 in the count? So the facet count value for 'topCategory'
would be 3. Also, if the user was to select the topCategory facet in the
UI is there a way to return all three category results - so returm then in
the results without the child/parent structure.

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