Join GitHub today
improve work indexing of representative data #736
With tests for edge cases I could think of.
Tricky taking care of reindexing a work when it has a child work as a representative, and that child work's representative has changed. Have to put some expensive solr lookups in indexing.
Tests are pretty slow, maybe another 30s to these new tests. Best I could come up with so far. Wary of mocking too much stuff that I'm not super confident won't change in a future version, causing tests to false pass.
Indexing completed on staging, without errors. Completed in 2 hours 50 minutes.
I realize this is potentially doing a bit of extra work on bulk-reindex, due to the code to trigger an index on 'parent' work using a child work as a representative, when a child work is reindexed. Some works could end up reindexed multiple times in a bulk reindex.
Still 2 hours 50 minutes seems about what we expect for a bulk reindex, not sure if it's worth trying to fix.
Edited: Actually, no, this won't be triggered in reindexing, because our reindexing is still using the (deprecated)