Stop indexing from test instances

  • prakashreddy.imduri
    Participant
    2 weeks, 5 days ago #31524

    Hi,
    we have multiple test instances which we clone to push code to production, while adding some test products in instances, its getting indexed into our live index, and causing some conflicts.
    Can you pls provide some action, to prevent indexing if its a test instance ?

    // add_filter( WPSOLR_Events::WPSOLR_FILTER_SOLARIUM_DOCUMENT_FOR_UPDATE, 'disable_indexing', 1, 5 );
    function (disable_indexing) {
    if (instance !== 'Live') {
    // code to stop indexing
    }
    }
    prakashreddy.imduri
    Participant
    2 weeks, 4 days ago #31526

    any update on this ..

    wpsolr
    Keymaster
    2 weeks, 4 days ago #31527

    You could just throw an exception in your code to stop the indexing.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.