-
Notifications
You must be signed in to change notification settings - Fork 1
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
Book search is failing to reindex correctly if events are changed (add/delete/reassociate) without updating work record #667
Comments
Have configured a nightly cron job to reindex works in the interim until this is resolved. The cron job should be turned off when this is fixed. |
Add signal handlers to reindex work on event save/delete #667
I went to the test admin site and created a new item -- 2020 by Virginia Woolf. I created one event -- a Hemingway borrow. I then went to the test site: the book was there, but the search page was showing 0 events. I added another borrow to the same book -- by Stein -- and still 0 events on the search page. I don't know how I tested it differently earlier. I added a borrow to a preexisting item -- Brooke's 1914. The search page only shows one event when there should be two. |
@jkotin I think I figured out what's going on here — indexing was working if you saved generic events but not if you saved borrows and purchases. Please test to confirm that my fix resolves this. |
Yes, it works. I tried borrows, purchases, and generic -- the additional events showed up in search results and on bibliography page. |
Describe the bug
When a work is altered on the test-admin site, the test-production site adds the new work but does not reindex the old work on the book sort page. For example, when I divided "Vanity Fair" from one periodical with 16 events to the periodical with 4 events and another entry for the novel Vanity Fair with 12 events, the production site shows the novel entry with 12 events but still shows the periodical work with 16 entries when it should only be 4. This is only wonky on the search page; when you click through to the individual work bibliography page, circulation page, and card page it does the expected 4 events.
RSK put it more concisely on Slack: the error is happening if you change events (especially add/delete/reassociate) without updating the work record.
To reproduce
Steps to reproduce the behavior:
Expected behavior
When events within a work are changed (added, deleted, or re-associated) the book search page should show the correct number of events.
Screenshots
Example of error with Vanity Fair:
The text was updated successfully, but these errors were encountered: