Runtime field script error

Hi,

On a cross cluster, using kibana, I'm trying to add a runtime field in a dataview pointing to a remote index. In the preview section, a "script error" message is displayed.
My script code: emit('TEST');
Did I forget to configure something ?
Is it possible to create a runtime field on a cross cluster ?

Thx for your help.
Khaled

When using the runtime_field api to create the field :

The field is created with no request error.
Checking in kibana :

An invalid painless script message is displayed