Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
7.66k stars 301 forks source link

Keep the order of the results #768

Closed stax76 closed 2 years ago

stax76 commented 2 years ago

The order which Flow Launcher gives is not helpful for me. The current way seems arbitrary and also don't seem to be documented, I don't understand how it works. I tried the move to top feature for a while, but it did not help in the end. I rather would like to keep the order which the plugin gives, I would prefer the following order:

  1. Search multiple space separated keywords in title (AND search)
  2. Search multiple space separated keywords in subtitle (AND search)
  3. Search uppercase characters in title, ff does find FireFox
  4. Search at the start of the title
  5. Search in the title
  6. Search in the subtitle

That's how it worked in my KeyLauncher app, which I have used 15 years and now finally gave up. It also works like this in my new Favorites plugin.

1+2 AND search should also be supported by the browser bookmarks plugin, this type of searching is highly popular, used by many apps like Everything.

In wox keeping the order is supported:

https://github.com/Wox-launcher/Wox/issues/1857

It would be a great help if the plugin API would support it. I prefer to only type 2 characters when I search something, and I prefer the item that I search for being at the top of the results.

taooceros commented 2 years ago

The search engine of program plugin and the browser bookmarks plugin are the same. The part of code lies here https://github.com/Flow-Launcher/Flow.Launcher/blob/dev/Flow.Launcher.Infrastructure/StringMatcher.cs.

The order is determined based on score system, so modifying the order like that may not be really an easy modification, but feel free to check the source code and modify it to a better search algorithm.

I think there's keyword search pattern in the search algorithm currently (search query are split based on space, and search separately), but maybe not that obvious.

In order to keep order in plugin, just assign a different score to the results. Even though it would be possible that most selected result may be score bumped, it would not affect largely, and the score bumps most when the query word is also matched, so it shouldn't be a large issue. If you just don't want the score bump system, simply make the difference between results large. Though I think it is reasonable to have a option like #1857 in wox to respect plugins' raw score to ignore the user behavior influence.

taooceros commented 2 years ago

Search uppercase characters in title, ff does find FireFox

Actually, this should be already supported.

stax76 commented 2 years ago

I didn't know there is a Score property, that should work for me, thanks.

liberize commented 2 years ago

vote for this. there should be an option. i fixed some bugs of the clipboard plugin. there remains a bug because of this. in fact, i patched wox and the clipboard plugin myself long ago. https://github.com/liberize/Wox/commits/master

stax76 commented 2 years ago

What's wrong with the native clipboard history (win+v) ?

In Windows 11 it's even better.

taooceros commented 2 years ago

it cannot be searched

jjw24 commented 2 years ago
  1. Search multiple space separated keywords in title (AND search)
  2. Search multiple space separated keywords in subtitle (AND search)
  3. Search uppercase characters in title, ff does find FireFox
  4. Search at the start of the title
  5. Search in the title
  6. Search in the subtitle

These should already be supported. Feel free to reopen this issue if still not addressed