Sorting Agents Based on Primary Market Position
TLDR Saahiththiyan wants to sort agents based on their
primary_market position, but Kishore Nallan suggests it's not possible server side and recommends a client side solution.
Mar 21, 2023 (6 months ago)
I have a collection called
agents, each agent in that index can have
Example, for an agent called Jack
primary_market: [Sydney-NSW-2000-Australia, Pots-Point-NSW-Australia], For an agent called Bill
primary_market: [Pots-Point-NSW-Australia, Sydney-NSW-2000-Australia]
When i filter for agents using the slug
Sydney-NSW-2000-Australiai want to have Jack on top of the results based on the position of the slug inside the
primary_marketand Bill to be at the bottom of the results.
Basically i want to sort the results based on the position of the slug i am filtering by inside the
Likewise if i filter for agents using the slug
Pots-Point-NSW-Australiai want Bill to be at the top of the results and jack to be at the bottom.
Is that even possible? or even an alternative way where i can achieve the same outcome? Any help would be awesome.
Kishore Nallan03:06 AM
Indexed 2764 threads (79% resolved)
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.
Adjusting Text Match Score Calculation in TypeSense
Johannes wanted to modify the Text Match Score calculation in TypeSense to improve search results returns. With counsel from Jason and Kishore Nallan, various solutions were proposed, including creating a Github issue, attempting different parameters, and updating Docker to a new version to resolve the matter.