[[java-query-dsl-range-query]] ==== Range Query See {ref}/query-dsl-range-query.html[Range Query] ["source","java",subs="attributes,callouts,macros"] -------------------------------------------------- include-tagged::{query-dsl-test}[range] -------------------------------------------------- <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` ["source","java",subs="attributes,callouts,macros"] -------------------------------------------------- include-tagged::{query-dsl-test}[range_simplified] -------------------------------------------------- <1> field <2> set `from` to 10 and `includeLower` to `true` <3> set `to` to 20 and `includeUpper` to `false`