Struct elasticsearch_dsl::search::queries::full_text::MatchBoolPrefixQuery
source · [−]pub struct MatchBoolPrefixQuery { /* private fields */ }
Expand description
A match_bool_prefix
query analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in a
term
query. The last term is used in a
prefix
query.
To create a MatchBoolPrefix query:
Query::match_bool_prefix("test", "search text")
.boost(2)
.name("test");
Implementations
sourceimpl MatchBoolPrefixQuery
impl MatchBoolPrefixQuery
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 minimum_should_match(
self,
minimum_should_match: impl Into<MinimumShouldMatch>
) -> Self
pub fn minimum_should_match(
self,
minimum_should_match: impl Into<MinimumShouldMatch>
) -> Self
Minimum number of clauses that must match for a document to be returned.
See the
minimum_should_match
parameter
for valid values and more information.
sourcepub fn operator(self, operator: Operator) -> Self
pub fn operator(self, operator: Operator) -> Self
Boolean logic used to interpret text in the query
value
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 MatchBoolPrefixQuery
impl Clone for MatchBoolPrefixQuery
sourcefn clone(&self) -> MatchBoolPrefixQuery
fn clone(&self) -> MatchBoolPrefixQuery
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 MatchBoolPrefixQuery
impl Debug for MatchBoolPrefixQuery
sourceimpl From<MatchBoolPrefixQuery> for Query
impl From<MatchBoolPrefixQuery> for Query
sourcefn from(q: MatchBoolPrefixQuery) -> Self
fn from(q: MatchBoolPrefixQuery) -> Self
Converts to this type from the input type.
sourceimpl From<MatchBoolPrefixQuery> for Option<Query>
impl From<MatchBoolPrefixQuery> for Option<Query>
sourcefn from(q: MatchBoolPrefixQuery) -> Self
fn from(q: MatchBoolPrefixQuery) -> Self
Converts to this type from the input type.
sourceimpl From<MatchBoolPrefixQuery> for Queries
impl From<MatchBoolPrefixQuery> for Queries
sourcefn from(q: MatchBoolPrefixQuery) -> Self
fn from(q: MatchBoolPrefixQuery) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<MatchBoolPrefixQuery> for MatchBoolPrefixQuery
impl PartialEq<MatchBoolPrefixQuery> for MatchBoolPrefixQuery
sourcefn eq(&self, other: &MatchBoolPrefixQuery) -> bool
fn eq(&self, other: &MatchBoolPrefixQuery) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MatchBoolPrefixQuery) -> bool
fn ne(&self, other: &MatchBoolPrefixQuery) -> bool
This method tests for !=
.
sourceimpl PartialEq<MatchBoolPrefixQuery> for Query
impl PartialEq<MatchBoolPrefixQuery> for Query
sourceimpl PartialEq<Query> for MatchBoolPrefixQuery
impl PartialEq<Query> for MatchBoolPrefixQuery
sourceimpl Serialize for MatchBoolPrefixQuery
impl Serialize for MatchBoolPrefixQuery
impl StructuralPartialEq for MatchBoolPrefixQuery
Auto Trait Implementations
impl RefUnwindSafe for MatchBoolPrefixQuery
impl Send for MatchBoolPrefixQuery
impl Sync for MatchBoolPrefixQuery
impl Unpin for MatchBoolPrefixQuery
impl UnwindSafe for MatchBoolPrefixQuery
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