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 API Fails to Return Results for Multi-Keyword Queries #899

Open
DesarrolloAntonio opened this issue May 2, 2024 · 4 comments
Open
Labels
type:bug Something isn't working

Comments

@DesarrolloAntonio
Copy link

Data

Shiori version: 1.6.3

Describe the bug / actual behavior

When performing a search on the API with a single keyword, results are returned as expected. However, adding a second keyword results in an empty response list.

Expected behavior

I expect the search to return results that match both keywords.

To Reproduce

1 - I have a bookmark with this value, title":"Kotlin Design Patterns: Observer Explained | ProAndroidDev"
2 - With this endpoint (http://192.168.1.26:18080/api/bookmarks?page=1&keyword=kotlin) returns the correct elements
3 - With this endpoint (http://192.168.1.26:18080/api/bookmarks?page=1&keyword=kotlin%20Design) returns an empty list

@DesarrolloAntonio DesarrolloAntonio added the type:bug Something isn't working label May 2, 2024
@github-project-automation github-project-automation bot moved this to To do in Roadmap May 2, 2024
@DesarrolloAntonio DesarrolloAntonio changed the title One line description of the bug Search API Fails to Return Results for Multi-Keyword Queries May 2, 2024
@Monirzadeh
Copy link
Collaborator

just for add more data after a quick test:
search can't return Kotlin De but return result for this Kotlin Design 🤔

@DesarrolloAntonio
Copy link
Author

just for add more data after a quick test: search can't return Kotlin De but return result for this Kotlin Design 🤔

With "kotlin Design" works

@Monirzadeh
Copy link
Collaborator

Monirzadeh commented May 2, 2024

just for add more data after a quick test: search can't return Kotlin De but return result for this Kotlin Design 🤔

With "kotlin Design" works

we change the logic of search a little in #721. as i remember searching is case insensitive so it return the result. maybe this need improvement but first we should solve current issue.
@fmartingr you work on that part of code more than me. do you have any idea? somehow it just search for text that separate with space..

@fmartingr
Copy link
Member

As with a lot of other things, searching needs to be revisited at some point. I have been tempted to use bleve but that would make twice the storage for the same amount of bookmarks. Each database engine would need to have it's own Search method with SearchOptions passed from the query. I will fill in a proper issue when I sit down and think about it, there's just too many things to work on 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

3 participants