Struct elastiql::search::query::RangeQuery[][src]

pub struct RangeQuery {
    pub field: String,
    pub greater_than: Option<String>,
    pub greater_than_or_equal_to: Option<String>,
    pub less_than: Option<String>,
    pub less_than_or_equal_to: Option<String>,
    pub time_zone: Option<String>,
    pub boost: Option<f64>,
}
Expand description

A Range query returns documents that contain terms within a provided range.

Fields

field: String

The name of the field to query.

greater_than: Option<String>

Greater than.

Although this field is a String, it will match numerical fields; e.g. "1.2" will match fields containing the floating point value 1.2.

greater_than_or_equal_to: Option<String>

Greater than or equal to.

Although this field is a String, it will match numerical fields; e.g. "1.2" will match fields containing the floating point value 1.2.

less_than: Option<String>

Less than.

Although this field is a String, it will match numerical fields; e.g. "1.2" will match fields containing the floating point value 1.2.

less_than_or_equal_to: Option<String>

Less than or equal to.

Although this field is a String, it will match numerical fields; e.g. "1.2" will match fields containing the floating point value 1.2.

time_zone: Option<String>

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.

Note: This parameter does not affect the date math value of now. now is always the current system time in UTC. However, this parameter does convert dates calculated using now and date math rounding. For example, it will convert a value of now/d or now-7d/d.

boost: Option<f64>

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.

Implementations

Create a builder for building RangeQuery. On the builder, call .field(...), .greater_than(...)(optional), .greater_than_or_equal_to(...)(optional), .less_than(...)(optional), .less_than_or_equal_to(...)(optional), .time_zone(...)(optional), .boost(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of RangeQuery.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.