| Summary: | Regression: Dolphin file search surrounds terms with double quotes for Baloo searches | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | honpar94 |
| Component: | search | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | aristsakas, dolphin-bugs-null, kdedev, stefan.bruens, tagwerk19 |
| Priority: | NOR | Keywords: | regression |
| Version First Reported In: | 25.08.1 | ||
| Target Milestone: | --- | ||
| Platform: | CachyOS | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=494584 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
honpar94
2025-10-02 02:46:39 UTC
It looks like the behavior has changed in git-master for baloo6, but I can reproduce the bug as described in Dolphin I created a few test files with unique names "blinm simnhg" "simnh blinm" "blinmsimnh" On command line I performed a search with and without quotes ~/test baloosearch6 simnh blinm /home/tracey/test/blinm simnh /home/tracey/test/simnh blinm Elapsed: 0.298213 msecs ~/test baloosearch6 "simnh blinm" /home/tracey/test/blinm simnh /home/tracey/test/simnh blinm Elapsed: 0.298043 msecs So the quotes don't affect the search on command line, and I get the results I expected. In Dolphin, I see all 3 test files returned when I search for "simn" - OK Searching for "simn blin" however, produces no results. The results should return the same 3 files. Searching for "simnh blin" produces one file, rather than all three. (In reply to TraceyC from comment #1) > ... So the quotes don't affect the search on command line ... You might be being ambushed by the shell I would have said that if you want to search for a phrase, you quote it, so: (In reply to TraceyC from comment #1) > ~/test baloosearch6 "simnh blinm" > /home/tracey/test/blinm simnh > /home/tracey/test/simnh blinm > Elapsed: 0.298043 msecs *Ought* to give you just: > /home/tracey/test/simnh blinm But I suspect the shell has eaten the quotes. You could try quoting the quotes: ~/test baloosearch6 \"simnh blinm\" or ~/test baloosearch6 '"simnh blinm"' I think Baloo is doing what it should and it does look like Dolphin is passing a quoted string to it, whereas it didn't before. I will be a bit adventurous and flag this as a regression (done my testing on Neon Unstable, Plasma 6.5.80, Frameworks 6.20.0) (In reply to tagwerk19 from comment #2) Either way of escaping the quotes results in an error and only one match, the same thing I got when using quotes in Dolphin baloosearch6 '"simnh blinm"' kf.baloo.engine: PositionDB::iter "simnh" MDB_NOTFOUND: No matching key/data pair found /home/tracey/test/simnh blinm > I will be a bit adventurous and flag this as a regression (done my testing > on Neon Unstable, Plasma 6.5.80, Frameworks 6.20.0) That would be useful, thanks! (In reply to TraceyC from comment #3) > kf.baloo.engine: PositionDB::iter "simnh" MDB_NOTFOUND: No matching key/data pair found I suspect you have a ~/.config/QtProject/qtlogging.ini file containing something like: [rules] ... kf.baloo.*=true ... in it. I have seen the diagnostic and not known whether to worry about it. I'm guessing here Baloo's fund "simnh" when looking for the filename but not found it in the content index. (In reply to tagwerk19 from comment #4) > I suspect you have a > ~/.config/QtProject/qtlogging.ini > file containing something like: > [rules] > ... > kf.baloo.*=true > ... > in it. That file is on the system, but doesn't have that line. That's fine, at this point the developers should have enough information to investigate further. @TraceC The shell "eats" the quotes, and you have to escape/protect them. All of the following should return the single wanted file:
baloosearch6 \"simnh blinm\"
baloosearch6 '"simnh blinm"'
baloosearch6 'filename:"simnh blinm"'
baloosearch6 filename:\"simnh blinm\"
The first two also search the file contents for a match. This is also likely the cause of the debug message you see ("kf.baloo.engine: PositionDB::iter "simnh" MDB_NOTFOUND: No matching key/data pair found").
baloosearch6 '"simnh blinm"'
is internally transformed to:
baloosearch6 'filename:"simnh blinm" OR content:"simnh blinm" '
(In reply to TraceyC from comment #5) > (In reply to tagwerk19 from comment #4) > > I suspect you have a > > ~/.config/QtProject/qtlogging.ini > > file containing something like: > > [rules] > > ... > > kf.baloo.*=true > > ... > > in it. > > That file is on the system, but doesn't have that line. That's fine, at this > point the developers should have enough information to investigate further. There is also a graphical tool to edit debug levels for each category (i.e. application/library/implementation detail/...). If you hover the mouse cursor over an entry, it will tell you the corresponding category name (e.g "Baloo Engine" - Category name: kf.baloo.engine). These setting will affect the whole session, and may fill your user session logfile (journal) with a large amount of messages. For debugging, just set the corresponding environment variable: $> QT_LOGGING_RULES='kf.baloo.*=true;*.debug=false' baloosearch6 \"simnh blinm\" Note, you can supply multiple rules, the rule above enables full logging for all baloo components, but then disables all debug messages (i.e. only keeping warning/informational messages). Sorry for the long detail and I hope I've got this right...
For me, these all work as they should:
$ baloosearch6 simnh blinm
$ baloosearch6 "simnh blinm"
$ baloosearch6 blinm simnh
$ baloosearch6 "blinm simnh"
$ baloosearch6 \"simnh blinm\"
$ baloosearch6 '"simnh blinm"'
$ baloosearch6 'filename:"simnh blinm"'
$ baloosearch6 filename:\"simnh blinm\"
What has just broken is the search box in Dolphin, *IF* the filter is set to "file names". (As far as I can see searching for "File names and contents" works). If I search for
sim : it works
simn : it works
simnh : it works
simnh bli : no match
simnh blin : no match
simnh blinm : it works
'simnh blin' : it works
bli simnh : no match
blin simnh : no match
blinm simnh : no match
So there is something different (just recently) being done for a filename versus name and contents searches.
This is on a Neon Unstable box, maybe a month behind with updates as I've been getting an "unmet dependencies" failure. I've noticed the filter at times jumping from "File names" to "File names and contents", so it may be worth watching to see what it is set as...
Added a cross reference to the bug in https://invent.kde.org/system/dolphin/-/merge_requests/797#note_1337377, it seems to be something that has changed in Dolphin, "baloosearch" seems solid... *** Bug 494673 has been marked as a duplicate of this bug. *** |