• Resolved maxkardanets

    (@maxkardanets)


    Greetings!

    I’m using the latest free version of the plugin.
    When I click on the “Build the index” button, after a few seconds I get:

    Wiping out the index... Counting posts... 1879 posts found.
    Indexed 0 posts (total 0), processed 1879 / 1879.
    Indexing complete. 1879 posts excluded.

    It looks like Relevanssi for some reason thinks that all posts on the site are prohibited from indexing.

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

    (@msaari)

    If the Relevanssi debugger doesn’t tell you why the posts are excluded, you can try this:

    add_filter( 'relevanssi_indexing_restriction', function( $restriction ) {
      error_log( $restriction['mysql'] );
      return $restriction;
    } );

    Add this to your theme functions.php and reindex, and it will print to your error_log the exclusion code Relevanssi uses. That should give you an explanation of why the posts are being excluded.

    Thread Starter maxkardanets

    (@maxkardanets)

    Hi Mikko,

    Thanks for the answer.

    I added the following code:

    function test_relevanssi_log($restriction) {
    	error_log('==='. PHP_EOL . $restriction['mysql'] . PHP_EOL, 3, $_SERVER['DOCUMENT_ROOT'] .'/relevanssi_log.txt');
      return $restriction;
    }
    add_filter('relevanssi_indexing_restriction', 'test_relevanssi_log');

    And this is what I got:

    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
     AND post.post_type IN ('post', 'page', 'attraction-guideline', 'user-manual', 'products', 'general', 'teams', 'wfm', 'development', 'guest-guidelines', 'partner-guidelines', 'senior-guidelines', 'guest-manual', 'partner-manual') 
    ===
    
    ===
     AND post.post_type IN ('post', 'page', 'attraction-guideline', 'user-manual', 'products', 'general', 'teams', 'wfm', 'development', 'guest-guidelines', 'partner-guidelines', 'senior-guidelines', 'guest-manual', 'partner-manual') 
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===
    
    ===

    Plugin indexing settings page in admin panel: https://prnt.sc/1kma146

    Plugin Author Mikko Saari

    (@msaari)

    A Relevanssi Premium client had a similar issue recently, and in their case this same behaviour was caused by a missing wp_relevanssi database table. Could this be the case here as well?

    Thread Starter maxkardanets

    (@maxkardanets)

    Hi Mikko,

    Yes, the problem was with the database user who didn’t have permission to create tables.

    Thanks for the solution.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problems with indexing’ is closed to new replies.