Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returned posts from ep_integrate=true are missing guid #69

Open
WPprodigy opened this issue Oct 16, 2020 · 0 comments
Open

Returned posts from ep_integrate=true are missing guid #69

WPprodigy opened this issue Oct 16, 2020 · 0 comments

Comments

@WPprodigy
Copy link

WPprodigy commented Oct 16, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant