// 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: {
        match: {
          query: "hot porridge",
          filter: {
            script: {
              source:
                "interval.start > 10 && interval.end < 20 && interval.gaps == 0",
            },
          },
        },
      },
    },
  },
});
console.log(response);
----
