From 3ee37b425b481139c433a387e5178a63f19d495b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gytis=20=C5=A0k?= Date: Tue, 6 Nov 2018 17:45:10 +0200 Subject: [PATCH] Docs: Add section about range query for range type (#35222) This makes their interaction more discoverable. --- docs/reference/query-dsl/range-query.asciidoc | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/reference/query-dsl/range-query.asciidoc b/docs/reference/query-dsl/range-query.asciidoc index 620a175ff39a5..c5087d52f905e 100644 --- a/docs/reference/query-dsl/range-query.asciidoc +++ b/docs/reference/query-dsl/range-query.asciidoc @@ -139,3 +139,26 @@ GET _search // CONSOLE <1> This date will be converted to `2014-12-31T23:00:00 UTC`. <2> `now` is not affected by the `time_zone` parameter (dates must be stored as UTC). + +[[querying-range-fields]] +==== Querying range fields + +`range` queries can be used on fields of type <>, allowing to +match a range specified in the query with a range field value in the document. +The `relation` parameter controls how these two ranges are matched: + +[horizontal] +`WITHIN`:: + + Matches documents who's range field is entirely within the query's range. + +`CONTAINS`:: + + Matches documents who's range field entirely contains the query's range. + +`INTERSECTS`:: + + Matches documents who's range field intersects the query's range. + This is the default value when querying range fields. + +For examples, see <> mapping type.