Struct elasticsearch_dsl::search::queries::full_text::MatchPhraseQuery
source · [−]pub struct MatchPhraseQuery { /* private fields */ }Expand description
The match_phrase query analyzes the text and creates a phrase query out
of the analyzed text.
To create a MatchPhrase query:
Query::match_phrase("test", "search text")
.boost(2)
.name("test");https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query-phrase.html
Implementations
sourceimpl MatchPhraseQuery
impl MatchPhraseQuery
sourcepub fn analyzer(self, analyzer: impl Into<String>) -> Self
pub fn analyzer(self, analyzer: impl Into<String>) -> Self
Analyzer
used to convert the text in the query value into tokens. Defaults to the
index-time analyzer
mapped for the <field>. If no analyzer is mapped, the index’s default analyzer is used.
sourcepub fn slop(self, slop: u8) -> Self
pub fn slop(self, slop: u8) -> Self
The maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.
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 MatchPhraseQuery
impl Clone for MatchPhraseQuery
sourcefn clone(&self) -> MatchPhraseQuery
fn clone(&self) -> MatchPhraseQuery
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 MatchPhraseQuery
impl Debug for MatchPhraseQuery
sourceimpl From<MatchPhraseQuery> for Query
impl From<MatchPhraseQuery> for Query
sourcefn from(q: MatchPhraseQuery) -> Self
fn from(q: MatchPhraseQuery) -> Self
Converts to this type from the input type.
sourceimpl From<MatchPhraseQuery> for Option<Query>
impl From<MatchPhraseQuery> for Option<Query>
sourcefn from(q: MatchPhraseQuery) -> Self
fn from(q: MatchPhraseQuery) -> Self
Converts to this type from the input type.
sourceimpl From<MatchPhraseQuery> for Queries
impl From<MatchPhraseQuery> for Queries
sourcefn from(q: MatchPhraseQuery) -> Self
fn from(q: MatchPhraseQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<MatchPhraseQuery> for MatchPhraseQuery
impl PartialEq<MatchPhraseQuery> for MatchPhraseQuery
sourcefn eq(&self, other: &MatchPhraseQuery) -> bool
fn eq(&self, other: &MatchPhraseQuery) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &MatchPhraseQuery) -> bool
fn ne(&self, other: &MatchPhraseQuery) -> bool
This method tests for !=.
sourceimpl PartialEq<MatchPhraseQuery> for Query
impl PartialEq<MatchPhraseQuery> for Query
sourceimpl PartialEq<Query> for MatchPhraseQuery
impl PartialEq<Query> for MatchPhraseQuery
sourceimpl Serialize for MatchPhraseQuery
impl Serialize for MatchPhraseQuery
impl StructuralPartialEq for MatchPhraseQuery
Auto Trait Implementations
impl RefUnwindSafe for MatchPhraseQuery
impl Send for MatchPhraseQuery
impl Sync for MatchPhraseQuery
impl Unpin for MatchPhraseQuery
impl UnwindSafe for MatchPhraseQuery
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more