Add setting to specify when analyzer is applied

Created on 25 January 2024, 10 months ago

Problem/Motivation

The module currently assumes that you want the synonym analyzer to be applied at query time.
Among other possible side effects, this means that you can't use wildcards in your query since they can't be used together with synonyms.
It would be nice to be able to specify in the settings whether the synonym analyzer should be applied at index time, query time or both.

Steps to reproduce

  • Install and configure the module.
  • Use a configured synonym with wildcards (e.g. "*test*") in your search query.

Proposed resolution

Make the settings more granular to specify when the synonym analyzer should be applied.

Remaining tasks

  • Change the settings form and index mapping alter in code
  • Testing

User interface changes

The settings form will include a checkbox for both index and query time, they could replace the "enable" setting, however for backwards compatibility it's probably best to keep the "enable" setting functional.

API changes

None

Data model changes

The config for this module (search_api_elasticsearch_synonym.settings) will include 2 extra items to store the chosen options (index and query time)

Feature request
Status

Needs review

Version

1.3

Component

Code

Created by

🇧🇪Belgium Kobe Wright

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024