Get WPFTS Pro today with 25% discount!

[Solved] How to index new posts which was added by the script?


  • Q: We have a script which is adding new files to the WP Media Library in a timely manner, using a cron job. Those files not shown in the search I guess because they are not indexed. We have to log in once in a couple of days to Rebuild Index manually. Is there any better solution to fix this?

    A: Yes. Normally when you're editing or adding posts/attachments manually (via WP Admin), each "Save" button click triggers the WP hook "save_post" which is forcing WPFTS Pro to rebuild the index for this particular post.
    In case you're making changes by some script, you have to include this code to your script (after all post changes)

    wpfts_post_reindex($post_id);
    

    This will force reindex of this particular post so you never need to Rebuild the whole index after post changes.

Suggested Topics

Be the first to read the news!

We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

Join Us Now!

We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.

ewm-logo-450

The forum powered by NodeBB | Contributors