Access child results in CoveoProcessParsedRestResponse pipeline
I am using Folding component and need to do some manipulations with results before displaying them on UI. Trying to use CoveoProcessParsedRestResponse pipeline. Results are accessed using args.ResponseContent.Results property, which is collection of Coveo.SearchProvider.Rest.Serialization.SearchResult. The problem is that I can not find property for child results in SearchResult class.
Is there a way to access child results in CoveoProcessParsedRestResponse pipeline?
To answer your question, `SearchResult` is a dictionary, you can access the `childResults` and `parentResult` variables with a simple `SearchResult["childResults"]`. You will have to parse them yourself, but it should work.
I would also like to suggest a client-side alternative with the preprocessResults event. You have access to all the results and children in there :)
But what are you trying to achieve exactly? Most of the time, it is better to add a computed field than trying to compute a value with the returned values.