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(
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 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<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 CombinedFieldsQuery
impl Clone for CombinedFieldsQuery
sourcefn clone(&self) -> CombinedFieldsQuery
fn clone(&self) -> CombinedFieldsQuery
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 CombinedFieldsQuery
impl Debug for CombinedFieldsQuery
sourceimpl Default for CombinedFieldsQuery
impl Default for CombinedFieldsQuery
sourcefn default() -> CombinedFieldsQuery
fn default() -> CombinedFieldsQuery
Returns the “default value” for a type. Read more
sourceimpl PartialEq<CombinedFieldsQuery> for CombinedFieldsQuery
impl PartialEq<CombinedFieldsQuery> for CombinedFieldsQuery
sourcefn eq(&self, other: &CombinedFieldsQuery) -> bool
fn eq(&self, other: &CombinedFieldsQuery) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &CombinedFieldsQuery) -> bool
fn ne(&self, other: &CombinedFieldsQuery) -> bool
This method tests for !=.
sourceimpl Serialize for CombinedFieldsQuery
impl Serialize for CombinedFieldsQuery
impl StructuralPartialEq for CombinedFieldsQuery
Auto Trait Implementations
impl RefUnwindSafe for CombinedFieldsQuery
impl Send for CombinedFieldsQuery
impl Sync for CombinedFieldsQuery
impl Unpin for CombinedFieldsQuery
impl UnwindSafe for CombinedFieldsQuery
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more