I have the same issue on my website - so I took msaari advice and used the mail() call to try and see where the Index code was failing.
The function relevanssi_index_doc($indexpost, $remove_first = false, $custom_fields = false) {
was being called from where my posts were being saved - however the Post ID it pickup was always ID=20!!! I never changed.
So I created another function, added it to my function file - it is the same as except for the top few lines - and I explicitly called it from my save post code.... - not sure if this will help anyone else but it solved the issue for me.
function relevanssi_index_doc($indexpost, $remove_first = false, $custom_fields = false) {
global $wpdb, $relevanssi_table, $post;
$post_was_null = false;
if (is_array($post)) {
$post = $post['ID'];
}
if (!isset($post)) {
$post_was_null = true;
if (is_object($indexpost)) {
$post = $indexpost;
}
}
if ($post == NULL) return;
is_object($post) ? $ID = $post->ID : $ID = $post;
$post = get_post($ID);
to
function relevanssi_index_doc_byId($geo_post_id, $remove_first = false, $custom_fields = false) {
global $wpdb, $relevanssi_table, $post;
$post_was_null = false;
$post = get_post($geo_post_id);
.......