I had the same problem, but I think that the docs are plain wrong, and it should be script instead of script_file. In any case, if I do that it works fine.
I've posted an issue under https://github.com/elastic/elasticsearch/issues/10438 Test program and session: https://gist.github.com/vanatteveldt/59ff5730b025270e8035 -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8d826037-1247-4c9d-b566-aaa59cf090fe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.