Add a generic regex replace processor [#3401862]

Problem/Motivation

As a SITE BUILDER I want a simple way to replace a given string in a field to be indexed with another string. For example, I have two different content types, landing_page and landing_page_legacy, which for the purposes of search I want to treat as one type. The simplest way for me to achieve this is to have occurrences of ‘landing_page_legacy’ type replaced with ‘landing_page’ before they are saved to the type field in the search index. Then all my facets and filters see only one content type.

Proposed resolution

Add a simple regex processor, which performs replacements on text fields before indexing, based on the one in search_api_solr, to this module.

Remaining tasks

  1. Create patch adding the plugin and config schema.

Read more here: Source link