Search API HTML Element Filter
This module provides a Search API preprocess plugin to remove specific HTML elements, like sidebars or unwanted content, from fields before they are indexed. This helps refine search results by cleaning up the indexed HTML.
Includes a Search API preprocess plugin that can be used to remove certain elements from markup before it is indexed. Useful when indexing "Rendered HTML" entity fields that contain sidebars or other unwanted content.
How to use
1. Install the module
2. Go to your Search API index
3. Enable the HTML Element Filter plugin
4. Configure the plugin - select the fields you want to process and the elements that need to be removed, using CSS selectors (e.g. To remove sidebars with the "my-sidebar" class, add .my-sidebar)
5. If the HTML filter plugin is enabled, make sure the HTML Element Filter plugin runs before it in the Preprocess index order