// 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: "sales",
  size: 0,
  query: {
    constant_score: {
      filter: {
        range: {
          price: {
            lte: "500",
          },
        },
      },
    },
  },
  aggs: {
    prices: {
      histogram: {
        field: "price",
        interval: 50,
        extended_bounds: {
          min: 0,
          max: 500,
        },
      },
    },
  },
});
console.log(response);
----
