When I have both `facet_by` and `group_by` are the...
# community-help
e
When I have both
facet_by
and
group_by
are the facet counts the number of hits, or the number of groups?
My specific situation is that I’m denormalizing the following structure:
Copy code
{
  media_id: '123',
  streaming: [
    { site: 'netflix', regions: ['us'] },
    { site: 'netflix', regions: ['ja'] },
    { site: 'hulu', regions: ['us'] }
  ]
}
Into multiple documents like:
Copy code
{
  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 🙏
Sorry for all the questions btw, advanced search is extremely important to our product and so we’re hitting a lot of these weirdly-specific things as we push against the edges of typesense features 😅 We’re officially past parity with our previous Algolia and Elasticsearch search systems though, so I hope to roll this out soon and then add filters like this and features like vector search!
k
👋 facets during group_by is done on the groups.
🙏 1