NOT sort by score option
See original GitHub issueThe find
method always sorts by .score
.
What I need is that it doesn’t sort at all but leaves the order of the original list
.
So, looking at the Basic usage that example returns:
Output: lisp, kotlin, elixir
but what I need it to be is:
Output: kotlin, elixir, lisp
because that’s the order they appear in the list
option:
const list = ['go', 'javascript', 'python', 'rust',
'swift', 'kotlin', 'elixir', 'java',
'lisp', 'v', 'zig', 'nim', 'rescript',
'd', 'haskell']
The reason for needing this is that my list that I search on are sorted by “popularity”.
If the user only type something really short like f
I really want to favor the popular items first because the assumed likelihood that it’s what the user expects to find.
So ideal would be something like:
const entries = fzf.find('li', {sort: (item) => item})
or
const entries = fzf.find('li', {sortByScore: false})
so that it only “filters” the list.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
How is Elastic Search sorting when no sort option specified ...
It looks like sorting is than random ... Default sort order is _score, but score is always 1 when you do not specify...
Read more >Sort search results | Elasticsearch Guide [8.5] | Elastic
Track Scoresedit. When sorting on a field, scores are not computed. By setting track_scores to true, scores will still be computed and tracked....
Read more >Sort data in a range or table - Microsoft Support
In the Custom Sort dialog box, click Options. Under Row, in the 'Sort by' drop down, select the row that you want to...
Read more >Quick start: Sort data in an Excel worksheet - Microsoft Support
In the Order list, choose the order that you want to apply to the sort operation—alphabetically or numerically, ascending or descending (that is,...
Read more >Video: Sort data in a range or table - Microsoft Support
Training: Sort data in Excel quickly, in just a few clicks. To change the order of your data, sort it. To focus on...
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 FreeTop 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
Top GitHub Comments
Okay, I’ll close it for now then.
I’m already working on a branch https://github.com/ajitid/fzf-for-js/tree/feat/skip-score-sorting that will add a boolean
sort
.