Support » Plugin: Relevanssi - A Better Search » Build the index never finishes/gets stuck.

  • naets

    (@naets)


    Hi Support. We have been using this plugin for quite some time and indexing only used to take a few minutes. Lately we updated all the site’s plugins and after that indexing gets stuck and never finishes after hitting the “Build the index” button.

    The, plugin is up to date, shortcode expansions are disabled and browser hard refresh has been done as advised.

    Can you advise on how to get indexing to complete?

    Screenshot: https://www.loom.com/i/f51ba02c08034ba88302565ab4063dc3

    The page I need help with: [log in to see the link]

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

    (@msaari)

    Have you tried disabling other plugins to see one of those causes this problem? Does disabling custom field indexing help?

    Thread Starter naets

    (@naets)

    Hi Mikko,

    The custom field indexing was disabled.

    I disabled all plugins except Relevanssi and WooCommerce, and tried to build the index again.

    Initially all went well and indexed up to 160 posts at a time: https://www.loom.com/i/00ed8ebd94d84e298c633d5009018ac3

    But then it slowed and started indexing only one post at a time: https://www.loom.com/i/ae147ef778b944f0b41e146ddb5f54e1

    I then abandoned it by hitting refresh, and tried indexing unindexed posts. Took really long to index just a few posts, so abandoned that as well: https://www.loom.com/i/955783d5806948798f207beaca631941

    What else do you recommend?

    Plugin Author Mikko Saari

    (@msaari)

    What kind of content is there in these posts Relevanssi can’t index well? Just plain text or something more complicated? Plain products?

    With Relevanssi Premium, I’d recommend giving the WP CLI indexing a go, but unfortunately, that’s not an option with the free version of Relevanssi.

    Thread Starter naets

    (@naets)

    It is products from our WooCommerce store KillerDeals.co.za

    It used to work fine up until recently with the free version, what could be the cause for it to stop working? Any other advice to get it working again?

    Plugin Author Mikko Saari

    (@msaari)

    Clearly something has changed for the worse but I don’t know what changed on your site, so I can’t tell why it’s not working. I’ve gone through all the common problems with the indexing and none seem to apply here.

    You can try this:

    add_filter( 'relevanssi_indexing_adjust', '__return_false' );
    add_filter( 'relevanssi_indexing_limit', function() { return 10; } );

    This will set Relevanssi to always index 10 posts at the same time. See if this helps.

    Thread Starter naets

    (@naets)

    Thanks, where should I add this?

    Plugin Author Mikko Saari

    (@msaari)

    Theme functions.php or in a code snippet would be fine.

    Thread Starter naets

    (@naets)

    Thanks for that. I added the code and it went slow and eventually got stuck again:

    https://www.loom.com/i/7462c446c01248b9aaaee33eb0291ae7

    Will the premium version of the plugin work 100% with indexing? Any other suggestions to check?

    Plugin Author Mikko Saari

    (@msaari)

    Premium uses exactly the same indexing engine, so the results will, unfortunately, be the same.

    There is something in your posts or in the process that slows Relevanssi indexing down.

    You can find out the Relevanssi indexing MySQL query with this function:

    add_filter( 'relevanssi_indexing_query', function( $query ) {
      error_log( $query );
      return $query;
    } );

    This will print out the MySQL indexing query to the server PHP error log. I’d index posts until it gets stuck again, then take the last query from the error log and run that on the MySQL server to see what it says – perhaps that will show what’s taking so long there.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.