Struct elasticsearch_dsl::search::queries::full_text::CombinedFieldsQuery
source · pub struct CombinedFieldsQuery { /* private fields */ }Expand description
The combined_fields query supports searching multiple text fields as if their contents had been indexed into one combined field. The query takes a term-centric view of the input string: first it analyzes the query string into individual terms, then looks for each term in any of the fields. This query is particularly useful when a match could span multiple text fields.
To create a combined fields query with:
Query::combined_fields(["title", "abstract", "body"], "database systems")
.boost(2)
.name("test");https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-combined-fields-query.html
Implementations§
source§impl CombinedFieldsQuery
impl CombinedFieldsQuery
pub fn serialize<__S>(
__self: &CombinedFieldsQuery,
__serializer: __S,
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
source§impl CombinedFieldsQuery
impl CombinedFieldsQuery
sourcepub fn auto_generate_synonyms_phrase_query(
self,
auto_generate_synonyms_phrase_query: bool,
) -> Self
pub fn auto_generate_synonyms_phrase_query( self, auto_generate_synonyms_phrase_query: bool, ) -> Self
If true,
match phrase
queries are automatically created for multi-term synonyms. Defaults to true.
See Use synonyms with match query for an example.
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 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 zero_terms_query(self, zero_terms_query: ZeroTermsQuery) -> Self
pub fn zero_terms_query(self, zero_terms_query: ZeroTermsQuery) -> Self
Indicates whether no documents are returned if the analyzer removes
all tokens, such as when using a stop filter.
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 CombinedFieldsQuery
impl Clone for CombinedFieldsQuery
source§fn clone(&self) -> CombinedFieldsQuery
fn clone(&self) -> CombinedFieldsQuery
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CombinedFieldsQuery
impl Debug for CombinedFieldsQuery
source§impl Default for CombinedFieldsQuery
impl Default for CombinedFieldsQuery
source§fn default() -> CombinedFieldsQuery
fn default() -> CombinedFieldsQuery
source§impl From<CombinedFieldsQuery> for Option<Query>
impl From<CombinedFieldsQuery> for Option<Query>
source§fn from(q: CombinedFieldsQuery) -> Self
fn from(q: CombinedFieldsQuery) -> Self
source§impl From<CombinedFieldsQuery> for Query
impl From<CombinedFieldsQuery> for Query
source§fn from(q: CombinedFieldsQuery) -> Self
fn from(q: CombinedFieldsQuery) -> Self
source§impl IntoIterator for CombinedFieldsQuery
impl IntoIterator for CombinedFieldsQuery
§type Item = CombinedFieldsQuery
type Item = CombinedFieldsQuery
§type IntoIter = IntoIter<<CombinedFieldsQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<CombinedFieldsQuery as IntoIterator>::Item>
source§impl PartialEq<CombinedFieldsQuery> for Query
impl PartialEq<CombinedFieldsQuery> for Query
source§impl PartialEq<Query> for CombinedFieldsQuery
impl PartialEq<Query> for CombinedFieldsQuery
source§impl PartialEq for CombinedFieldsQuery
impl PartialEq for CombinedFieldsQuery
source§impl Serialize for CombinedFieldsQuery
impl Serialize for CombinedFieldsQuery
impl StructuralPartialEq for CombinedFieldsQuery
Auto Trait Implementations§
impl Freeze for CombinedFieldsQuery
impl RefUnwindSafe for CombinedFieldsQuery
impl Send for CombinedFieldsQuery
impl Sync for CombinedFieldsQuery
impl Unpin for CombinedFieldsQuery
impl UnwindSafe for CombinedFieldsQuery
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)