WordPress.org

Forums

Relevanssi - A Better Search
Indexes not updating with new posts (6 posts)

  1. technabob
    Member
    Posted 3 years ago #

    I'm running the latest version of Relevanssi Premium (1.7.6) on both of my websites, and I just noticed that new posts don't seem to be getting added to the index on either site when I save them. Manually rebuilding the index works fine, but that's certainly not practical.

    Any ideas on what I should look for to try and sort through the cause? Are there specific plugins which could be problematic?

    http://wordpress.org/extend/plugins/relevanssi/

  2. technabob
    Member
    Posted 3 years ago #

    One thing to keep in mind is that we never "live publish" our posts - they're almost always scheduled using the native wordpress scheduled posts capability. Could this in some way be preventing these from being indexed?

    FWIW, I tested turning on the search within admin feature, and created a new post, and none of my drafts or pending posts show up when I search either. For now, I've disabled the admin search feature, but I still need a better way to ensure new posts are indexed.

    I thought about using the cron method, but we have very large databases on each site, and I'm concerned that a full daily rebuild could be a big resource hog.

  3. technabob
    Member
    Posted 3 years ago #

    Oh, and one last note. It seems that simply clicking "Continue Indexing" in the interface adds the recently added documents without a full reindex. Is it possible to use cron to just call this function instead of a full reindex, or will it cause other problems?

  4. technabob
    Member
    Posted 3 years ago #

    Would adding (true) to the relevanssi_build_index call work to reindex only posts not already indexed?

    if (!wp_next_scheduled('relevanssi_build_index')) {
        wp_schedule_event( time(), 'daily', 'relevanssi_build_index(true)' );
    }

    Just a thought I had. Ideally, though, the standard save_post hook would work so they'd be added immediately once saved (or published).

  5. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    Indexing scheduled posts shouldn't be a problem. I tested this on my test blog and it worked as it should: saved posts are indexed, as are scheduled posts. Drafts also appear in admin search.

    So, it's something else. Is there something that might be interfering with the regular save_post filter? Since you're a Premium subscriber, you could drop me a mail through the Premium Support contact form with more details.

    Your idea of a cron job should work, yes.

  6. technabob
    Member
    Posted 3 years ago #

    I dropped you a note with details on the plugins installed on my sites as well as a couple more details up on the support form. Let me know if that helps nail down the cause. If not, I might have to go the cron route.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags