alleyinteractive / alleyinteractive/searchpress

When terms get updated, reindex affected posts asynchronously

Đang mở
#40 1 bình luận 0 reaction 1 người được giao Được @mboynes nhận Xem trên GitHub
enhancement
Ngôn ngữ chính
PHP
Star
85
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.