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

[source, js]
----
const response = await client.search({
  query: {
    function_score: {
      query: {
        match: {
          body: "foo",
        },
      },
      functions: [
        {
          script_score: {
            script: {
              source: "pure_df",
              lang: "expert_scripts",
              params: {
                field: "body",
                term: "foo",
              },
            },
          },
        },
      ],
    },
  },
});
console.log(response);
----
