Skip to content

No mechanism for Orphaned Editions to be removed from Solr once resolved #893

@hornc

Description

@hornc

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

# When an edition does not contain a works list, create a fake work and index it.

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.

Metadata

Metadata

Assignees

Labels

Module: MergingRecord mergingModule: SolrIssues related to the configuration or use of the Solr subsystem. [managed]

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions