// 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: {
    has_child: {
      type: "child",
      query: {
        function_score: {
          script_score: {
            script: "_score * doc['click_count'].value",
          },
        },
      },
      score_mode: "max",
    },
  },
});
console.log(response);
----
