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

handle automatic re-indexing because of change in associated model? #121

Open
jrochkind opened this issue Apr 14, 2021 · 0 comments
Open

Comments

@jrochkind
Copy link
Contributor

Kithe provides some callback-based logic to automatically trigger re-index of Kithe models upon changes -- with features to disable/customize that etc.

But what if you are indexing based on an associated object? For instance, let's say a Work indexes the collection name(s) to provide faceting on collection. Work to collection is many-to-many with a join table.

This would mean Works would need be re-indexed if: A) A collection it belongs to changes it's name, or B) a Work changes what collections it is assigned to.

Right now, there is no way to make this happen automatically, you'd just need to make sure to re-index the work yourself if these things happened.

Should we put model-callback-based automatic logic in to configure things so that if, in that situation, the relevant Works could be automatically reindexed similar to for changes in the Work itself?

It does not need to be just work-collection, it could be any association, possibly even not Kithe::Model, associations to additional entities.

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

No branches or pull requests

1 participant