Make search_api_elasticsearch_attachments compatible with Elasticsearch 8.x

Created on 22 August 2024, 3 months ago
Updated 3 September 2024, 3 months ago

Problem/Motivation

Enabling the module on an existing index with ES 8.x results in the following error:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper
for [_source] conflicts with existing mapper:\n\tCannot update parameter
[excludes] from [[]] to
[[es_attachment.data]]"}],"type":"illegal_argument_exception","reason":"Mapper
for [_source] conflicts with existing mapper:\n\tCannot update parameter
[excludes] from [[]] to [[es_attachment.data]]"},"status":400}

Steps to reproduce

  1. Upgrade ES to 8.x
  2. Download and Enable to module
  3. Try to save the index settings

Proposed resolution

  1. Initialise the 8.x-8.x branch
  2. Remove PrepareIndexMapping and add remove_binary option to ingest pipeline.
  3. Incorporate issues #3100797, #3114500, #3105993 as they alter the same code.
  4. Prefix the ingest pipeline name with the index name so different indices on the same server can use different pipeline settings. Without this change, different indices on the same server uses the same es_attachment pipeline regardless which options they have in the processor settings (such as remove_binary and indexed_chars)

Remaining tasks

User interface changes

New checkbox "Remove binary" in the processor settings.

API changes

Data model changes

Feature request
Status

Needs review

Version

6.0

Component

Code

Created by

🇮🇳India gg24

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