Bug 475326 - Search doesn't return items based on substring comparing
Summary: Search doesn't return items based on substring comparing
Status: REPORTED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.110.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: baloo-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-07 15:55 UTC by medin
Modified: 2023-10-12 07:07 UTC (History)
3 users (show)

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


Attachments
Search doesn't return items based on substring comparing (229.16 KB, image/png)
2023-10-07 15:55 UTC, medin
Details
Wrong result for "*data" (238.20 KB, image/png)
2023-10-07 18:07 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2023-10-07 15:55:56 UTC
Created attachment 162146 [details]
Search doesn't return items based on substring comparing

The comparing is working only if the searched word is found between two separators like '.', space or '_', but it doesn't work if the word is concatenated to other non separator characters. See attached image for more info.
Comment 1 medin 2023-10-07 18:07:04 UTC
Created attachment 162148 [details]
Wrong result for "*data"
Comment 2 Nate Graham 2023-10-11 16:07:23 UTC
Does the same thing happen in the command-line `baloosearch` program?
Comment 3 medin 2023-10-11 16:45:45 UTC
(In reply to Nate Graham from comment #2)
> Does the same thing happen in the command-line `baloosearch` program?

Yes, the same results are returned by "baloosearch" command.
Comment 4 tagwerk19 2023-10-11 18:43:31 UTC
If you using the Baloo index, then this is not supported as per Bug 452628 (and also Bug 453291)

Dolphin's "There and Then" search - that it falls back to if Baloo is not available - does however manage wildcards.
Comment 5 medin 2023-10-11 18:56:21 UTC
(In reply to tagwerk19 from comment #4)
> If you using the Baloo index, then this is not supported as per Bug 452628
> (and also Bug 453291)
> 
> Dolphin's "There and Then" search - that it falls back to if Baloo is not
> available - does however manage wildcards.


If I disable Baloo I get much more weird results:

Consider the following files inside a folder : 
lessdata.txt
godata_test.txt
datatest.txt
data.test.txt
data_test.txt

- Searching for "*data*" returns nothing
- Searching "data" returns all files
- Searching "data*" returns all files
Comment 6 tagwerk19 2023-10-12 07:07:13 UTC
(In reply to medin from comment #5)
> - Searching for "*data*" returns nothing
> - Searching "data" returns all files
> - Searching "data*" returns all files
Apologies, you are quite right.

The filenamesearch copes with substrings (searches for "ata" and "ess" work for me) but not with arbitrary wildcards (searches for "*ata*", "*ess*" don't).