Struct elasticsearch_dsl::search::queries::term_level::RangeQuery [−][src]
pub struct RangeQuery { /* fields omitted */ }
Expand description
Returns documents that contain terms within a provided range.
To create a range query with numeric values:
Query::range("numeric_field")
.gt(1)
.lt(3)
.boost(2)
.name("range_query");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html
Implementations
Greater than.
Greater than or equal to.
Less than.
Less than or equal to.
Date format used to convert date
values in the query.
By default, Elasticsearch uses the
date format
provided in the <field>
’s mapping. This value overrides that mapping format.
For valid syntax, see
format
.
If a format or date value is incomplete, the range query replaces any missing components with default values. See Missing date components.
Indicates how the range query matches values for range fields.
Coordinated Universal Time (UTC) offset
or IANA time zone
used to convert date
values in the query to UTC.
Valid values are ISO 8601 UTC offsets, such as +01:00
or -08:00
, and IANA time zone IDs,
such as America/Los_Angeles
.
For an example query using the time_zone
parameter, see
Time zone in range
queries.
Floating point number used to decrease or increase the
relevance scores
of a query. Defaults to 1.0
.
You can use the boost parameter to adjust relevance scores for searches containing two or more queries.
Boost values are relative to the default value of 1.0
.
A boost value between 0 and 1.0
decreases the relevance score.
A value greater than 1.0
increases the relevance score.
You can use named queries to track which queries matched
returned documents. If named queries are used, the response
includes a matched_queries
property for each hit.
Trait Implementations
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RangeQuery
impl Send for RangeQuery
impl Sync for RangeQuery
impl Unpin for RangeQuery
impl UnwindSafe for RangeQuery
Blanket Implementations
Mutably borrows from an owned value. Read more