IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Range Filter
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Range Filter
editSee Range Filter
FilterBuilders.rangeFilter("age")
.from("10")
.to("20")
.includeLower(true)
.includeUpper(false);
// A simplified form using gte, gt, lt or lte
FilterBuilders.rangeFilter("age")
.gte("10")
.lt("20");
Note that you can ask not to cache the result using
RangeFilterBuilder#cache(boolean) method. See Caching.