Struct elasticsearch_dsl::search::queries::specialized::PinnedQuery
source · [−]pub struct PinnedQuery { /* private fields */ }
Expand description
The most simple query, which matches all documents, giving them all a
_score
of 1.0
.
To create match_all query:
Query::pinned(PinnedQueryValues::ids([1]), Query::term("user_id", 2))
.boost(2)
.name("matches_everything");
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html
Implementations
sourceimpl PinnedQuery
impl PinnedQuery
sourcepub fn boost<B>(self, boost: B) -> Self where
B: TryInto<Boost>,
pub fn boost<B>(self, boost: B) -> Self where
B: TryInto<Boost>,
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.
Trait Implementations
sourceimpl Clone for PinnedQuery
impl Clone for PinnedQuery
sourcefn clone(&self) -> PinnedQuery
fn clone(&self) -> PinnedQuery
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PinnedQuery
impl Debug for PinnedQuery
sourceimpl From<PinnedQuery> for Query
impl From<PinnedQuery> for Query
sourcefn from(q: PinnedQuery) -> Self
fn from(q: PinnedQuery) -> Self
Converts to this type from the input type.
sourceimpl From<PinnedQuery> for Option<Query>
impl From<PinnedQuery> for Option<Query>
sourcefn from(q: PinnedQuery) -> Self
fn from(q: PinnedQuery) -> Self
Converts to this type from the input type.
sourceimpl From<PinnedQuery> for Queries
impl From<PinnedQuery> for Queries
sourcefn from(q: PinnedQuery) -> Self
fn from(q: PinnedQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<PinnedQuery> for PinnedQuery
impl PartialEq<PinnedQuery> for PinnedQuery
sourcefn eq(&self, other: &PinnedQuery) -> bool
fn eq(&self, other: &PinnedQuery) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PinnedQuery) -> bool
fn ne(&self, other: &PinnedQuery) -> bool
This method tests for !=
.
sourceimpl PartialEq<PinnedQuery> for Query
impl PartialEq<PinnedQuery> for Query
sourceimpl PartialEq<Query> for PinnedQuery
impl PartialEq<Query> for PinnedQuery
sourceimpl Serialize for PinnedQuery
impl Serialize for PinnedQuery
impl StructuralPartialEq for PinnedQuery
Auto Trait Implementations
impl RefUnwindSafe for PinnedQuery
impl Send for PinnedQuery
impl Sync for PinnedQuery
impl Unpin for PinnedQuery
impl UnwindSafe for PinnedQuery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more