• Resolved johncrhea

    (@johncrhea)


    I’m having trouble fully indexing my site. Relevanssi will index all but about 57 of my various posts, pages, and custom post types (out of ~ 16,000).

    It silently fails at the index giving no errors. The one of those 57 entries that I have found has no index data whatsoever (as found on the debugging page). No errors or any other info. I can get information from relevanssi_index_doc, but don’t see anything that screams of an error. I also haven’t been able to nail down anything different about this post or why it’s not in the index. (It is from a custom post type, but others from the custom post type have been indexed without issue)

    There are no PHP errors, or any other type of errors I can find. Query Monitor only shows one query on the indexing page.

    When I try to re-index the site it tries to index 367 entries instead of just the 57, giving output like this:

    Counting posts… 57 posts found.
    Indexed 10 posts (total 10), processed 10 / 57.
    Indexed 20 posts (total 30), processed 30 / 57.
    Indexed 25 posts (total 55), processed 55 / 57.
    Indexed 30 posts (total 85), processed 85 / 57.
    Indexed 35 posts (total 120), processed 120 / 57.
    Indexed 40 posts (total 160), processed 160 / 57.
    Indexed 45 posts (total 205), processed 205 / 57.
    Indexed 50 posts (total 255), processed 255 / 57.
    Indexed 55 posts (total 310), processed 310 / 57.
    Indexed 57 posts (total 367), processed 57 / 57.
    Indexing complete. -310 posts excluded.

    I initially had an issue with a custom shortcode that caused problems with indexing (95% wouldn’t index), but I solved that. I also tried not expanding shortcodes when indexing, but that didn’t change the output behavior.

    I have no problems completing the index on my local copy of the machine. Production is the only place this is happening… of course…

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

    (@msaari)

    That sounds like a problem where something in the posts changes the global $post during the indexing, so that when Relevanssi tries to index the post 1234, instead the content will be indexed for post 2345, which then causes Relevanssi to think the post 1234 is still not indexed, and Relevanssi will attempt to index it again.

    That usually leads to endless indexing process, though, but in any case, that’s what this smells like.

    Now, usually these problems are caused by shortcodes and are solved by not expanding the shortcodes, but not always. I just recently had a Premium customer with a problem like this, and there the problem was caused by an ACF field that referenced other posts. Excluding that particular custom field from the index solved the problem. Could this be something like that?

    Thread Starter johncrhea

    (@johncrhea)

    Thanks for the quick response. An ACF field was causing the issue just as you suggested. Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Some Posts Won’t Index’ is closed to new replies.