Struct elasticsearch_dsl::search::queries::compound::BoostingQuery [−][src]
pub struct BoostingQuery { /* fields omitted */ }
Expand description
Returns documents matching a positive
query while reducing the
relevance score
of documents that also match a negative
query.
You can use the boosting
query to demote certain documents without excluding them from the search results.
To create boosting query:
Query::boosting(Query::term("test1", 123), Query::term("test2", 456), 0.2)
.boost(3)
.name("test");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-boosting-query.html
Implementations
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 BoostingQuery
impl Send for BoostingQuery
impl Sync for BoostingQuery
impl Unpin for BoostingQuery
impl UnwindSafe for BoostingQuery
Blanket Implementations
Mutably borrows from an owned value. Read more