I would like to be able to concatenate data. Here is an example :
[ { "type": "pen", "color": "blue", }, { "type": "glass", "color": "red", }, { "type": "pen", "color": "green", }, { "type": "glass", "color": "violet", }, { "type": "pen", "color": "yellow", }, { "type": "glass", "color": "orange", } ]
Then, if I search for pen, I will get 3 results, one result for each colors. I would like only one result.
I tried to use a distinct but the algolia distinct is more like a filter, and not a concat. If I do a distinct on the attribute pen, i will get one result that might look like :
{ "type": "pen", "color": "blue", },
What I would like to obtain is :
{ "type": "pen", "color_list": ["blue", "green", "yellow"] },
I cannot find anything like that in the algolia/instant-search doc, so I wonder how to do it. Is there a real tool that can do this, or at least a hacky solution that could do the trick ?
Thanks