Emma Lejeck
08/06/2023, 12:34 AMfacet_by
and group_by
are the facet counts the number of hits, or the number of groups?Emma Lejeck
08/06/2023, 12:44 AM{
media_id: '123',
streaming: [
{ site: 'netflix', regions: ['us'] },
{ site: 'netflix', regions: ['ja'] },
{ site: 'hulu', regions: ['us'] }
]
}
Into multiple documents like:
{
media_id: '123',
streaming: {
site: 'netflix',
regions: ['us']
}
}
So that I can filter by, for example “available on netflix in the united states” like <http://streaming.site:=netflix|streaming.site:=netflix> && streaming.regions:['us']
in the same object (ie, not matching 'us'
in one object and netflix
in another, the properties need to match the same object)
I’d like the facets to reflect groups rather than hits, but I have a feeling they don’t
If there’s a better way to achieve this without denormalizing into multiple documents and grouping, please let me know 🙏Emma Lejeck
08/06/2023, 12:58 AMKishore Nallan
08/06/2023, 2:10 PM