Prabhu Ravichandran
02/20/2022, 2:53 AMfacet_by
or group_by
typesense fetches 57 hits (found: 57
).
I add a facet_by=author
and group_by=author
.
My expectation was that the "`found`" count would remain the same and just the results count will be facet'ed between the values in the "author" field.
There are 2 distinct "author" field values. The facet counts show a count of 1 for each author field value. "found" also shows only 2 instead of 57 without the facet_by and group_by search query, but the number of documents are 3 each for the 2 authors.
So i'm having bit of hard time understanding how to interpret the search results between both cases. Any help would be appreciated. Thanks.Kishore Nallan
02/20/2022, 2:58 AMPrabhu Ravichandran
02/20/2022, 3:11 AMfacet_counts
> counts
array. There are 2 elements in the array, which is fine given there are 2 distinct values for the author
field. However each element of the counts
array shows a count:1
.I was expecting this to have counts like a SQL equivalent of select author, count(document.id) from collection group by author
.Kishore Nallan
02/20/2022, 3:12 AMcurl
snippets so that it's easy for us to reference things.Prabhu Ravichandran
02/20/2022, 3:25 AMPrabhu Ravichandran
02/20/2022, 3:34 PMKishore Nallan
02/20/2022, 4:42 PMPrabhu Ravichandran
02/21/2022, 12:59 AMgrouped_hits
itself. Alternatively, will rethink my whole approach.
Thanks for the quick explanation!Kishore Nallan
02/21/2022, 1:17 PMPrabhu Ravichandran
02/21/2022, 1:41 PM