2015-06-24 17:27:19 -04:00
|
|
|
[[java-query-dsl-range-query]]
|
|
|
|
==== Range Query
|
|
|
|
|
|
|
|
See {ref}/query-dsl-range-query.html[Range Query]
|
|
|
|
|
2017-05-02 13:00:56 -04:00
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
2015-06-24 17:27:19 -04:00
|
|
|
--------------------------------------------------
|
2017-05-02 13:00:56 -04:00
|
|
|
include-tagged::{query-dsl-test}[range]
|
2015-06-24 17:27:19 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> field
|
|
|
|
<2> from
|
|
|
|
<3> to
|
|
|
|
<4> include lower value means that `from` is `gt` when `false` or `gte` when `true`
|
|
|
|
<5> include upper value means that `to` is `lt` when `false` or `lte` when `true`
|
|
|
|
|
2017-05-02 13:00:56 -04:00
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
2015-06-24 17:27:19 -04:00
|
|
|
--------------------------------------------------
|
2017-05-02 13:00:56 -04:00
|
|
|
include-tagged::{query-dsl-test}[range_simplified]
|
2015-06-24 17:27:19 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
<1> field
|
|
|
|
<2> set `from` to 10 and `includeLower` to `true`
|
|
|
|
<3> set `to` to 20 and `includeUpper` to `false`
|