-
Notifications
You must be signed in to change notification settings - Fork 321
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When the get_es_posts runs shouldn't there also be a call to _prime_post_caches?
While testing backend search in wp admin posts list using EP plugins adds ton of additional queries for posts, posts meta, terms meta etc. while the default wp query is using the prime post caches function and do it in a bulk.
For now we added this as a workaround:
add_action('ep_wp_query', function ($new_posts) {
$post_ids = [];
foreach ($new_posts as $key => $post) {
$post_ids[]= (int) $post->ID;
}
_prime_post_caches($post_ids);
});
Steps to Reproduce
Described above.
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress and ElasticPress information
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working