You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tests are really meant to be testing the prioritization of sticky posts, but first need to of course send that test home query to ES. Something like this:
Just making this an issue for now, as it's turned into a bit more of a timesink than intended. If anybody else wants to work on this, be sure to make sure the tests can actually fail if the special sticky posts logic is removed, rather than just relying on WP_Query core logic to carry the burden.
The text was updated successfully, but these errors were encountered:
Here, EP attempts to add a weight to sticky posts if on doing the homepage query: https://github.com/Automattic/ElasticPress/blob/develop/includes/classes/Indexable/Post/Post.php#L1188-L1217
This is how the core WP Query does it: https://github.com/WordPress/WordPress/blob/6b7ba33d6851fea58bc3214c2b9e4316aa918fa5/wp-includes/class-wp-query.php#L3131-L3133
I believe the checks in EP are not sufficient / errorsome, and should be more along these lines:
Furthermore, these tests are broken / not actually testing anything: https://github.com/Automattic/ElasticPress/blob/develop/tests/php/indexables/TestPost.php#L4102-L4142. The second
testStickyPostsExcludedOnNotHome
test also falls into the same issue as #63 - it will sometimes fails if based on if the posts share a timestamp or not.The tests are really meant to be testing the prioritization of sticky posts, but first need to of course send that test home query to ES. Something like this:
Just making this an issue for now, as it's turned into a bit more of a timesink than intended. If anybody else wants to work on this, be sure to make sure the tests can actually fail if the special sticky posts logic is removed, rather than just relying on WP_Query core logic to carry the burden.
The text was updated successfully, but these errors were encountered: