You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an index with two types, companies and persons. Now we have a haschild query on companies, to be able to find companies that contain names of specific persons. For example, give me all company types that have a child with the name 'Jansen'.
Now I want to sort those results (which consists of the parents of type company) on the firstnames of the persons working for that company.
The following query does not sort my companies, based on the inner_hits:
sorts the companies based on revenue just fine. I understand the last one is a property of the parent , but how do I sort the parents based on a property of the child?
The text was updated successfully, but these errors were encountered:
And the only workaround for now is to duplicate the data you want to sort on on the company object, although I can imagine this is not always possible.
We have an index with two types, companies and persons. Now we have a haschild query on companies, to be able to find companies that contain names of specific persons. For example, give me all company types that have a child with the name 'Jansen'.
Now I want to sort those results (which consists of the parents of type company) on the firstnames of the persons working for that company.
The following query does not sort my companies, based on the inner_hits:
Sorting INSIDE the inner hits works fine:
and:
sorts the companies based on revenue just fine. I understand the last one is a property of the parent , but how do I sort the parents based on a property of the child?
The text was updated successfully, but these errors were encountered: