Bug 347718 - Krunner should rank local locations over search term hits when text starts with ~/
Summary: Krunner should rank local locations over search term hits when text starts wi...
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: locations (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-14 13:17 UTC by Rohan Garg
Modified: 2020-12-18 21:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21
Sentry Crash Report:


Attachments
Okay, can reproduce :) (17.77 KB, image/png)
2020-12-18 09:11 UTC, Alexander Lohnau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rohan Garg 2015-05-14 13:17:29 UTC
I use krunner alot to open local files, such as ~/Movies , however, krunner seems to prefer files that have the term '~' in them instead of the location ~/Movies in the result index. This causes fun issues such as opening a book when I instead wanted to watch a Movie.

Would it be possible to detect when a string is a local location and rank it highest?

Reproducible: Always

Steps to Reproduce:
1. Have a file which has the term ~/Movies in it
2. Have a Location ~/Movies
3. Search for ~/Movies

Actual Results:  
The file is ranked the highest

Expected Results:  
The folder ~/Movies is ranked highest
Comment 1 Justin Zobel 2020-11-22 03:42:17 UTC
I think this would be a good change, moved to wishlist as it's not a bug.
Comment 2 Alexander Lohnau 2020-12-18 07:51:35 UTC
Can you please provide a screenshot of this issue?
Comment 3 Alexander Lohnau 2020-12-18 09:11:22 UTC
Created attachment 134172 [details]
Okay, can reproduce :)
Comment 4 Bug Janitor Service 2020-12-18 12:57:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/524
Comment 5 Alexander Lohnau 2020-12-18 21:14:54 UTC
Git commit 416c4b8f6a7cf1dac1bc31184830269045ce30c9 by Alexander Lohnau.
Committed on 18/12/2020 at 12:56.
Pushed by alex into branch 'master'.

Do not show duplicate results from location and baloo runner
FIXED-IN: 5.21

If the file path is an exact match the location runner will
display a match, we do not want to duplicate that in baloo.

M  +6    -0    runners/baloo/baloosearchrunner.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/416c4b8f6a7cf1dac1bc31184830269045ce30c9