// 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({
  index: "my_index",
  query: {
    script_score: {
      query: {
        match_all: {},
      },
      script: {
        source:
          "field('my_counter').asBigInteger(BigInteger.ZERO).floatValue()",
      },
    },
  },
});
console.log(response);
----
