Use the search API with the inner_hits parameter to retrieve the exact nested or parent/child documents that caused each search hit to match.