We are using elasticsearch version 5.4 . We have used collapse to aggregate result on the basis of nested field. But the result we are getting is just one record as a result even when it shows total no. of hits as 4 . Out of these 4 records, 3 should be displayed but it is displaying just 1 record..
Collapse is working totally fine with non nested fields. We also tried to include inner_hits. But as soon as we define inner hits in collapse, it is showing all the nested documents without aggregating it.
Thanks in advance.