[source, ruby]
----
response = client.put_script(
  id: 'my-stored-script',
  body: {
    script: {
      lang: 'painless',
      source: "Math.log(_score * 2) + params['my_modifier']"
    }
  }
)
puts response
----
