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

Add new filter ep_default_analyzer_char_filters #2872

Merged
merged 2 commits into from
Jul 1, 2022
Merged

Add new filter ep_default_analyzer_char_filters #2872

merged 2 commits into from
Jul 1, 2022

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Jun 30, 2022

Description of the Change

html_strip doesn't allow searching for text within HTML comments. So, with Gutenberg blocks, if one wanted to search for the Jetpack Slideshow block with jetpack/slideshow, it can't be done.

It would be nice if users had that option to filter it out.

Alternate Designs

N/A.

Possible Drawbacks

N/A.

Verification Process

  1. Add a Jetpack slideshow block to a post
  2. Add the filter to disable the html_strip:
add_filter( 'ep_default_analyzer_char_filter', '__return_empty_array' );
  1. Re-index with mappings re-put in place
  2. Search for "slideshow" and see result

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added: New filter ep_default_analyzer_char_filters

Credits

Props @rebeccahum

@felipeelia felipeelia added this to the 4.3.0 milestone Jun 30, 2022
rebeccahum added a commit to Automattic/ElasticPress that referenced this pull request Jun 30, 2022
rebeccahum added a commit to Automattic/ElasticPress that referenced this pull request Jun 30, 2022
rebeccahum added a commit to Automattic/ElasticPress that referenced this pull request Jun 30, 2022
rebeccahum added a commit to Automattic/ElasticPress that referenced this pull request Jun 30, 2022
@felipeelia felipeelia merged commit 892bc73 into 10up:develop Jul 1, 2022
@rebeccahum rebeccahum deleted the add/char_filter_filter branch July 1, 2022 16:37
@rebeccahum rebeccahum changed the title Add new filter ep_default_analyzer_char_filter Add new filter ep_default_analyzer_char_filters Jul 1, 2022
@felipeelia felipeelia modified the milestones: 4.3.0, 4.2.2 Jul 11, 2022
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.

2 participants