-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
Implement proper Full Text Search #255
Comments
This requires a proper Full Text Search implementation. Subsonic and its Java clones use the awesome Lucene library (that would support a "did you mean" feature easily), but it would be too heavyweight to use it in Navidrome. There are options in the Go-land (like Bleve), but they are usually slow to update the index (making the scan too slow) and/or takes a lot of memory, going against one of the goals of Navidrome: to be as lightweigth as possible. Having said that, I plan to move the search to SQLite's Full Text Search implementation. This would help with typos and more relevant search results, and maybe would allow a "Did you mean" like functionality in the future. |
@deluan, would that allow for a single universal search bar instead of the current view-specific search (search albums/tracks/artists)? |
A single search bar is more of a UX concern than a technical implementation. The current "search" fields are actually filters for the current view. It is a different issue, feel free to create a new GH issue for it, although it would help having the SQLite FTS working first. |
Other than English, for example Japanese are not separated by spaces per word, so they can't use the full-text search for English . It would be hard to make the full-text search work for various languages. For example, if you want to search for the word "音楽" I expect it to be very slow, but I still think better results than putting Chinese, Japanese, Korean, etc. into a full-text search for English. |
v0.31.0...orlea:feature/simple-search This modified code actually works well enough in my 8000 song music library. However, it's probably bad for English etc. |
Hi @orlea , thanks for looking into this! I did some quick research for FTS in Asian languages and doesn't seem to exist a simple solution to the problem. I'll make the separator configurable as you suggested. Whenever I implement a real (western) FTS in Navidrome, I'll keep the current implementation as a configurable option. |
…chable fields, not only in word boundaries Based on feedback from @orlea, in #255 (comment)
Any update on this? |
Just to add a concrete example from my actual library, I was searching songs today for "bird" and expected both "Blackbird" and "Bluebird" to appear in the results, but it currently doesn't because of the way search currently works. |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. |
@deluan What's not working, if anything, for SQLite FTS? Are you considering implementing the above? |
Maybe we could introduce a feature that asks "Did you mean... ?" showing the closes matches when there are not matches.
This could be incredible helpful on big libraries when making a typo of when the spelling is just a little different like US or UK English.
Another option (less fancy) might be to include some kind of fuzzy search and/or allowing wildcards.
The text was updated successfully, but these errors were encountered: