Bug 475439 - Dolphin search doesn't find .db files
Summary: Dolphin search doesn't find .db files
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: search (show other bugs)
Version: 23.04.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-10 17:08 UTC by wooden445
Modified: 2024-07-08 12:00 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wooden445 2023-10-10 17:08:30 UTC
SUMMARY
Searching for the file extension .db returns no hits, even though the file exists. Searches for other extensions like .pdf and .jpg work as expected. 

STEPS TO REPRODUCE
1. Create a file with extension .db (test.db)
2. Press CTRL + F
3. Search for .db

OBSERVED RESULT
No files are found.

EXPECTED RESULT
Finding test.db.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
With some testing I created another file with the file extension .banana (test.banana). I don't find the file if I search for .banana in the same folder, but I do find it if I run the search from its parent folder. find ./ -type f -name "*.[extension]" finds both files.
Comment 1 tagwerk19 2023-10-10 18:24:29 UTC
You have Baloo running?

I think if you look in the baloo configuration file:
    ~/.config/baloofilerc
you'll see "*.db" included in the "exclude filters" list.

My assumption up until now was that these excludes were to stop baloo trying to content index these extensions (which could get messy), not exclude them completely from indexing...
Comment 2 wooden445 2023-10-10 20:31:36 UTC
(In reply to tagwerk19 from comment #1)
> You have Baloo running?
> 
> I think if you look in the baloo configuration file:
>     ~/.config/baloofilerc
> you'll see "*.db" included in the "exclude filters" list.
> 
> My assumption up until now was that these excludes were to stop baloo trying
> to content index these extensions (which could get messy), not exclude them
> completely from indexing...

Thanks, it seems removing the exception from baloofilerc does make .db searchable. I readded the exception and disabled file indexing, but .db remains unsearchable then too.

For some reason changing these settings also got the .banana searches to work.

Maybe the search screen could indicate that there are excluded search results, as well as an exception setting on the File Search settings page?
Comment 3 Nate Graham 2023-10-11 18:58:05 UTC
Maybe what we should do is have Baloo still index files by name if they're in the exclusion list, just not by content? We definitely don't want to content-index .db files, but not finding them at all also feels wrong to me.
Comment 4 wooden445 2023-10-14 03:04:36 UTC
(In reply to Nate Graham from comment #3)
> Maybe what we should do is have Baloo still index files by name if they're
> in the exclusion list, just not by content? We definitely don't want to
> content-index .db files, but not finding them at all also feels wrong to me.

Yes, that sounds like a big improvement!
Comment 5 tagwerk19 2024-07-08 12:00:17 UTC
(In reply to wooden445 from comment #0)
> With some testing I created another file with the file extension .banana
> (test.banana). I don't find the file if I search for .banana in the same
> folder, but I do find it if I run the search from its parent folder. find ./
> -type f -name "*.[extension]" finds both files.
I thought I ought to try indexing a banana, not something I've tried before :-)

    test@neonunstable:~/Testdir$ echo "Hello Penguin" > testfile.banana

    test@neonunstable:~/Testdir$ kmimetypefinder testfile.banana
    text/plain

    test@neonunstable:~/Testdir$ balooshow6 -x testfile.banana
    1417afed0da2dd 3977093853 1316783 testfile.banana [/home/test/Testdir/testfile.banana]
            Mtime: 1720439519 2024-07-08T13:51:59
            Ctime: 1720439519 2024-07-08T13:51:59
            Cached properties:
                    Line Count: 1

    Internal Info
    File Name Terms: Fbanana Ftestfile 
    XAttr Terms:
    Plain Text Terms: hello penguin
    Property Terms: Mplain Mtext T5 T8 X20-1 
    lineCount: 1

    test@neonunstable:~/Testdir$ baloosearch6 testfile.banana
    /home/test/Testdir/testfile.banana
    Elapsed: 0.873044 msecs

The important bit is that it is "text/plain" other banana types may not be indexable...