Elasticsearch Connector: Single-value fields incorrectly indexed as arrays

Created on 5 September 2025, 9 days ago


Problem/Motivation

When using a custom ElasticSearch preprocessor with the elasticsearch_connector module, single-valued fields are being indexed as arrays (e.g. "title": ["My node title"]) instead of scalars (e.g. "title": "My node title").

This happens because IndexFactory always iterates values and pushes them into an array, regardless of the fieldโ€™s cardinality. This causes mapping conflicts in Elasticsearch and makes querying more difficult.

Steps to reproduce

Install and configure elasticsearch_connector.

Index a node with a single-valued text field.

Observe that the Elasticsearch document stores the field as an array instead of a single value.

Expected behavior

Single-valued fields should be stored as scalars.

Multi-valued fields should continue to be stored as arrays.

๐Ÿ› Bug report
Status

Active

Version

8.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia deepak tomar

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

Comments & Activities

Production build 0.71.5 2024