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
sourceimpl 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
sourceimpl Clone for CombinedFieldsQuery
impl Clone for CombinedFieldsQuery
sourcefn clone(&self) -> CombinedFieldsQuery
fn clone(&self) -> CombinedFieldsQuery
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more