Struct elasticsearch_dsl::search::queries::term_level::WildcardQuery
source · pub struct WildcardQuery { /* private fields */ }
Expand description
Returns documents that contain terms matching a wildcard pattern.
A wildcard operator is a placeholder that matches one or more characters. For example, the *
wildcard operator matches zero or more characters. You can combine wildcard operators with
other characters to create a wildcard pattern.
To create a wildcard query:
Query::wildcard("test", 123);
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html
Implementations§
source§impl WildcardQuery
impl WildcardQuery
pub fn serialize<__S>( __self: &WildcardQuery, __serializer: __S ) -> Result<__S::Ok, __S::Error>where __S: Serializer,
source§impl WildcardQuery
impl WildcardQuery
sourcepub fn rewrite(self, rewrite: Rewrite) -> Self
pub fn rewrite(self, rewrite: Rewrite) -> Self
Method used to rewrite the query. For valid values and more information, see the rewrite parameter.
sourcepub fn case_insensitive(self, case_insensitive: bool) -> Self
pub fn case_insensitive(self, case_insensitive: bool) -> Self
Allows case insensitive matching of the pattern with the indexed field values when set to true. Default is false which means the case sensitivity of matching depends on the underlying field’s mapping.
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 WildcardQuery
impl Clone for WildcardQuery
source§fn clone(&self) -> WildcardQuery
fn clone(&self) -> WildcardQuery
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WildcardQuery
impl Debug for WildcardQuery
source§impl From<WildcardQuery> for MultiTermQuery
impl From<WildcardQuery> for MultiTermQuery
source§fn from(q: WildcardQuery) -> Self
fn from(q: WildcardQuery) -> Self
source§impl From<WildcardQuery> for Option<MultiTermQuery>
impl From<WildcardQuery> for Option<MultiTermQuery>
source§fn from(q: WildcardQuery) -> Self
fn from(q: WildcardQuery) -> Self
source§impl From<WildcardQuery> for Option<Query>
impl From<WildcardQuery> for Option<Query>
source§fn from(q: WildcardQuery) -> Self
fn from(q: WildcardQuery) -> Self
source§impl From<WildcardQuery> for Query
impl From<WildcardQuery> for Query
source§fn from(q: WildcardQuery) -> Self
fn from(q: WildcardQuery) -> Self
source§impl IntoIterator for WildcardQuery
impl IntoIterator for WildcardQuery
§type Item = WildcardQuery
type Item = WildcardQuery
§type IntoIter = IntoIter<<WildcardQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<WildcardQuery as IntoIterator>::Item>
source§impl PartialEq<MultiTermQuery> for WildcardQuery
impl PartialEq<MultiTermQuery> for WildcardQuery
source§fn eq(&self, other: &MultiTermQuery) -> bool
fn eq(&self, other: &MultiTermQuery) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<Query> for WildcardQuery
impl PartialEq<Query> for WildcardQuery
source§impl PartialEq<WildcardQuery> for MultiTermQuery
impl PartialEq<WildcardQuery> for MultiTermQuery
source§fn eq(&self, other: &WildcardQuery) -> bool
fn eq(&self, other: &WildcardQuery) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<WildcardQuery> for Query
impl PartialEq<WildcardQuery> for Query
source§fn eq(&self, other: &WildcardQuery) -> bool
fn eq(&self, other: &WildcardQuery) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<WildcardQuery> for WildcardQuery
impl PartialEq<WildcardQuery> for WildcardQuery
source§fn eq(&self, other: &WildcardQuery) -> bool
fn eq(&self, other: &WildcardQuery) -> bool
self
and other
values to be equal, and is used
by ==
.