Bug 438850 - Search does not output any results
Summary: Search does not output any results
Status: RESOLVED DUPLICATE of bug 431664
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 21.04.2
Platform: Neon Linux
: NOR critical
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 439277 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-18 09:17 UTC by dagobertram
Modified: 2024-07-07 15:57 UTC (History)
5 users (show)

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


Attachments
search for first entry (380.16 KB, image/png)
2021-06-18 09:17 UTC, dagobertram
Details
file extension alone did not work either (232.33 KB, image/png)
2021-06-18 10:42 UTC, dagobertram
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dagobertram 2021-06-18 09:17:00 UTC
Created attachment 139469 [details]
search for first entry

SUMMARY
When searching for a file in dolphin there is no output at all.

STEPS TO REPRODUCE
1. Open folder inside dolphin and press CTRL+F to start the search.
2. Search for a filename, a file extension etc.

OBSERVED RESULT
"No items matching the search" message is shown

EXPECTED RESULT
Search results should be listed

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3
Kernel Version: 5.4.0-74-generic (64-bit)
Graphics Platform: X11
Processors: 2 × Intel® Pentium® CPU G3440 @ 3.30GHz
Memory: 7.7 GiB of RAM
Graphics Processor: AMD Radeon HD 7800 Series

ADDITIONAL INFORMATION
Even though the search does not work at all, filtering via CTRL+I works beautifully as expected but that is not a valid solution. Especially since I want to list all picture files inside the music folder, wich contains many folders itself.

This brings me to another question: Why is there filtering (1) and the search (2) and the thing where you just start to type and it selects the item which starts with the just typed characters (3)? Couldn't (1) and (3) merge?
Comment 1 tagwerk19 2021-06-18 10:16:55 UTC
I think you are getting caught by the hyphen in the filename...

I think you'll see a match if you search for "Always", "In My Head", "Head Always" or "01 Always" but not if you try "01 - Always". The issue is the single character

Have a look at Bug 434589

Counter-intuitively if you search for "01_-_Always", that is with the spaces replaced by a separator character, it works...

I'll flag as "Confirmed" but it should probably end up flagged as a duplicate...
Comment 2 dagobertram 2021-06-18 10:42:25 UTC
Created attachment 139479 [details]
file extension alone did not work either

(In reply to tagwerk19 from comment #1)
> I think you are getting caught by the hyphen in the filename...
> 
> I think you'll see a match if you search for "Always", "In My Head", "Head
> Always" or "01 Always" but not if you try "01 - Always". The issue is the
> single character

That is not the case for me. No entry results in anything. "mp3" definitely did not work and also "always". (Filtering works though, even with the hyphen!)
Comment 3 tagwerk19 2021-06-18 14:07:56 UTC
(In reply to dagobertram from comment #2)
> That is not the case for me. No entry results in anything
More than a little strange.

Your second screenshot does show a "filename" search and not a "content" one so that should be OK - however it might be worth pressing an F5 "refresh" to see if anything changes.

If I do a "filename" search and type

    01 - Always

I get a hit. If I change to a "content" search, I don't (and I think it's the hyphen causing the trouble). I do have be careful about refreshing the results though.

If I look at the results from baloosearch

    baloosearch "Always"
    baloosearch "In My Head"
    baloosearch "Head Always"
    baloosearch "mp3"

all get results, however

    baloosearch "01 - Always"

doesn't.

If I look at the results from "balooshow -x ...", the hyphen doesn't appear in the "File Name Terms". It doesn't seem to be a problem with single characters as

    baloosearch "A Sky Full"

works. So my gut feeling is still "hyphens"...
Comment 4 dagobertram 2021-06-18 15:29:02 UTC
> Your second screenshot does show a "filename" search and not a "content" one
> so that should be OK - however it might be worth pressing an F5 "refresh" to
> see if anything changes.

The result is the same: nothing.

> If I do a "filename" search and type
> 
>     01 - Always
> 
> I get a hit. If I change to a "content" search, I don't (and I think it's
> the hyphen causing the trouble). I do have be careful about refreshing the
> results though.

"Content" is supposed to search, well, the content of the files, right? I did not index contents with baloo. Do you have enabled file search in System Settings? When I uncheck the box, everything works as expected which is more than weird ...

Baloosearch does find stuff but 
>     baloosearch "01 - Always"
also does not work.
This is working, though:
    baloosearch "01 Always"

