INTR-341 Fix search breaking during deployment #955
+44
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The search currently breaks because we have atomic rebuild enabled and we do 2
update_index
calls, one with--schema-only
and one without.How it breaks:
update_index
call with--schema-only
builds a new index with just the schema changes and then changes the pointer for the search backend to use this new index (This index has NO documents)update_index
call populates the documents and then changes the pointer over when doneHow to test this locally:
Start your local environment on the
main
branchRun
./manage.py update_index_async
Navigate to some search results (ideally with people in the response)
Re run the
update_index_async
command and keep refreshing the search results pageTo test the fix, simply checkout this branch and rerun the above steps 😄
JIRA ticket referenced in title
Title is clear and concise
Description gives any relevant detail
Tests are up to date
Documentation is up to date