Skip to content

runners/recentdocuments: match term anywhere in file name

Change the query pattern so that the term may occur anywhere and not only as the start of a file or directory name, so that e.g. searching for "recent" also returns "some_recent_file".

Results where the match is not at the beginning of the file name are already ranked lower, so I think it's reasonable to include them. Baloo does it too.

If the idea was to restrict the match to file names and not parent folders (i.e.that "a" would only find "a.txt" and not "a/b.txt"), then the existing pattern doesn't work for that anyway, as the second wildcard can still match "/". If we want to exclude such results or at least rank them lower (which would make a lot of sense imo), edit: or maybe instead add as the recent files result the location where the match occurred ("a" in the example), we can do this after fetching the results from KActivities.

BUG: 461006

Edited by Natalie Clarius

Merge request reports