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

Add "edition." prefix to search to only filter editions #9697

Merged

Conversation

cdrini
Copy link
Collaborator

@cdrini cdrini commented Aug 6, 2024

Closes #9585 . Adds a new optional prefix to search fields, edition. to mirror our work. prefix. This allows you to apply a certain field only to the editions during search.

Technical

Testing

Before: https://openlibrary.org/search?q=first_publish_year%3A%5B*+TO+1953%5D+language%3Aukr+-id_wikisource%3A*&mode=everything&sort=old&subject_facet=Nationalism
After: https://testing.openlibrary.org/search?q=first_publish_year%3A%5B*+TO+1953%5D+language%3Aukr+-edition.id_wikisource%3A*&mode=everything&sort=old&subject_facet=Nationalism

Screenshot

Stakeholders

@cdrini cdrini force-pushed the 9585/fix/add-edition-search-prefix branch from 2211f47 to a7b7dc5 Compare August 6, 2024 18:18
@cdrini cdrini marked this pull request as ready for review August 6, 2024 19:16
Copy link
Collaborator

@benbdeitch benbdeitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I've tested it out on gitpod, and edition.title successfully excludes works with the search would otherwise pull up, and vice versa. From reading through the code, I can't come up with an places where it would error out, either.

@cdrini cdrini merged commit 86ec5f8 into internetarchive:master Aug 7, 2024
4 checks passed
@cdrini cdrini deleted the 9585/fix/add-edition-search-prefix branch August 7, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants