WordPress.org

Forums

Relevanssi - A Better Search
Rebuild index upon post update? (9 posts)

  1. maorb
    Member
    Posted 3 years ago #

    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,
    Maor

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. maorb
    Member
    Posted 3 years ago #

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

  4. Stuart09
    Member
    Posted 3 years ago #

    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

  5. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

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

  6. Stuart09
    Member
    Posted 3 years ago #

    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

  7. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    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).

  8. Stuart09
    Member
    Posted 3 years ago #

    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

  9. Mikko Saari
    Member
    Plugin Author

    Posted 3 years ago #

    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).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags