Genre, Subgenre, and Audience Tags on Works
Feature Request
System-wide support for first-class genre tags on Works (books), including schema, admin/type registry, API changes, UI/UX, editing, autocomplete, search/index, data migration, and developer/user documentation.
Breakdown
- Update olclient/schemata/work.schema.json (and infogami type registry) to support genres: List of Tag (tag_type: genre)
- Ensure API/backend changes propagate to/from infogami + storage
- Add display of genres (as labeled chips) to templates/type/edition/view. html and work.html
- Update editing UI for genres: input, add/remove chip JS, autocomplete, CSS
- Canonicalize genre tag UX style & shape; document, get agreement
- Implement dedicated genres autocomplete using
/tags.json?tag_type=genre - Update Solr schemas, update Solr updater logic, ensure search/facet by genre
- Write tests (schema, UI, API, Solr), migration/backfill script
- Add developer and end-user documentation. Plan for upgrade/feature flag, Solr reindex.
- See full checklist in ticket for complete file-by-file breakdown and gotchas.
Example of github's editor for topic tags:
@mekarpeles Hi! Can I work on this issue?
@akramcodez Hi, this issue is an epic (meaning it is a project management issue for tracking a larger milestone and not a single issue) it is also labeled as Needs: Staff/Internal, so it's not an appropriate issue for the community. Thank you for offering!
@mekarpeles Thanks for the RFC. Could we break this down into smaller deliverables? For example, adding genres to API responses and schema validation first. I can work on those sub-tasks.
@Aryama-srivastav you're right -- this one is blocked on next steps! Will update as time permits.
Hey @mekarpeles , I have been exploring the Tag Clean Up project idea and saw this is the issue related to it. I know this one is a epic right now but I would love to help in unblocking and fixing this issue. So can you tell me if it's possible that I can discuss the following with you :- -The expected outcomes from the project -My understanding and approach for the project. -As well as your approach and expectations.
I believe I could also build something like a classifier that takes subjects tags and classifies them into genre, moode and places using python libraries.
Hi @mekarpeles , I'd like to work on this issue.
I'm setting up the OpenLibrary development environment locally and will start by reproducing the problem to better understand the expected behavior. I'll share progress or a proposed fix soon.
Please let me know if there are any specific guidelines or parts of the codebase I should look at for this issue.
While going through the issue and exploring the relevant parts of the codebase locally, I noticed that the current approach seems to rely on the logic in the controller/template layer to determine the behavior described above. From a maintainability perspective, would it make sense to centralize this logic a bit more so that similar cases are handled consistently across different views?
One thought I had while experimenting locally was whether this logic should live closer to the model/helper layer rather than being handled in multiple templates/controllers. That might make it easier to reuse and avoid future inconsistencies.
Curious to hear your thoughts on whether this would align with the intended design, or if there are architectural constraints in OpenLibrary that make the current approach preferable. @mekarpeles
This document should be of value to those interested in pursuing this project for GSoC 2026: https://docs.google.com/document/d/1zrZAXgk2GEZRWb0D8tsrgaPzX4KdXHVt1s6ZQ4wUHLI/edit?tab=t.z3z5sh3tlfro#heading=h.ap5wmmnyzaw5
Thanks @mekarpeles for sharing this! I’m currently exploring the tag clean-up project for GSoC 2026 and planning to contribute, so this is really helpful for understanding the direction.
Hi @mekarpeles — I'm Raj, a CS undergrad at SVNIT Surat applying for GSoC 2026. I've been going through this RFC and the Canonical Tags doc you linked in the thread.
One thing I'm trying to wrap my head around for the migration piece, the subjects field right now is just flat strings like "Pirates--Fiction" or "Adventure and adventurers--Fiction". My thinking is the "--Fiction" suffix is actually a really strong signal that could be used as a first-pass heuristic to assign genre tags before even needing any ML. Like a simple rule that says: if it ends in "--Fiction", map it to the Fiction genre tag.
Is that roughly the direction you have in mind for the backfill? Or is the plan more to handle it purely through the typed Tag system going forward and not try to backfill the old subjects?
Also noticed the Canonical Tags doc mentions there's no documentation for OL Tags yet — is that something a GSoC contributor should tackle as part of this project or is it being handled separately?
Thanks for the detailed RFC, really helpful context.
@modi02 some of this should be described this this guide https://docs.google.com/document/d/1zrZAXgk2GEZRWb0D8tsrgaPzX4KdXHVt1s6ZQ4wUHLI/edit?tab=t.z3z5sh3tlfro#heading=h.wn6ff51dxx4w
@Chisomnwa may I assign this one to you?
Hello @mekarpeles. Yes, I'll be glad to work on this issue. Thank you! I'm looking into it now.
Hi @mekarpeles! I've looked through the issue and I understand it's the parent epic for the canonical tags project. Since this covers the full pipeline from the vocabulary to schema to UI, and building on what we discussed on Tuesday, May 12th, 2026, I'll start with the foundational pieces first:
-
Finalize the genre/subgenre vocabulary. i.e expanding genres/vocabulary.json and scripts/mappings/genres.json in the tags repo.
-
Run coverage analysis - use the downloaded works data dump that I already have and check what patterns match against the mapping dictionary.
Once those are solid, I'll move to the openlibrary-side work (schema, backfill, e.t.c). I'll go ahead and open a PR on the tags repo for the vocabulary changes.
Hi @mekarpeles, I've started working on issue #11610 and opened a PR #7 on the tags repo. This PR is the first step toward solving the messy tag objects problem — it expands the genres mapping dictionary with LC subject heading patterns to improve book discovery.
This is part of the GSoC 2026 Tag Clean Up project I'm leading.
Kindly take a look. Thanks!
Hi @Chisomnwa, a scoping question before anyone starts on it.
#13755 maps the whole Tags effort, and this epic is linked there as the home for genres, subgenres and audiences on works. One gap it lists is a way for librarians to set genres / subgenres / audiences on a work from the edit form. That overlaps items 3, 4 and 6 here (chips on the work page, editing UI, autocomplete).
Before anything gets filed or started on that:
- Are items 3, 4 and 6 something you're planning to take on yourself, or have in progress?
- If not, would you be happy for a separate issue to cover the librarian editing UI, linked from here? It would build on the field-name and shape decision in #13755 §2, so it wouldn't start before that's settled either way.
No rush, and "I've got it" is a perfectly good answer. We just don't want to duplicate anything you're already doing.