Real time indexing not working

  • wpsolr
    Keymaster
    4 months ago #38430

    Just to make sure: if we renew our subscription after one year, we will pay the old price?

    Exact.

    1. Where/how do we book another seat to the subscription?

    Here is the tutorial.

    2. Is it possible to change the url/domain after a while to use this second subscripion on? So we might use it on antoher testing server or another future live project?

    Yes. Just deactivate the subcription on the current domain, then activate it on the new domain.

    Stefan
    Participant
    4 months ago #38467

    Hi,

    i bought a second seat on our license so i could deactivated most plugins (except for ACF) but new posts are still not being indexed.
    I then started debugging the code, and I think the problem lies in the file wpsolr_include.inc.php, funtion add_remove_document_to_solr_index

    The problem of posts not being indexed only happens on insert, not on update or after restoring a post from trash.

    After inserting a post, the function add_remove_document_to_solr_index is first called with the $post parameter having the value $post->post_type = revision. A transient is set for the postId, but the post will not be indexed in function _add_remove_document_to_solr_index because WPSOLR_Model_Meta_Type_Abstract::get_is_model_type_can_be_indexed( $model_type->get_type() ) returns false.

    Then a second call to add_remove_document_to_solr_index is made with $post->post_type = ‘post’, but this time the post is not being indexed because the $post_id is now in $cache_indexed_posts as it was added in the first call and the function is exited at the first if statement.

    So i am pretty sure that this behaviour was introduced with version 23.5. as the code with the transients and the function _add_remove_document_to_solr_index was introduced in this version. Could you please check this?

    wpsolr
    Keymaster
    4 months ago #38468

    Your analysis is perfectly correct. The caching was introduced for indexing HPOS orders (custom tables), which behave in a different way as post types.

    I will fix it in WPSOLR 23.6, and find out why all the automated tests did not detect it.

    wpsolr
    Keymaster
    3 months, 3 weeks ago #38490

    WPSOLR 23.6 is ready.

Viewing 4 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic.