// 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: "items",
  query: {
    bool: {
      must: {
        match: {
          name: "chocolate",
        },
      },
      should: {
        distance_feature: {
          field: "location",
          pivot: "1000m",
          origin: [-71.3, 41.15],
        },
      },
    },
  },
});
console.log(response);
----
