- 🇱🇻Latvia maijs
The object oriented approach to index mapping has been introduced in version 7, and since then the best way to alter the data prior to an Elasticsearch operation was to use an event listener.
The patch attached allows event listeners to receive the index name and the index definition instance (incl. the mapping definition), and alter the existing mapping or add a new field.
The patch also includes an example event listener included in the
elasticsearch_helper_example
module. - Status changed to Fixed
over 1 year ago 11:54am 25 August 2023 - 🇱🇻Latvia maijs
Event listeners now can access and modify the
index_definition
object when an index is created. This allows custom modules to modify the index settings and the mapping.See an example in the
elasticsearch_helper_example
module - https://git.drupalcode.org/project/elasticsearch_helper/-/blob/8.x/examp... Automatically closed - issue fixed for 2 weeks with no activity.