Struct elasticsearch_dsl::search::queries::term_level::PrefixQuery [−][src]
pub struct PrefixQuery { /* fields omitted */ }
Expand description
Returns documents that contain a specific prefix in a provided field.
To create a prefix query with numeric values:
Query::prefix("test", 123);
To create a prefix query with string values and optional fields:
Query::prefix("test", "username")
.boost(2)
.name("test");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-prefix-query.html
Implementations
Method used to rewrite the query. For valid values and more information, see the rewrite parameter.
Allows ASCII case insensitive matching of the value with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping.
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 PrefixQuery
impl Send for PrefixQuery
impl Sync for PrefixQuery
impl Unpin for PrefixQuery
impl UnwindSafe for PrefixQuery
Blanket Implementations
Mutably borrows from an owned value. Read more