The main problem here is not hyphens. :/
Comment 5 tagwerk19 2021-06-18 19:04:22 UTC
(In reply to dagobertram from comment #4)
> "Content" is supposed to search, well, the content of the files, right? I
> did not index contents with baloo.
Yes, part of baloo's "hidden work" is understanding the different file types and extracting the text from them. It's a bit of thankless task for the maintainers, keeping up with all the file types.

> ... Do you have enabled file search in System Settings? When I uncheck the
> box, everything works as expected which is more than weird ...
Dolphin has a "Plan B" for when it cannot ask Baloo. It does a search itself, "there and then", reading each file in turn.

> Baloosearch does find stuff but 
OK, If baloosearch works, then baloo is OK.

I find it strange that you don't see anything (in Dolphin) when you search for mp3 - and yet you do get results from "baloosearch mp3".

Might be worth simplifying - try:

    echo "Hello Penguin" > '01 - Always In My Head.txt'

and check whether Dolphin sees that. It does for me...

In the spirit of throwing things at the wall to see what sticks, there's no chance that your mp3 files have a trailing space, so "whatever.mp3 " instead of "whatever.mp3"?

I've tried this and "baloosearch mp3" finds the files and Dolphin search doesn't...

> The main problem here is not hyphens. :/
:-)
Comment 6 dagobertram 2021-06-18 19:18:12 UTC
> Might be worth simplifying - try:
> 
>     echo "Hello Penguin" > '01 - Always In My Head.txt'
> 
> and check whether Dolphin sees that. It does for me...
This does not work for me either.
> In the spirit of throwing things at the wall to see what sticks, there's no
> chance that your mp3 files have a trailing space, so "whatever.mp3 " instead
> of "whatever.mp3"?
There are no trailing spaces.
Comment 7 tagwerk19 2021-06-19 15:21:33 UTC
> This does not work for me either.
Sorry, in that case I'm not sure what to suggest.

Trying to summarise:

    It seems that baloo indexing works and baloosearch find what you want
    (with an exception for searches including a hyphen)

    However, if searching through Dolphin, that is also doing a baloosearch
    for filenames, nothing is returned.

I see the same behaviour for baloosearch and hyphens, I don't see the same issue for Dolphin...

I do see a couple of small issues with Dolphin/baloosearch.so

    A search (selecting a filename search) works when the filename
    contains a hyphen but the same search (selecting a content search) fails.

    Filenames with trailing spaces are found with a command line
    baloosearch but not when searching with Dolphin 

Alas, haven't got a handle on the main problem.
Comment 8 Andreas Hurka 2021-06-28 20:45:28 UTC
I am experiencing a similar problem on open suse tumbleweed, baloo indexing is at 100 %, baloosearch yields results and searching in dolphin doesn't work, at least partially.
I noticed, that only the search "From Here(Location)" Option does not work (no results at all, no changes when pressing F5), while "Your Files" does.
This is the "path" (what would be the right name?) when searching for "org" in ~/Downloads:
baloosearch:/?json=%7B%22includeFolder%22:%22/home/andreas/Downloads%22,%22searchString%22:%22filename:%5C%22org%5C%22%22%7D&title=Query Results from 'org'
Hope this helps.
Comment 9 mippo 2021-07-02 00:27:46 UTC
hello,
I have the same problem: in Dolphin the search doesn't work.

some more tests:
balooshow -x "11" returns something, related to searched item,
baloosearch "11" return only a lot of blank lines, maybe proportional to the number of matching items,

balooctl status says it's not running, even after enable and resume

in /home/.../.config/baloofilerc I tried to set first run=true, and then restart, but nothing happens
Comment 10 tagwerk19 2021-07-02 11:16:04 UTC
(In reply to Andreas Hurka from comment #8)
> I am experiencing a similar problem on open suse tumbleweed
Heads up that openSUSE uses BTRFS and multiple subvols
    https://bugs.kde.org/show_bug.cgi?id=402154#c12
There's a fair bit of development work needed to get that sorted.

> ... only the search "From Here(Location)" Option does not work
> (no results at all, no changes when pressing F5), while "Your Files" does ...
The baloosearch "equivalent" to the "From Here" is -d (or --directory)
    baloosearch -d <folder> <search term>
Comment 11 dagobertram 2021-07-02 13:05:33 UTC
*** Bug 439277 has been marked as a duplicate of this bug. ***
Comment 12 tagwerk19 2021-07-03 07:21:53 UTC
(In reply to mippo from comment #9)
> baloosearch "11" return only a lot of blank lines, maybe proportional to the
> number of matching items,
> 
> balooctl status says it's not running, even after enable and resume
Have a look at Bug 431664.

It refers to a collection of bugs (Bug 430891, Bug 430273, Bug 430435) describing somewhat similar symptoms - mostly with krunner rather than dolphin but the "blank line" and baloo crashing seem to match.

The solution here was to "balooctl purge" the index - delete the old and let baloo reindex from scratch.
Comment 13 dagobertram 2021-07-03 08:21:10 UTC
(In reply to tagwerk19 from comment #12)
> Have a look at Bug 431664.
> 
> It refers to a collection of bugs (Bug 430891, Bug 430273, Bug 430435)
> describing somewhat similar symptoms [...].
> 
> The solution here was to "balooctl purge" the index - delete the old and let
> baloo reindex from scratch.

Thank you very much! Thanks to you I finally found a workaround for the problem as shown here: https://bugs.kde.org/show_bug.cgi?id=430891#c4

1. balooctl disable
2. balooctl purge
3. reboot
4. balooctl enable

Now the search with baloo enabled works like a charm. We should make this a priority though: https://bugs.kde.org/show_bug.cgi?id=431664

*** This bug has been marked as a duplicate of bug 431664 ***