Bug 407664 - Dolphin search fully fail sometimes (impredectibly)
Summary: Dolphin search fully fail sometimes (impredectibly)
Status: REPORTED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.58.0
Platform: Neon Linux
: NOR grave
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-17 20:38 UTC by David Tejada
Modified: 2025-01-22 13:22 UTC (History)
5 users (show)

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


Attachments
The image shows the null result of search (127.02 KB, image/jpeg)
2019-05-17 20:38 UTC, David Tejada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Tejada 2019-05-17 20:38:05 UTC
Created attachment 120146 [details]
The image shows the null result of search

SUMMARY

Suddenly when you boot first time the system, the search of dolphin and krunner fail. In dolphin it happens when you search everything. In krunner it happens when you search files, it does not occour whith apps.

Probably (I think about), its a problem with any packs of snap, beacause I discovered the problem after of install firefox snap, but I am not sure.

STEPS TO REPRODUCE
1. Impredectible, normally in the first boot.
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kde NEON 15.5
(available in About System)
KDE Plasma Version: 15.5
KDE Frameworks Version: 5.58
Qt Version: 5.12

ADDITIONAL INFORMATION
Comment 1 Michael D 2019-06-07 12:07:21 UTC
Lately, I often get no results in dolphin when doing a search. I don't have file contents indexing enabled. When this happens, I have to disable baloo and reenable it to get Dolphin to return results. I have just had to do this probably the fifth time in the last few weeks.

I'm on Manjaro.
Comment 2 Nate Graham 2019-06-07 15:14:56 UTC
When Dolphin fails to find a file, please do the following:

- Run `balooshow [path to file you expect Dolphin to find]` That will show you whether or not it's indexed.
- Run `baloosearch [filename]` to See if Baloo itself can find it.
Comment 3 Michael D 2019-06-07 20:40:00 UTC
Just happened again today for the second time that dolphin fails to return search results. Also, tag categories appear in tags:/ but they're all empty.

[michael@michael-pc ~]$ balooshow ~/Dropbox/Articles/
11823740023275008 65024 2752929 /home/michael/Dropbox/Articles/
        Mtime: 1559727833 2019-06-05T11:43:53
        Ctime: 1559727833 2019-06-05T11:43:53

[michael@michael-pc Articles]$ baloosearch lewis\ -\ finkish\ dispositions\ \(1997\).pdf 
Elapsed: 0.129715 msecs

[michael@michael-pc Articles]$ balooctl status
Baloo File Indexer is running
Indexer state: Idle
Indexed 31274 / 31274 files
Current size of index is 25.93 MiB
Comment 4 Bug Janitor Service 2019-06-22 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Christoph Feck 2019-06-25 13:43:56 UTC
New information was added with comment #3; changing status for inspection.
Comment 6 tagwerk19 2021-03-30 09:13:22 UTC
There was a post in Bug 433204 flagging that baloo can hit a 'max_user_watches' limit. It can be "ridiculously low"...

It's worth checking with
    sysctl fs.inotify.max_user_watches

Contributing factors may be that snaps create some/many more folders that might need watching and that baloo and dropbox are both asking to use these notifications
Comment 7 tagwerk19 2021-07-12 18:33:33 UTC
(In reply to Michael D from comment #3)
> [michael@michael-pc Articles]$ baloosearch lewis\ -\ finkish\ dispositions\
> \(1997\).pdf 
> Elapsed: 0.129715 msecs 
This particular example matches up with Bug 438850 and you are being caught by the hyphen in the filename - the issue is the search for a single character.
Comment 8 tagwerk19 2022-01-16 22:43:36 UTC
(In reply to Michael D from comment #3)
> [michael@michael-pc Articles]$ baloosearch lewis\ -\ finkish\ dispositions\ \(1997\).pdf 
> Elapsed: 0.129715 msecs
This is likely to be far too old to be useful but I missed somethign important in my previous reply.

I think you'll find that
    balooshow -x lewis\ -\ finkish\ dispositions\ \(1997\).pdf 
gives you details of the file - as appears in the index

A
    baloosearch lewis\ -\ finkish\ dispositions\ \(1997\).pdf 
Does searches for "lewis", "finkish", "dispostions" etc and gives you results where they _all_ appear.

The problem is the single character "-", baloosearch doesn't return hits for one or two character searches. That means that the search including the "-" will give no results.

You can try simpler:
    baloosearch lewis
    baloosearch lewis finkish
searches and they'll probably work.
Comment 9 Bug Janitor Service 2023-07-10 15:26:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/165
Comment 10 Stefan Brüns 2023-07-10 15:26:54 UTC
Git commit c8d1b7cabcc810867f400e5ccfb96e41b03e0635 by Stefan Brüns.
Committed on 10/07/2023 at 15:22.
Pushed by bruns into branch 'master'.

[QueryTest] Add test case for terms folded to empty strings

The termgenerator removes leading, trailing and isolated punctuation
characters. While this is no problem for leading or trailing punctuation
as the normalized term is still non-empty, isolated punctuation ends up
as an empty string.

The matcher then tries to find e.g. "(content:'' OR filename:'')", which
returns not results, instead of the exptedted "everything". Unfortunately
it is non-trivial to remove such Terms.

For the prase test, this is not at problem, as it always sees the whole
phrase and can just skip the problematic part.

M  +15   -0    autotests/integration/querytest.cpp

https://invent.kde.org/frameworks/baloo/-/commit/c8d1b7cabcc810867f400e5ccfb96e41b03e0635
Comment 11 Stefan Brüns 2023-07-10 15:31:33 UTC
(In reply to tagwerk19 from comment #7)
> (In reply to Michael D from comment #3)
> > [michael@michael-pc Articles]$ baloosearch lewis\ -\ finkish\ dispositions\
> > \(1997\).pdf 
> > Elapsed: 0.129715 msecs 
> This particular example matches up with Bug 438850 and you are being caught
> by the hyphen in the filename - the issue is the search for a single
> character.

Single characters are not a problem, but isolated punctuation characters.
Comment 12 Stefan Brüns 2023-11-13 21:41:34 UTC
Git commit 6dbc3212825b2ffc360fda65f0022be224d9a5a1 by Stefan Brüns.
Committed on 13/11/2023 at 21:41.
Pushed by bruns into branch 'kf5'.

[QueryTest] Add test case for terms folded to empty strings

The termgenerator removes leading, trailing and isolated punctuation
characters. While this is no problem for leading or trailing punctuation
as the normalized term is still non-empty, isolated punctuation ends up
as an empty string.

The matcher then tries to find e.g. "(content:'' OR filename:'')", which
returns not results, instead of the exptedted "everything". Unfortunately
it is non-trivial to remove such Terms.

For the prase test, this is not at problem, as it always sees the whole
phrase and can just skip the problematic part.
(cherry picked from commit c8d1b7cabcc810867f400e5ccfb96e41b03e0635)

M  +15   -0    autotests/integration/querytest.cpp

https://invent.kde.org/frameworks/baloo/-/commit/6dbc3212825b2ffc360fda65f0022be224d9a5a1
Comment 13 Bug Janitor Service 2024-10-18 17:37:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/210