This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Search setup and config

#48376
Ernest MarcinkoErnest Marcinko
Keymaster

Hi Levon,

wp_insert_post is fine, but it’s only called whenever a post is created. I guess the tags are added separately after the post was inserted to the database, and that does not trigger a “save_post” action – and in that case the index is not triggered to update with the added tags.
After adding the tags is complete calling the do_action( ‘save_post’, $post_id, $post, $update ); once more is going to fix that.
It’s a common issue with generated posts, and unfortuantely we can’t add a hook to trigger on tag addition, as it would require of rebuilding the whole index.

You can actually use wp-cron and turn off indexing on post creation: https://i.imgur.com/MlrbHkh.png