We use the collapse feature with inner_hits as described here : https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-request-collapse.html
Is there a reason why the routing and preference settings of the main search request are not used for the inner hit queries. I think it would be a valid optimization to preserve these settings.
see org.elasticsearch.action.search.ExpandSearchPhase
|
SearchRequest groupRequest = new SearchRequest(searchRequest.indices()) |