Bug 391462 - Wrong search behaviour
Summary: Wrong search behaviour
Status: REOPENED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 0.0.81
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-06 08:59 UTC by Michal Hlavac
Modified: 2023-05-02 10:44 UTC (History)
5 users (show)

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


Attachments
searching for bjork 1 (26.10 KB, image/png)
2018-04-23 06:40 UTC, Michal Hlavac
Details
searching for bjork 2 (18.68 KB, image/png)
2018-04-23 06:40 UTC, Michal Hlavac
Details
elisa wrong search (457.38 KB, video/x-matroska)
2019-12-16 08:30 UTC, Michal Hlavac
Details
Test track (40.41 KB, audio/mpeg)
2022-01-04 09:41 UTC, Nagy Tibor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Hlavac 2018-03-06 08:59:00 UTC
if I search for bjork and artist metafield is set to Björk, result is empty.
Comment 1 Stefan Brüns 2018-03-22 00:54:03 UTC
Can you please provide the output of the command:

balooshow -x <filename>
Comment 2 Michal Hlavac 2018-04-23 06:40:29 UTC
Created attachment 112181 [details]
searching for bjork 1
Comment 3 Michal Hlavac 2018-04-23 06:40:51 UTC
Created attachment 112182 [details]
searching for bjork 2
Comment 4 Michal Hlavac 2018-04-23 06:43:17 UTC
Hi, sorry my problem is not in accent free search, but something completely different. Uploaded 2 screenshots, when I search "bjo" result is OK. BUt when I search for "bjor" it returns no result and that is wrong.
Comment 5 Stefan Brüns 2018-07-04 23:51:47 UTC
Michal, this is still missing the output from balooshow -x <filename>

If you don't provide the information required for fixing this problem, we are unfortunately forced to close this bug.
Comment 6 Christoph Feck 2018-07-30 22:22:54 UTC
If you can provide the information requested in comment #5, please add it.
Comment 7 Michal Hlavac 2018-07-31 06:24:55 UTC
In other words, are you saying that if file search feature is disabled in KDE, then search elisa is not working? 

balooshow -x ~/Music/Bjork/1993\ -\ Debut/01\ -\ Human\ Behaviour.mp3 
The Baloo index could not be opened. Please run "balooctl status" to see if Baloo is enabled and working.
Comment 8 Christoph Feck 2018-08-17 20:53:32 UTC
Thanks for the update; changing status for inspection.
Comment 9 Stefan Brüns 2018-08-17 21:55:33 UTC
(In reply to Michal Hlavac from comment #7)
> In other words, are you saying that if file search feature is disabled in
> KDE, then search elisa is not working? 

No, elisa *can* use baloo, but it does not have to. But the component is wrong then.
Comment 10 Ashwin Dhakaita 2019-01-04 08:43:37 UTC
I tried to replicate the bug and I don't think the bug is still present. When I tried to play with it, the Search Bar doesn't recognize accented characters, not even the 'ö' letter. Just wanted to know, if it would be of any use to make accented characters searchable in NavigationActionBar.
Comment 11 Matthieu Gallien 2019-05-02 20:47:45 UTC
I am currently unable to replicate the behavior you had encountered.
To search for Björk, I have to type exactly "Bjö".

I am not sure a change in behavior is sensible (like trying to find "Björk" when typing "Bjork").
Comment 12 Alexander Stippich 2019-11-07 17:34:23 UTC
Can this one be closed?
Comment 13 Christoph Feck 2019-12-01 15:14:30 UTC
If you can provide the information requested in comment 12, please add it.

Recents comments seem to indicate the issue is no longer reproducible.
Comment 14 Bug Janitor Service 2019-12-16 04:33:07 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 15 Michal Hlavac 2019-12-16 08:30:16 UTC
Comment 12 is not asking for anything. Issue still occurs in 0.4.2 and has same behaviour. Comment 10 is wrong, bug is still present.

Short video of this behaviour is in attachment
Comment 16 Michal Hlavac 2019-12-16 08:30:37 UTC
Created attachment 124522 [details]
elisa wrong search
Comment 17 Nagy Tibor 2022-01-04 09:14:20 UTC
This smells like a Unicode combining diacritics issue for me. That would explain why "Bjo" brings up that track and "Bjor" doesn't.

"Björk" (U+006F LATIN SMALL LETTER O, U+0308 COMBINING DIAERESIS)
versus
"Björk" (U+00F6 LATIN SMALL LETTER O WITH DIAERESIS)
Comment 18 Nagy Tibor 2022-01-04 09:41:22 UTC
Created attachment 145102 [details]
Test track

I could reproduce this, here's a dummy test track. Elisa doesn't do any Unicode normalization, I'm fairly sure that's the root cause of this.
Comment 19 Bug Janitor Service 2022-01-17 20:41:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/319
Comment 20 Nate Graham 2022-01-19 16:25:28 UTC
Git commit 1747155bf2e32f0d182fcb1dca0db6431dbd136b by Nate Graham, on behalf of Yerrey Dev.
Committed on 19/01/2022 at 16:25.
Pushed by ngraham into branch 'release/21.12'.

Enable unicode normalization on track data before matching

Normalizes the value of mainValue, artistValue and oneArtist with
Qt provided normalization before it is compared to
mFilterExpression's mFilterText and used for search. mFilterText is
also normalized before it's being matched against.

With this fix the provided "Björk" file in the bug report is correctly
found when searching "Björk" in the search bar.
FIXED-IN: 21.12.2

M  +1    -1    src/models/abstractmediaproxymodel.cpp
M  +1    -1    src/models/filebrowserproxymodel.cpp
M  +3    -3    src/models/gridviewproxymodel.cpp

https://invent.kde.org/multimedia/elisa/commit/1747155bf2e32f0d182fcb1dca0db6431dbd136b
Comment 21 Michal Hlavac 2023-05-02 10:44:13 UTC
This does not work. Searching for artists e.g. "Björk" with the search prefix "Bjo" shows empty result.