No mechanism for Orphaned Editions to be removed from Solr once resolved #893
Labels
Module: Merging
Record merging
Module: Solr
Issues related to the configuration or use of the Solr subsystem. [managed]
Orphaned editions (ones without Works) are currently indexed in Solr as
/works/<edition_ID>
e.g/works/OL20454633M
This is a workaround to allow them to appear in search results
openlibrary/openlibrary/solr/update_work.py
Line 1127 in d1fb792
When a work is added by a move or other edit, there is nothing that notices the change and removes the old
/works/<edition_ID>
from the index, so the fake work will continue to appear in search results./works/<edition_ID>
needs a Delete update sent to Solr.Currently the only way to remove them is to manually add the
/works/<edition_ID>
keys to admin/solr interface.Suggestion:
When the solr updater script sees an edition edit in the Infogami logs, in the
changeset
/changes
fields, it should send a delete request to Solr for the/works/<edition_ID>
This will produce some delete requests for non-existent keys, but this does not cause a problem for solr. The alternative would be to query solr to find whether a '/works/` key exists for that edition, and delete if so. My thinking is that sending a delete anyway will put less load on solr but have the same end result.The text was updated successfully, but these errors were encountered: