// 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: "museums",
  size: 0,
  aggs: {
    rings: {
      geo_distance: {
        field: "location",
        origin: "POINT (4.894 52.3760)",
        unit: "km",
        ranges: [
          {
            to: 100,
          },
          {
            from: 100,
            to: 300,
          },
          {
            from: 300,
          },
        ],
      },
    },
  },
});
console.log(response);
----
