Missing span_gap documentation - Still supported?

Hi,

We use span_gap inside a span_near query to represent a fixed positional gap, and it works. However, I can’t find it described in the Span queries documentation or the span_near reference.

For example:

{
  "span_near": {
    "clauses": [
      { "span_term": { "text": {"value": "quick"} } },
      { "span_gap": { "text": 1 } },
      { "span_term": { "text": {"value": "fox"} } }
    ],
    "slop": 0,
    "in_order": true
  }
}

Could someone clarify:

  • Is span_gap a supported part of the public Query DSL, intended for use only inside span_near?
  • Is it deprecated or planned for removal?
  • If it is supported, could the documentation explain its syntax and constraints?

I found it in the Elasticsearch server implementation, but haven’t found user-facing documentation for it.