Regular expression processor shouldn’t run on queries [#3380256]
Table of Contents
Setup
- Solr version: 8.1
- Drupal Core version: 9.5
- Search API version: 8.x-1.29
- Search API Solr version: 4.2.12
- Configured Solr Connector: search_api_pantheon
Issue
The solr_regex_replace processor runs on all stages: preprocess_index, preprocess_query, and postprocess_query. However, it seems the query stages have the side effect of corrupting searches when the regex is too broad. This happens even if the regex is restricted to only certain fields.
In my opinion, regex doesn’t need to run on queries at all. Or, alternatively, the regex processor could be split into two, one for index time and one for query time.
Steps to reproduce:
- Enable Regular expression processor
- Set regex replace pattern to something general like 1-9 -> A
- Restrict to a field
- Create a Search results view, Fulltext search on all fields (default)
- Search an exact string containing 1-9 from a different field
Expected result: Exact match should return results
Actual result: Search returns no results
Read more here: Source link
