// 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({
  query: {
    span_not: {
      include: {
        span_term: {
          field1: "hoya",
        },
      },
      exclude: {
        span_near: {
          clauses: [
            {
              span_term: {
                field1: "la",
              },
            },
            {
              span_term: {
                field1: "hoya",
              },
            },
          ],
          slop: 0,
          in_order: true,
        },
      },
    },
  },
});
console.log(response);
----
