Skip to content

Commit 06f4f7e

Browse files
committed
[Docs] Clarify span_not query behavior for non-overlapping matches (#27150)
Closes #27134
1 parent 3f25348 commit 06f4f7e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/reference/query-dsl/span-not-query.asciidoc

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[[query-dsl-span-not-query]]
22
=== Span Not Query
33

4-
Removes matches which overlap with another span query. The span not
4+
Removes matches which overlap with another span query or which are
5+
within x tokens before (controlled by the parameter `pre`) or y tokens
6+
after (controled by the parameter `post`) another SpanQuery. The span not
57
query maps to Lucene `SpanNotQuery`. Here is an example:
68

79
[source,js]
@@ -39,7 +41,7 @@ In the above example all documents with the term hoya are filtered except the on
3941
Other top level options:
4042

4143
[horizontal]
42-
`pre`:: If set the amount of tokens before the include span can't have overlap with the exclude span.
43-
`post`:: If set the amount of tokens after the include span can't have overlap with the exclude span.
44+
`pre`:: If set the amount of tokens before the include span can't have overlap with the exclude span. Defaults to 0.
45+
`post`:: If set the amount of tokens after the include span can't have overlap with the exclude span. Defaults to 0.
4446
`dist`:: If set the amount of tokens from within the include span can't have overlap with the exclude span. Equivalent
4547
of setting both `pre` and `post`.

0 commit comments

Comments
 (0)