Closed adamwoodnz closed 2 weeks ago
Related issue for filtering search results by Language: https://github.com/WordPress/Learn/issues/2577
The easiest way to solve this is likely using a taxonomy instead of post meta (see comments on https://github.com/WordPress/Learn/issues/2577). Given this only happens when searching specifically I think it can be addressed post launch.
Jetpack search indexing isn't picking up the new taxonomy, reopening while we investigate.
I've looked into it, and it appears that the indexing is picking up the new taxonomy correctly. It's only the search condition that isn't translated to ES. I've opened https://github.com/WordPress/Learn/pull/2843 as a potential fix - not sure if it that's the right approach, but it should at least showcase the problem.
@westnz @jonathanbossenger this taxonomy based filtering should be working now. https://learn.wordpress.org/?s=spam and https://learn.wordpress.org/?s=quiz&post_type=lesson both should be displaying content as expected.
I've migrated all the lessons that had the 'Hidden Lesson' post meta applied to the new Visibility taxonomy. From now on you can set this in the sidebar instead:
I'll be removing the old setting next.
This production Lesson is set to be hidden:
We added a new post meta
_lesson_archive_excluded
to the Lesson post type, to enable to hiding specific Lessons (eg. quizzes) from archive and search views.This works in local development and for the lessons archive in production, but not with Jetpack search running in production. I have tested this on the staging site without Jetpack Search running and it works.
Steps to reproduce
Expected
The lesson remains hidden
Actual
The lesson is included in the search results