[source, ruby]
----
response = client.search(
  body: {
    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
          }
        }
      }
    }
  }
)
puts response
----
