Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search matches fields it is not supposed to #1290

Closed
AllKind opened this issue Oct 10, 2023 · 8 comments
Closed

Search matches fields it is not supposed to #1290

AllKind opened this issue Oct 10, 2023 · 8 comments
Assignees

Comments

@AllKind
Copy link

AllKind commented Oct 10, 2023

  • [ x] I have checked the FAQ for answers.
  • [ x] I have checked the Changelog that the issue is not already fixed.
  • [ x] I believe this issue is a bug, and not a general technical issue, question or feature requests that can be discussed on the forum.

Describe the bug
If I search for example title:searchstring, it will return matches matching the album fields - see screenshot.
I attach another screenshot, where I search for artist and it returns results matching the field title and/or album.
The sorting is set by Genre/Artist/Album in the provided screenshots.

To Reproduce
As said above.

Expected behavior
The search should be limited to the field which is provided.

Screenshots:
strawberry_search_error2


strawberry_search_error

System Information:

  • Operating system: Linux Mint 21.2 Cinnamon (Custom kernel 5.15.134)
  • Strawberry Version: 1.0.20
@AllKind
Copy link
Author

AllKind commented Oct 10, 2023

Just now I have that search result, I can't even explain. It just seems wrong, as none of the search criteria match:

strawberry_search_error3

@jonaski
Copy link
Member

jonaski commented Oct 10, 2023

Make sure you do not have space between "title:" and the search term, otherwise it will search for the search term in all tags, as the actual search term for title will be treated as blank.

@AllKind
Copy link
Author

AllKind commented Oct 10, 2023

Ah, I see! Thank you for answering! And in general for your work!
I recently switched from clementine and if I correctly recall, the space didn't matter.
I wonder if it's worth asking as a feature request to remove the blank(s) before the first word of the search term?
Anyhow I'll close this, as the bug is on me.
Have a good day!

@AllKind AllKind closed this as completed Oct 10, 2023
@jonaski
Copy link
Member

jonaski commented Oct 10, 2023

Working on rewriting the entire search, so we might improve this too.

@AllKind
Copy link
Author

AllKind commented Oct 10, 2023

As it just comes to mind:
One thing I was always missing in clementine and I think it's the same for strawberry is a way to define a search term as "strict" or in other words "exact".
For example, as I have a lot of latin tracks, a search for very general short words like "title:soy yo" brings up hundreds of matches. It would be nice for me to let strawberry just look for titles exactly named "soy yo".

@jonaski
Copy link
Member

jonaski commented Oct 10, 2023

I tested Clementine and it works even with whitespaces after colon like you said, so I became curious and looked into why, and I see it's because it's written quite differently, it just appends everything you type to the search query, while strawberry specifically expects a token after the colon, and ignores it otherwise. I didn't even remember this, but I remember it now.
So I made a fix now so it strips off whitespaces after colon, this way it works with whitespaces in between too.

@AllKind
Copy link
Author

AllKind commented Oct 10, 2023

Wow, great!

@AllKind AllKind reopened this Oct 10, 2023
@jonaski
Copy link
Member

jonaski commented Oct 10, 2023

Should be fixed

@jonaski jonaski closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants