Could we allow derivative parse modes?

Created on 19 July 2024, 6 months ago
Updated 21 July 2024, 6 months ago

Proposal to Modify SearchApiSolrBackend and Utility Classes: Using `getBaseId()` Instead of `getPluginId()`

Currently, the SearchApiSolrBackend and Utility classes use $parse_mode_id for some logic. I propose that we retrieve this value from `getBaseId()` instead of `getPluginId()`.

Use case

If I want to change the query keys like:
"foo bar"
to
"foo"

It would be beneficial to add a parse_mode plugin to handle this transformation. However, I am uncertain whether the correct approach is to override the getPluginId() function in the custom plugin. Alternatively, it might be more effective for SearchApiSolrBackend and Utility classes to rely on getBaseId() for obtaining the $parse_mode_id, allowing me to name my plugin like:
id = 'terms:my_custom_plugin_id'

I am not sure about the implications or if I am completely wrong with this approach, but at first sight it looks like there is no side effects neither in Search Api nor Search Api Solr.

💬 Support request
Status

Active

Version

4.0

Component

Code

Created by

🇪🇸Spain tuwebo

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

Comments & Activities

Production build 0.71.5 2024