Skip to content

Returned posts from ep_integrate=true are missing guid #69

@WPprodigy

Description

@WPprodigy

https://github.com/Automattic/ElasticPress/blob/develop/includes/classes/Indexable/Post/QueryIntegration.php#L359-L401

$normal_query = new WP_Query( [ 'p' => 7369046 ] );
$normal_query->posts[0]->guid;
=> ""https://example.com/?p=7369046"

$es_query = new WP_Query( [ 'p' => 7369046, 'ep_integrate' => true ] );
$es_query->posts[0]->guid;
=> "" :(

Need to make sure no other fields are missing as well, so logging here for now.

Side note: Really prefer the way es-wp-query just takes that IDs from the es results and then fetches accurate objects from SQL afterwards. Ensures things being returned are up to date, in case of index falling out of sync on an item. Especially in cases where not all meta/terms are indexed on purpose, but still might need to be fetched alongside the object being returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions