alleyinteractive / alleyinteractive/searchpress
When terms get updated, reindex affected posts asynchronously
- Langage dominant
- PHP
- Étoiles
- 85
- Forks
- 10
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Likely requires: https://github.com/alleyinteractive/searchpress/pull/98
When a term is updated (and, that update impacts term data stored with posts, which OOTB includes the `slug`, `name`, and `parent`), an async task should kick off which loops through all posts in the term and reindexes them. Note that a term could have any number of posts (thousands, even millions!), so care must be taken to do this as efficiently as possible.
## Implementation Notes
After #98, that async task could simply update the post meta to flag that the post needs reindexing, and a separate indexing task will handle that process. However, that ultimately requires querying for each post twice: the first time via term, and the second via post meta. It might make more sense to reindex the post in the same async process that queries for the posts in the updated term, although that would likely be less DRY.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.