Skip to main contentSkip to footer

The easiest way to debug indexing problems is to use the WP CLI tools available in Relevanssi Premium. To see how Relevanssi sees the post 123, just use the following command on the command line:

wp relevanssi index --post=123 --index_debug=true

This will print out how Relevanssi sees the post, how it appears in the different steps of the indexing process and the database queries Relevanssi uses to save the post data.

If WP CLI is not available or you are using free Relevanssi, this’ll do pretty much the same thing:

add_action( 'wp', function() {
 if (is_user_logged_in()) {
  relevanssi_index_doc( 123, false, relevanssi_get_custom_fields(), true, true );
  exit();
 }
});

Add this snippet to your theme functions.php file and change 123 to the ID number of the post you want to inspect. Then go visit any page on the front-end of your site. Once you’re done, remove the code.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Pin a post for all searches
Relevanssi Premium has tools for pinning posts for specific queries and all searches where the post appears, but what if…
Filtering results by category
In order to filter search results by category, use the following code: $url = get_bloginfo('url'); $url = esc_attr(add_query_arg(array('cat' => '10',…
SearchWP Live Ajax Search

…One example is searching for attachments. By default, SearchWP Live Ajax Search doesn’t include any attachments in the search results. The post type is not a problem, but the post status is: SearchWP Live Ajax Search includes only posts with the post status publish, while attachments have a status of…Relevanssi doesn’t ship with a live search or autocomplete feature that would display results as the user types the search terms. There are many other plugins that provide this functionality, but few of these plugins work with Relevanssi. SearchWP Live Ajax Search is the best one that does. It’s very……to include private posts for the users who are allowed to see them. Just removing the post_status parameter will include drafts in the results. Normally drafts shouldn’t appear in searches, but since the SearchWP Live Ajax Search is an AJAX search, it is done in admin context, where drafts are…

Related Posts:

Comment Section:

2 Comments. Leave new

  • Hi,

    I’m using Woodmart theme for my store. When I use Woodmart AJAX search only it index the product page contents including product descriptions but product attributes and categories.

    When I add Relevanssi, it index all the attributes, categories but product content such as descriptions.

    How can I index product page content such as short description, product description along with attributes and categories using Relavanssi.

    Regards

    Reply
    • Product description is stored in the excerpt, so make Relevanssi index the excerpt. Product attributes and categories are taxonomies, so make Relevanssi index all those, too. Product description is just post content, which is always included.

      The Woodmart AJAX search doesn’t use Relevanssi. You can try this snippet in your theme functions.php to help with that:

      add_filter( 'woodmart_ajax_search_args', 'rlv_enable_relevanssi' );
      function rlv_enable_relevanssi( $args ) {
      $args['relevanssi'] = true;
      return $args;
      }

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed