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

Apply facets filters directly into the ES query and support and/or across different facet types #3045

Merged
merged 14 commits into from
Oct 17, 2022

Conversation

felipeelia
Copy link
Member

Description of the Change

After #3044 made the ep_post_filters filter available, this PR applies selected facet filters directly into the ES query, that way:

  1. We can apply the and/or logic only on the facet filters
  2. In an "OR" scenario, people can still code a required meta or taxonomy and apply the or logic only in the facets. For example, navigating in Tax A Term A archive, people want to get posts with Meta A or Tax B Term A. The current codebase would wrap everything in the same logic and bring posts that do not have Tax A Term A in it (but do have Meta A, for example.)

Closes #2970

How to test the Change

Changelog Entry

Changed - Facets filters are not applied in the WP Query level anymore

Credits

Props @felipeelia

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.

@felipeelia felipeelia self-assigned this Oct 4, 2022
@felipeelia felipeelia added this to the 4.4.0 milestone Oct 12, 2022
@felipeelia felipeelia merged commit 084ef7c into develop Oct 17, 2022
@felipeelia felipeelia deleted the feature/issue-2970 branch October 17, 2022 15:50
@burhandodhy burhandodhy mentioned this pull request Dec 6, 2022
4 tasks
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.

Facet by Meta AND Taxonomy: The any/or operator
1 participant