Hi everyone! I'm curious, is there a way of replic...
# community-help
d
Hi everyone! I'm curious, is there a way of replicating the effect of
pinned_hits
in the search API on group keys when
group_by
is used? For example, having search results from a collection of products, grouped by brand, with a certain brand pinned to the top of the results list?
j
You could try sorting based on conditions to move all products that match a brand to the top: https://typesense.org/docs/27.1/api/search.html#sorting-based-on-conditions And then try grouping on that...
d
I was looking for a solution and somehow overlooked this section in the documentation. It's exactly what I needed, thank you @Jason Bosco!
👍 1