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

When a resource is deleted, remove its index object too #2153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcoyne
Copy link
Member

@jcoyne jcoyne commented Mar 28, 2019

No description provided.

return unless write?

blacklight_solr.delete_by_query(
"#{Spotlight::Engine.config.resource_global_id_field}:#{to_global_id}"
Copy link
Member

Choose a reason for hiding this comment

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

I think there's probably another necessary component to this to deal with solr documents that are generated into the index from multiple resources. To start with, we may need to do additional bookkeeping to track resources -> solr ids in the database.

Copy link
Member Author

Choose a reason for hiding this comment

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

So, we need to check that resource_global_id_field is only a single element and that single element is this resource?

Copy link
Member

Choose a reason for hiding this comment

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

And do the work to make sure resource_global_id_field is multi-valued when necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants