Skip to content

How can i specify the field type when dynamically updating an Elasticsearch index using the PostTransformEvent in Symfony with ElasticaBundle? #1929

@cfftony

Description

@cfftony

How can i specify the field type when dynamically updating an Elasticsearch index using the PostTransformEvent in Symfony with ElasticaBundle?

$document = $event->getDocument();
$object = $event->getObject();
$document->set('images', $value);

The type of 'images' is determined based on the given value by default. For example, if a string is provided, 'images' will be considered as text. However, if I want to use 'keyword,' how should I configure it?

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions