Expose a function to control the sort order
See original GitHub issueWhat I would like is to control the sort order. I’m guessing, internally, that Flexsearch has an algorithm for determining which matched document came before another. If I can just get in there an affect the sort for very specific business logic. Something like this maybe:
index.search(query, {
sort: (a, b) => {
if (someReason(a)) { return 1 }
if (someOtherReason(b)) { return -1 }
return 0
}
})
Ideally, the sort callback would get the document and each documents match score as determined what internals of Flexsearch (e.g. BM25). For example, I could manually boost the score on docs that should be prioritized.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Control/Expose Quote Product Line Items Sort Order
It's important to allow Admins to either control the sort order of the Quote Product line items related list according to the available...
Read more >Controlling the sort sequence used to display lists
All lists have a default sort sequence based on the type of fields present in the list.
Read more >Order Up! | Custom Sort Orders - Splunk
A how-to on creating custom sort orders for your search results. ... Use the case function to assign a number to each unique...
Read more >Sort or Order List in R? - Spark by {Examples}
By using lapply() function you can sort the values of the list in R by ascending order, this function takes a list as...
Read more >Sort Transformation - SQL Server Integration Services (SSIS)
The Sort transformation sorts input data in ascending or descending order and copies the sorted data to the transformation output.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@ts-thomas Perhaps you can help with a temporary solution. Is there any way I can find out the internal score of my search results. Because if I can have the internal scores, I can retroactively recompute them and re-sort.
Nope. No progress. And I have up.
On Wed, Apr 13, 2022 at 6:03 PM corey34 @.***> wrote:
– GitHub https://github.com/peterbe · Website https://www.peterbe.com/ · Twitter https://twitter.com/peterbe · Side project https://thatsgroce.web.app/