FOSElasticaBundle icon indicating copy to clipboard operation
FOSElasticaBundle copied to clipboard

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

Open cfftony opened this issue 2 years ago • 0 comments

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

cfftony avatar Nov 07 '23 10:11 cfftony