[source, ruby]
----
response = client.search(
  body: {
    query: {
      intervals: {
        my_text: {
          match: {
            query: 'hot porridge',
            filter: {
              script: {
                source: 'interval.start > 10 && interval.end < 20 && interval.gaps == 0'
              }
            }
          }
        }
      }
    }
  }
)
puts response
----
