Implementing Result Pinning in Typesense Product
TLDR Sai questioned about implementing result pinning in Typesense for a product. Kishore Nallan provided several resources and explanations to assist, ultimately suggesting the use of 'sort_by' to promote groups of objects based on an attribute.
1
Jul 30, 2021 (30 months ago)
Sai
05:45 AMResult Pinning
?Kishore Nallan
05:47 AMOverrides: https://typesense.org/docs/0.21.0/api/curation.html#curation
Kishore Nallan
05:47 AMpinned_hits
argument description here: https://typesense.org/docs/0.21.0/api/documents.html#argumentsSai
07:15 AMKishore Nallan
07:15 AMSai
07:18 AMKishore Nallan
07:19 AMKishore Nallan
07:19 AMSai
07:22 AM{"id":100,"type":"p1","name":"xyz"},{"id":102,"type:"p2":"name":"abc"},
{"id":103,"type:"p1":"name":"abcd"}
{"id":104,"type:"p2":"name":"abcde"}
{"id":105,"type:"p2":"name":"abcdef"}
i want to pin p2 results first then p1
Kishore Nallan
07:23 AM102
as the identifier for p2. You can't use another field, like type
.Sai
07:24 AMKishore Nallan
07:25 AMp2
items -- is that the intent?Sai
07:26 AMname
i want to pin p2 results on top followed by p1Kishore Nallan
07:27 AMsort_by
if you identify p2 by numerical values (it will become some kind of weighting). There is no way to promote groups of objects based on an attribute using pinning or overrides.Sai
07:29 AM1
Typesense
Indexed 3011 threads (79% resolved)
Similar Threads
Troubleshooting 'Contains' Match and Override Issues in Typesense
John sought assistance due to a seemingly faulty override in Typesense that failed to bring up a specific entry. Jason suggested troubleshooting steps, including trying a smaller record set and considering a server upgrade. A bug with 'contains' match appeared identified but not conclusively resolved.
Trouble in Implementing Deeply Nested Search
Anirudh is struggling to implement a two-level nested search. Jason asked for some specific examples to study the issue. Anirudh provided some material, realizing that adding top fields helped but might over-index. Jason then suggested reporting this issue on GitHub.
Resolving Typesense Result Issue in Document Collection Queries
Mike was encountering errors when searching for specific query in their Typesense document collection. Jason suggested it may be due to the `drop_tokens_threshold` setting. There was a misunderstanding but after further explanation from Jason, Mike understood and decided to continue the conversation via email.
Issues Sorting Multiple Fields with Sort_by in Typesense Query
Rishabh was having trouble sorting two fields separately with a single query. Jason explained that a secondary sorting will only occur if the first sort results in matching values. They clarified the functionality of sorting in various search engines.
Resolve Facets and Sorting Issues with Typesense
Ethan needed assistance with getting all facet values and sorting results by date using Typesense. Jason provided guidance on how to use Typesense properties to accomplish these tasks, and resolved issues related to specific use-cases provided by Ethan and Rushil.