// 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: {
    intervals: {
      my_text: {
        all_of: {
          ordered: false,
          max_gaps: 1,
          intervals: [
            {
              match: {
                query: "my favorite food",
                max_gaps: 0,
                ordered: true,
              },
            },
            {
              match: {
                query: "cold porridge",
                max_gaps: 4,
                ordered: true,
              },
            },
          ],
        },
      },
    },
  },
});
console.log(response);
----
