// 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({
  index: "products",
  size: 0,
  query: {
    match: {
      name: "led tv",
    },
  },
  aggs: {
    resellers: {
      nested: {
        path: "resellers",
      },
      aggs: {
        min_price: {
          min: {
            field: "resellers.price",
          },
        },
      },
    },
  },
});
console.log(response);
----
