Search API process index not using native Elasticsearch filters

Created on 3 November 2020, about 4 years ago
Updated 20 January 2023, almost 2 years ago

Problem/Motivation

Using certain Search API index processors are not working on proper way. Certain processors are e.g. Stemmer, Stopwords.

Steps to reproduce

1. Create a node with title talking
2. Create new Search API (Elasticsearch) index using content as datasource.
3. Add title field on index fields. /admin/config/search/search-api/index/INDEX_NAME/fields
4. Add Tokenizer and Stemmer processors. Make sure Tokenizer is before Stemmer. /admin/config/search/search-api/index/INDEX_NAME/processors
5. Clear the index and Index the content on /admin/config/search/search-api/index/INDEX_NAME
6. On Elasticsearch the title field is stored as talk not talking.

Proposed resolution

Many possible resolutions:
1. Use native Elasticsearch stemmer filters/analyzers. https://www.drupal.org/project/search_api_elasticsearch_synonym and https://www.drupal.org/project/elasticsearch_connector_autocomp use EventSubscriberInterface to properly utilize analyzers.
2. Document that Search API Stemmer and Stopwords do not work as expected when using Elasticsearch.
3. Disable Stemmer checkbox on Elasticsearch based indexes on /admin/config/search/search-api/index/INDEX_NAME/processors.

Remaining tasks

1. Decide best approach.
2. Implement solution.

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Fixed

Version

7.0

Component

Code

Created by

🇫🇮Finland sokru

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024