• Resolved marcqdigital

    (@marcqdigital)


    Take a look at result 2 and 3 on this page: https://www.queerty.com/?s=a%20man%20who%20posed. The second story is pulling the content from the 3rd story, a really old post instead of its own. This is happening to a majority of the stories that have been published recently, the content looks to be from other very old posts. When I check the Algolia index I do see that the content that is stored in Algolia is wrong somehow, it pulled the content from the 3rd story. When I edit these stories in WP and just click update to resend the data to Algolia then it’s fixed, but there must be something going wrong to cause this in the first place. I reindexed my whole site and the problem persists. I appreciate your help in figuring this out!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter marcqdigital

    (@marcqdigital)

    I have four other sites that also use this plugin and they are all working properly. All sites are on version 2.8.1 of the plugin.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    What sort of content/indexing customizations have you made for the site? Assuming you have, does the issue go away when you temporarily remove those customizations and let the defaults index things?

    I find it curious that result 2 and 3 are almost perfectly matching except result 2 also has Don't forget to share: coming in as part of the content.

    Thread Starter marcqdigital

    (@marcqdigital)

    I’ve made similar adjustments to each of my sites, on the site with issues here are my customizations:

    // Customize Algolia index fields
    
    function my_post_attributes( array $attributes, WP_Post $post ) {
    
    $attributes['post_title'] = strip_tags(get_the_title($post));
    
    if($post->post_excerpt) {
    
    $attributes['post_excerpt'] = strip_tags(get_the_excerpt($post));
    
    } else {
    
    $attributes['post_excerpt'] = '';
    
    }
    
    if(get_field('Slug', $post->ID)) {
    
    $attributes['kicker'] = get_field( 'Slug', $post->ID );
    
    }
    
    if(get_the_post_thumbnail($post)) {
    
    $attributes['images']['thumbnail']['url'] = qdigital_get_the_post_thumbnail_url($post, 340, 340, 'smart');
    
    }
    
    if(get_field('byline', $post->ID)) {
    
    $attributes['post_author']['display_name'] = get_field( 'byline', $post->ID );
    
    }
    
    // Always return the value we are filtering.
    
    return $attributes;
    
    }
    
    add_filter( 'algolia_searchable_post_shared_attributes', 'my_post_attributes', 10, 2 );

    I’m not making any adjustments to the content however.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm. Nothing standing out for that part, but now I’m wondering how things are turning out right at the end of the indexing process after the records have been parsed out, but before sent to the API. However, that’s nothing we’re going to be able to predict from our end.

    Is it possible at all to disable every plugin except WP Search with Algolia and see if that changes the results at all? Potential other filters are somehow influencing the end results.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Ever find a solution here @marcqdigital ?

    Thread Starter marcqdigital

    (@marcqdigital)

    I’m not sure what the issue was, but it luckily ended up clearing up on it’s own ??

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Well that’s good to hear ??

    Let us know if you need anything else @marcqdigital

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.