Posted on

If indexing doesn’t work

Indexing can fail in several ways. Here are some typical problems:

Blank screen

If indexing ends up in blank screen, there can be several explanations. The most innocent is simple time out. If the database is too large to index on one go, the indexing will fail. The solution is simple: click “Continue indexing” until the indexing finishes. Keep your eye on the number of indexed documents: that should increase after every click.

If the number of indexed documents isn’t going up, there’s a problem. Typical cause is a plugin conflict. Some plugins don’t work with Relevanssi, for some reason. Usually it’s caused by short codes. You can try that by disabling shortcodes in Relevanssi or deactivating a plugin that uses shortcodes. If you do that and try to index, indexing should work. If you deactivated the plugin, you can now activate it again and everything should work (except searching for the shortcode content, which is not in the index, of course).

Successful index, no documents in the database

Sometimes the indexing goes through without problems, but nothing goes in the index (the number of documents in the index is blank or zero). This is likely caused by a database problem, for some reason Relevanssi can’t insert data in the database. Check the database tables: they may be missing or corrupt. Try deactivating and activating Relevanssi again.

For more instructions, see Debugging indexing problems.

44 comments If indexing doesn’t work

  1. Im still having issues regarding indexing – blank screen – unsure how to resolve this tested plugins but nothing ๐Ÿ™

    1. Wel, if it’s not a timeout or a plugin conflict, then it’s hard to say. Do you have access to server error logs? Those might contain some clues of what’s going on.

  2. Hi,

    I’m using the basic Relevanssi on my WP blog. But it never works. The search results always look like the standard WordPress search results. Then I tried other search plugins like “WP Search Extracts” and they don’t work either. The results always look like my basic wordpress search and show full posts, not excerpts. Highlighting plugins don’t work either. But “Dave’s WordPress Live Search” does work.

    I really want to use Relevansii. Any advice?

    I’m using WP v3.2.1 and have tried uninstalling all my plugins and only installing Relevansii and it still didn’t work.



  3. Using version 2.9.10. I am getting 0 docs in the index. Clicking Build the Index and Continue Indexing doesn’t change that. Searching returns no results. No errors in web server log.

    When on 2.9.9 I had about 460 docs in the index. I clicked “Continue Indexing” a few times but that number did not increase so I clicked “Build the Index” and it dropped to 0.
    I deactivated and reactivated the plugin, bumped it to 2.9.10 but no change.
    I uninstalled the plugin data and did deactivate/reactivate but no change.

    Any suggestions for further troubleshooting?

      1. Ouch, I have 32 plugins and some of the very important ones use shortcodes.
        If I turn on WP_DEBUG do you think I will see useful error messages for this issue?

        1. Maybe, I haven’t tried. It’s usually easy to see what’s the problem, if the indexing hangs up with a certain post. At least some Google Maps plugins and FLV video player conflict with Relevanssi.

  4. Hi
    When I try to index I’m getting

    Fatal error: Call to undefined function mb_internal_encoding() in /web2/user21830/website/wp-content/plugins/relevanssi/relevanssi.php on line 2345

    Any thoughts?

    1. You need to have multibyte string functions enabled. Relevanssi should work without them, but apparently I missed some function calls. I’ll fix that in the next version, but meanwhile you can (and maybe should) ask your host to enable multibyte string functions.

  5. hi,

    indexing basically works for me, but i have to initiate it manually every few days for the index to include the newest posts.

    Is there any option i don’t see to automate this?

      1. I noticed this too and was just poking around the kb for answers. I noticed I also have to manually index for new posts to show up. At what interval should it check for new posts and re-index?

          1. I found that if you create a post from the admin area, it will index the posts immediately. But unfortunately for anyone out there using Gravity Forms with a front end form that users can publish to automatically, you will have to manually re-index for the posts to show up.


          2. Oh, it’s quite possible Gravity Forms doesn’t trigger the action hooks that Relevanssi relies on. There’s a way to run the indexing automatically as a cron job, see end of the faq.

  6. I have some 1700+ posts, but the indexing only goes to 1067. After numerous ‘500 internal server errors’, that is, but I don’t mind.

    But now, no matter how few documents (50, 20, 10) I want to add, the number of documents in the index won’t rise. ‘500 internal server error’ once again and no documents added. I deactivated all the plugins, I got the ‘expand shortcodes’ box unchecked… What else should I do?

    1. 500 Internal Server Error is unfortunately competely devoid of useful information. Without knowing more of what’s up, it’s hard to say how to fix it. Try to see if server error logs offer any information about the problem.

  7. I’m not very familiar with server error logs. This is what I think you mean. It doesn’t seem very detailled to me.

    [log clipped]


    1. Yeah, that is unfortunately not helpful at all.

      You might want to take a look at the next post after 1067, is there something unusual about it that might break the indexing?

  8. Nothing special. I moved the particular post to the trash can, but to no avail.

    I’m tired of this, but that’s okay: I noticed the indexing goes up as I edit posts that weren’t in the index before, and since I was planning to retag all the posts (yes, every 1700+ of ’em), all will end up in the index, in the end. Thanks for quick responses and for a wonderful plugin. It does exactly what I want from a search engine. For weblogs it’s even better than Google Search, as it adds new posts to the index right away.

  9. Hi,
    I installed the plugin and it works great but fter couple of days my website began to work so slow.
    So I chcked the tables in database and relevansi had 26,000+ KB which is more than 6 times more than any other table.
    Is it normal?


  10. Hi there, I am using the premium version of the plugin on a site I built with buddypress members. I need to EXCLUDE user level of “subscriber” from the search…I noticed in the “Relevanssi Premium Search Options” there is an option with a checkbox called “Index subscriber profiles:” It was previously CHECKED but I later decided to remove the subscriber level from being found on the search…so I UNCHECKED it and clicked “build the index”, hoping that it would rebuild the index and exclude subscribers. But I’m still finding users of subscriber level when I search for them.

    What am I doing wrong? Any assistance would be appreciated.


    1. Which version are you running? I made some changes to the subscriber indexing code in the latest version, so it’s possible I broke it somehow. I’ll have to take a look at it. If you’re not running, do update to that one and try if that helps.

  11. Hello,

    We are using Relevanssi with Press Permit. We’ve got a custom privacy setting in place that allows us to protect our documents and force authentication. The problem is that all documents with this custom privacy setting are not getting added to the index. Is this a Relevanssi problem or a Press Permit problem? I saw you mentioned running a cron job to fix this problem (as it pertains to Gravity Forms), but that sounds very scary, as our database is huge…

    Thanks in advance.

    1. Huge database is in general a bad idea with Relevanssi. Relevanssi is not built for huge databases.

      I’m not sure what’s the problem here, as I don’t know how your custom privacy setting is implemented.

      1. We are trying to use Relevanssi on a single site (or a few sites) on a multisite network. There are about 40 sites on the network right now total. This particular site does not have an excessive about of of tables associated with it. We do have about 1600 items in our custom post type it is querying, but that doesn’t seem like it would be too much. The number of posts is exactly why we were hoping to use Relevanssi for our search results.

        As for our custom privacy options, we are using Press Permit to create the custom privacy options, but they should function just like a normal private post status does. Does Relevanssi integrate normal private posts into the search results after an item is published? Is there a setting for that we are just missing?

        1. Ok, that’s not huge (unless you want to query the whole network).

          Relevanssi should index private posts (if their status is set to private) by default. In order to have them appear in the search, you need to create a custom filter on the relevanssi_post_ok hook (see the relevanssi_default_post_ok() function) that lets Relevanssi know when it’s ok to show a post to a user.

      1. the database has capped at about 850, I wouldn’t call the site huge unless I was to read through every piece of content piece by piece! there’s about 2000 pages in total and about 3500 post id’s

  12. Hi, I’m running into an error where when I try to rebuild the index, php and mysql are locking up. php hits 100% cpu and I have to restart the service. This is the query it is executing when it happens:
    | 313024 | zt | localhost | news | Query | 0 | NULL | INSERT IGNORE INTO z3relevanssi (doc, term, term_reverse, content, title, comment, tag, link, author, category, excerpt, taxonomy, customfield, type, taxonomy_detail, customfield_detail, mysqlcolumn)
    VALUES (33920, ‘brother’, REVERSE(‘brother’), 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ‘post’,….. (query continues for a long time)

    Any help please?

      1. Unfortunately I quite like the plugin. How big a database should it be able to handle? This website is a medium size, 3,000 posts, 60,000 comments.

        1. 3000 posts is definitely not a problem, 60000 comments may be. Does the index work better if you leave out the comments? Also, if the server can’t handle the heavy process and time out when necessary, then that’s going to be a problem, no matter what the size.

  13. Not able to search the Chinese text..
    Relevanssi is not indexing the Chinese posts..
    Any luck plz..

    1. No luck, sorry.

      If the Chinese text is in UTF-8, Relevanssi can read it and index it. However, Relevanssi simply does not work with Chinese or Japanese: these languages do not separate words in a way Relevanssi understands. Thus, even if you could index the contents, they wouldn’t make any sense. So unfortunately you have to forget about using Relevanssi with Chinese or Japanese.

  14. Hi,
    I installed the plugin premium and it works great but it not indexing โ€ž16:8โ€œ (which is a important searchterm in my website).
    In which way I can force relevanssi to find numbers like this?


    1. Thomas, by default Relevanssi replaces colons with spaces, so “16:8” becomes “16 8”, which doesn’t index. You can add this code to your theme functions.php to make Relevanssi remove colons completely, so “16:8” becomes “168”, which can be indexed:

      add_filter( 'relevanssi_punctuation_filter', 'rlv_fix_colons' );
      function rlv_fix_colons( $filter ) {
          $filter[':'] = '';
          return $filter;

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.