From d5ed89b946297270ec28abf44bef2371a06f1f4f Mon Sep 17 00:00:00 2001
From: Hilko Bengen <bengen@debian.org>
Date: Sat, 7 Jun 2014 12:02:12 +0200
Subject: Imported Upstream version 1.0.3

---
 .../query-dsl/queries/span-near-query.asciidoc     | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 docs/reference/query-dsl/queries/span-near-query.asciidoc

(limited to 'docs/reference/query-dsl/queries/span-near-query.asciidoc')

diff --git a/docs/reference/query-dsl/queries/span-near-query.asciidoc b/docs/reference/query-dsl/queries/span-near-query.asciidoc
new file mode 100644
index 0000000..39982e2
--- /dev/null
+++ b/docs/reference/query-dsl/queries/span-near-query.asciidoc
@@ -0,0 +1,27 @@
+[[query-dsl-span-near-query]]
+=== Span Near Query
+
+Matches spans which are near one another. One can specify _slop_, the
+maximum number of intervening unmatched positions, as well as whether
+matches are required to be in-order. The span near query maps to Lucene
+`SpanNearQuery`. Here is an example:
+
+[source,js]
+--------------------------------------------------
+{
+    "span_near" : {
+        "clauses" : [
+            { "span_term" : { "field" : "value1" } },
+            { "span_term" : { "field" : "value2" } },
+            { "span_term" : { "field" : "value3" } }
+        ],
+        "slop" : 12,
+        "in_order" : false,
+        "collect_payloads" : false
+    }
+}
+--------------------------------------------------
+
+The `clauses` element is a list of one or more other span type queries
+and the `slop` controls the maximum number of intervening unmatched
+positions permitted.
-- 
cgit v1.2.3

