Logstash Elasticsearch ouput: Append array while upserting

@magnusbaeck Thanks for your reply, I tried your suggestion:

script => "ctx._source.shodan.protocols += %{[shodan][protocols]}"

Results in the following error:
"reason"=>"compile error", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"invalid sequence of tokens near ['%'].", "caused_by"=>{"type"=>"no_viable_alt_exception"

Same error with this:

 script => "%{[ctx][_source][shodan][protocols]} += %{[shodan][protocols]}"

It indicated some syntax error near the % symbol, I'm not sure whats wrong with it.

Also, when I start logstash with file input, I will get the "Too many dynamic script compilations within one minute, max: [15/min]" error when the file got more then 15 new events. I tried this in elasticsearch.yml:

script.max_compilations_per_minute: 100000

Restarted Elasticsearch but it seems not to read of ignore that line, because I get the same error. Also tried with 10000, 1000 and 100.

Any suggestions?