// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.search({
  query: {
    function_score: {
      query: {
        match: {
          message: "elasticsearch",
        },
      },
      script_score: {
        script: {
          params: {
            a: 5,
            b: 1.2,
          },
          source: "params.a / Math.pow(params.b, doc['my-int'].value)",
        },
      },
    },
  },
});
console.log(response);
----
