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

Fix Custom results are not highlighted #3010

Merged
merged 1 commit into from
Sep 30, 2022
Merged

Fix Custom results are not highlighted #3010

merged 1 commit into from
Sep 30, 2022

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR fixes the issue where the custom results are not highlighted. The root cause of this issue is that in posts_results method we replaced the Post Object with just the Post ID and, due to that, we lost the Post that is fetched from the ElasticSearch

https://github.com/10up/ElasticPress/blob/develop/includes/classes/Feature/SearchOrdering/SearchOrdering.php#L658

Closes #2974

How to test the Change

  • Activate Custom Results feature.
  • Create custom results for a search term and manually include results that include the search term in the title.
  • Search on the front end.

Changelog Entry

Fixed - Custom results are not highlighted

Credits

Props @burhandodhy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

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

Successfully merging this pull request may close these issues.

BUG: Custom results are not highlighted
2 participants