Logstash: call native script in elastic?

Hi,

I wrote a java plugin for elasticsearch as described in Scripting | Elasticsearch Guide [8.11] | Elastic.

Now I want logstash to call this plugin in the elasticsearch-output part:

output {
 elasticsearch {
        // host/port and such things
        action => "index"
        script => "my_script"
        script_lang => "native"
   }
}

When I start this, I get an exception that the script could not be found :

"status"=>400, "error"=>"ElasticsearchIllegalArgumentException[failed to execute script]; nested: ElasticsearchIllegalArgumentException[Unable to find on disk script upsert_script];

What is the correct way to call the native script?

The Elasticsearch output plugin does not currently support calling native scripts. The parameters you have tried specifying do not exist according to the documentation. There is a pull request that aims to add support for this, and it looks like it is being reviewed.

Yes, I've already cloned that plugin and using it, but I couldn't figure out how to call the Java code.
Calling groovy code did work, but not with Java.