Collapse field on parent/child


(Gianni Livolsi) #1

Is it allowed collapse using parent child..??

I've an index with 2 types user and posts, posts are children of user, i want search in posts and get it collapsed on user,

i wan to get hits of users with their posts in inner_hits.

It's easy to do if i put user value in any post.... my question is can i do it using parent/child relation..???

Tnx


(Martijn Van Groningen) #2

Yes, you can field collapse on the _parent field. The field you should use depends on the parent type name, so assuming the parent type name is user, you should use _parent#user as collapse field.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.