Created attachment 119280 [details]
screenshot of stale results featuring deleted 2018 file twice and missing 2019 file
The search of Kickoff presents pairs of old files that have already been deleted.
STEPS TO REPRODUCE
1. File has been created somewhen in 2018 (spreadsheet saved by LO-Calc)
2. At some day, I may have opened it via the recent documents
3. I used to open it about once a month - so it wasn't at the top of the recent any more
4. I opened it via the search by typing a few letters
5. in 2019 I retired the 2018 version and moved it to the backup disk
a) The 2019 version wasn't found by search until I explicitly opened it through the recent document.
b) The 2018 is still showing twice, although on clicking, I only results in an error, because the file was deliberately deleted from my desktop.
a) Include recent files in regular search results (if they show up in recent, they should be searchable, even if kickoff didn't open them until now).
b) Update the search index on selecting a result and check, that the file is really there.
c) Remove duplicate results from index.
Linux/KDE Plasma: 4.18.0-17-generic
(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1
Created attachment 119342 [details]
same search via Alt+F2
I can shed some light on the duplicates: as the new screenshot of Alt+F2 shows, the files appear in two distinct categories. But as Alt+F1 misses the category labels, it is strange to show them twice.
Also I removed the year from the file-name, so the results for 2019 vanished. Sometimes the File "Burger King.ods" was found for search query "burger king", but not for the query "burger king ods" ... right now, it is not found at all - maybe because I opened so many files that it also dropped out of the "recent history" of Alt+F1 ... I guess LO-Calc keeps an independent history, cause it is still in there, as it was faster/easier, to open a bunch of picutres in gwenview to flood the history.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/krunner/-/merge_requests/56
*** Bug 434742 has been marked as a duplicate of this bug. ***
*** Bug 434864 has been marked as a duplicate of this bug. ***
Git commit ec725807126cbccf6f04c54be597e22526ae6e8f by Alexander Lohnau.
Committed on 28/04/2021 at 17:18.
Pushed by alex into branch 'master'.
Allow runners to prevent duplicate results
This commit allows the runners to use the id to prevent duplicate
results. For this the X-Plasma-Runner-Unique-Results property is added.
If the runners set this to true the runner name is not prepended to the id and
it is checked if a match with the id already exists before the match is added.
Because the property introduces a behavior change we can not enable it
In case there are duplicate results the results from the runner which has the X-Plasma-Runner-Weak-Results property
set to true will be removed. Otherwise the results from the first runner
will be used.
FIXED-IN: Frameworks 5.82 & Plasma 5.22
M +2 -2 autotests/fakerunner.h
A +7 -0 autotests/metadatafile1.desktop
A +6 -0 autotests/metadatafile2.desktop
M +36 -1 autotests/runnermatchmethodstest.cpp
M +12 -0 src/abstractrunner.cpp
M +5 -0 src/abstractrunner.h
M +2 -0 src/abstractrunner_p.h
M +9 -0 src/data/servicetypes/plasma-runner.desktop
M +8 -2 src/dbusrunner.cpp
M +1 -0 src/dbusrunner_p.h
M +9 -7 src/querymatch.cpp
M +25 -4 src/runnercontext.cpp
Thanks for working on this - even if it seems to be a small annoyance. I really appreciate your effort to strive to reduce the paper-cuts.
Git commit 989d9b17c5b8c5588c584dc9cd5440f68315f338 by Nate Graham, on behalf of Alexander Lohnau.
Committed on 29/04/2021 at 20:10.
Pushed by ngraham into branch 'master'.
Set new KRunner property to reduce duplicates and make IDs comparable
M +22 -1 runners/appstream/appstreamrunner.cpp
M +2 -2 runners/baloo/baloosearchrunner.cpp
M +2 -0 runners/baloo/plasma-runner-baloosearch.desktop
M +1 -0 runners/recentdocuments/plasma-runner-recentdocuments.desktop
M +1 -0 runners/recentdocuments/recentdocuments.cpp
M +1 -0 runners/services/plasma-runner-services.desktop
M +8 -0 runners/services/servicerunner.cpp
M +2 -0 runners/shell/plasma-runner-shell.desktop
M +3 -2 runners/shell/shellrunner.cpp
Can the fix be backported to Frameworks 5.81 & Plasma 5.21?
Not easily, sorry.
Git commit 512135a6502ba551b7349fadf964a83ef6a795e0 by Alexander Lohnau.
Committed on 19/05/2021 at 17:03.
Pushed by alex into branch 'master'.
runners: Prevent duplicate results among bookmarks and locations runner
M +2 -0 runners/bookmarks/plasma-runner-bookmarks.desktop
M +4 -0 runners/locations/locationrunner.cpp
M +2 -0 runners/locations/plasma-runner-locations.desktop