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

[Course Search] Update search index when course content is changed #196

Closed
bradenmacdonald opened this issue Mar 6, 2024 · 0 comments · Fixed by openedx/edx-platform#34391

Comments

@bradenmacdonald
Copy link
Contributor

bradenmacdonald commented Mar 6, 2024

"As a course author, I always want search results to be up to date"

Building on #195.

Requirements:

  1. When a new component/section/etc. is created, it should be added to the search index automatically.
  2. When a component (in a course) is edited in Studio, its entry in the search index should be updated automatically.
  3. When a course, section, subsection, unit, or parent block (e.g. library content block, split test block) is renamed, its entry in the search index should be updated automatically, and the location/breadcrumbs field of all child blocks should be updated automatically.
  4. When something (component/subsection/etc) is moved to another place in the course, all relevant breadcrumbs should be updated.
  5. If the "reindex all courses/libraries" command is currently running, make sure it doesn't undo these changes. (The changes should either (A) be applied to the new index [perhaps in addition to the old/current index] or (B) be queued until after the reindex is complete.)
  6. Publishing content has no effect; this entire index and story refers only to 'draft' content (what authors see in Studio).

Ideally:

  1. These things will happen asynchronously.
  2. If the search engine (e.g. Meilisearch) is offline/down at the moment the change is made, the update will be queued; once the search engine is back online, the index will be updated. (Note there are at least two ways to do this: one is by maintaining a queue of updates and writing them to the index when you can; the other is maintaining a list of "blocks that need updating" and regularly queuing a task to work through the list)
  3. The same code can be used to keep (v2) library blocks up to date in the index (only do it as part of this PR if easy and quick).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant