Hello,
I don’t know if my topic title is correct since I really don’t know how to call such behaviour.
So I will provide an example and explain my need
Here’s a sample of my data :
[
{
"title":"Video 1",
"links":[
{
"platform":"youtube",
"countries":[
"France",
"Spain"
]
},
{
"platform":"vimeo",
"countries":[
"Italy",
"Germany"
]
}
],
"objectID":"1"
},
{
"title":"Video 2",
"links":[
{
"platform":"youtube",
"countries":[
"Italy"
]
},
{
"platform":"vimeo",
"countries":[
"Germany"
]
}
],
"objectID":"2"
}
]
I have two facets, “Platforms” which allows to filter through video available on specific platforms (youtube, vimeo…) and “Countries” which allows to filter on countries where the video is available.
As you see in the above sample, each video can have multiple links with different countries. And my issue is that I would like to make a facet to match on specific links.
For example, if I pick “Youtube” as a platform, and “Italy” as a country, I would like to only get results for Youtube video available in Italy. But with facets’ default behaviour it will return any video that has one youtube link and is available in Italy through any of its links.
- Youtube + Italy => should return Video 2
- Vimeo + Germany => should return Video 1 & 2
- Youtube + Germany => should return nothing
Is there any solution to create that kind of behaviour where filters should be “combined” on the object’s data? Whether it is custom, vue-instantsearch or through Algolia dashboard.
Thanks for your help