Span queries
/ Span, / QuerySpan queries #
Span queries are low-level positional queries that expose and control
the positions of terms — the building blocks for phrase-adjacent logic
that
phrase does not express directly.
Most use cases are better served by match_phrase (or its slop); the
span family exists for the remaining ones.
Inside a
...nestedquery: not supported yet — span clauses are rejected with an HTTP 400 naming the offending clause. Usephrasewithslopfor positional logic.