# Missing span\_gap documentation - Still supported?

**URL:** <https://discuss.elastic.co/t/missing-span-gap-documentation-still-supported/391213>\
**Category:** Elasticsearch\
**Created:** [October 27, 2026, 8:25am UTC](https://discuss.elastic.co/t/missing-span-gap-documentation-still-supported/391213 "2026-10-27T08:25:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [October 27, 2026, 8:25am UTC](https://discuss.elastic.co/t/missing-span-gap-documentation-still-supported/391213/1 "2026-10-27T08:25:19Z")

</div>

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](https://www.elastic.co/docs/reference/query-languages/query-dsl/span-queries)or the [span\_near reference](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-span-near-query).

For example:

```json
{
  "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.
