-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Author aliases not always recognised when searching for books #3063
Comments
The way title/author search works is that a hidden postgres function creates a weighted search vector that includes the title, author, subtitle, and series name it in the Author aliases aren't included in the search vector, and I think the first step to updating the SQL query would be removing it from that migration so that it can be edited in a remotely normal way. It may be that the best way to delete the vector is to create a migration that drops it from the database (as the reverse migration in 0077 does). Once it lives in a relatively sane location, it would just be a matter of editing some confusing and complicated PSQL |
This sounds like a good idea. But it also begs the question: how come aliases seem to work sometimes in author searches? |
I would bet that the author is listed in Chinese on some of the editions, and a different edition than the one that appeared in the search is being displayed. Once the search happens on the database level, there's some complicated logic that decided which edition of a work should be shown, and it can end up showing you the default edition rather than the one matched by postgres |
Hm well that doesn't seem to be the case for the example you linked. |
Yes, that would unblock any work that needs to touch search_vector... I've prepared a PR for it, #3134. |
Describe the bug
Searching for a name should return books by author/s with that string in the
name
oralias
fields. e.g. https://bookwyrm.social/search?q=刘慈欣However this appears to be inconsistent. e.g. https://youtu.be/InCOD_6wBP0
I'm splitting this issue out from #3047 because this looks like a bug, whereas the inability to set a particular form of authors names to match the display language is really an enhancement request.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Both of these searches should return the same result
Screenshots
If applicable, add screenshots to help explain your problem.
Instance
reads.netsphere.pub
Additional context
See #3047
I assume this behaviour is determined by
search_title_author
inbookwyrm.book_search.py
but I don't understand enough about the django search functionality to see where this might be going wrong.The text was updated successfully, but these errors were encountered: