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§
Source§impl MatchBoolPrefixQuery
impl MatchBoolPrefixQuery
pub fn serialize<__S>(
__self: &MatchBoolPrefixQuery,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Source§impl MatchBoolPrefixQuery
impl MatchBoolPrefixQuery
Sourcepub fn analyzer<T>(self, analyzer: T) -> Selfwhere
T: ToString,
pub fn analyzer<T>(self, analyzer: T) -> Selfwhere
T: ToString,
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<T>(self, minimum_should_match: T) -> Selfwhere
T: ToString,
pub fn minimum_should_match<T>(self, minimum_should_match: T) -> Selfwhere
T: ToString,
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<T>(self, boost: T) -> Selfwhere
T: AsPrimitive<f32>,
pub fn boost<T>(self, boost: T) -> Selfwhere
T: AsPrimitive<f32>,
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§
Source§impl Clone for MatchBoolPrefixQuery
impl Clone for MatchBoolPrefixQuery
Source§fn clone(&self) -> MatchBoolPrefixQuery
fn clone(&self) -> MatchBoolPrefixQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more