Support » Plugins and Hacks » Rebuild index upon post update?

Rebuild index upon post update?

  • I have another question, so I ask it in a new thread.

    I had a post with some tags, and then I added another tag to the post and saved it. Then, when I searched the for this tag, it did not find that post with the new tag.

    Only after rebuilding the index, that was found.
    In another tag, also a rebuild of index did not help and it was not found.

    Question is should the site editor really build the index every time some data in a post is being updated? If not, how often the index is being refreshed/rebuilt?

    Many thanks,


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


    Relevanssi should index automatically whenever post is saved. More precisely, indexing is triggered whenever ‘edit_post’, ‘save_post’, ‘publish_post’ or ‘publish_page’ action hook is triggered.

    In normal use, there should be no need to rebuild the index manually after you do it once.

    I will re-check this and see what is going on there.
    Many thanks.

    My index is not being updated automatically. I deleted all my posts and recreated them using xml-rpc. Theses ~400 new posts have ids from 37238 to 37668 but the “Relevanssi Search Options” says “Highest post ID indexed: 31650”. Searching does not find anything. I have to rebuild the index using the “Relevanssi Search Options” screen. Any ideas on how I can get my index to be updated automatically?

    I’m using wordpress 3.1.3 and Relevanssi 2.9.3 (at least that what’s in the readme.txt

    Plugin Author Mikko Saari


    If you update one of those posts, does it appear in the index?

    I removed all my posts. The new posts are numbered from 39131 to 39286. The new posts are made in two steps. Using the Java XML-RPC interface, I create them empty and then modify the title and description. Relevanssi does not index them. It has only indexed to 37668. After an update of a post via the web interface this post is indeed indexed. This does not help me as I will never update my posts via the web interface. Adding a comment to an un-indexed post via the web interface does not cause the post to be indexed.

    Is there anyway that I can get my posts indexed using the Java XML-RPC interface?

    thanks, Stuart

    Plugin Author Mikko Saari


    See the plugin FAQ for a method to index the database through WordPress scheduling (you can set up a cron job to call the same function if you want to).

    I don’t understand. My user uses my Java program to create lots of posts and then expects to find them in the index. Are you saying that there is some way that I can get “relevanssi_build_index” to be called from my Java program? Please let know how! thanks, Stuart

    Plugin Author Mikko Saari


    No, that’s not going to work, but you can put the code in FAQ to, say, functions.php in your theme and the posts will be indexed every day (if the database is small enough to be indexed in one go).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Rebuild index upon post update?’ is closed to new replies.