// 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({
  query: {
    span_within: {
      little: {
        span_term: {
          field1: "foo",
        },
      },
      big: {
        span_near: {
          clauses: [
            {
              span_term: {
                field1: "bar",
              },
            },
            {
              span_term: {
                field1: "baz",
              },
            },
          ],
          slop: 5,
          in_order: true,
        },
      },
    },
  },
});
console.log(response);
----
