• Resolved sergio79

    (@sergio79)


    Hi, congratulations on this great plugin!
    I use a product import plugin (WP All import) for an ecommerce site with lots of items (15k+). I’ve noticed that the index is automatically created the moment the products are imported, but the functions that I entered, for example, to have all product variant SKUs indexed, are not executed (maybe). Is it possible to disable this indexing, and create the index via schedule/cron?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mikko Saari

    (@msaari)

    To stop indexing, do this:

    add_action( 'init', function() {
        remove_action( 'wp_after_insert_post', 'relevanssi_insert_edit', 99 );
    } );

    Instructions for cron indexing are here.

    Thread Starter sergio79

    (@sergio79)

    Thanks so much for the reply, it seems like a super valid solution.
    I would like to schedule indexing every 3 hours, is there a log or is it possible to know the date of the last indexing so as to check if the cron is working correctly?

    Plugin Author Mikko Saari

    (@msaari)

    Relevanssi itself doesn’t have logging like that, but since you need to do the files for the cron job, you can add logging or email notifications to those files.

    Thread Starter sergio79

    (@sergio79)

    Ok perfect, last question, with the relevanssi_build_index function is the index deleted and re-created, or are only the posts not yet indexed indexed? Thanks so much!

    Plugin Author Mikko Saari

    (@msaari)

    It depends. If the first parameter is false, the index is deleted; if it’s true, the indexing will only index new posts.

    Thread Starter sergio79

    (@sergio79)

    Awesome!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable auto-index, schedule index’ is closed to new replies.