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) -> Self where
T: ToString,
pub fn minimum_should_match<T>(self, minimum_should_match: T) -> Self where
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) -> Self where
T: AsPrimitive<f32>,
pub fn boost<T>(self, boost: T) -> Self where
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
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 From<CombinedFieldsQuery> for Option<Query>
impl From<CombinedFieldsQuery> for Option<Query>
sourcefn from(q: CombinedFieldsQuery) -> Self
fn from(q: CombinedFieldsQuery) -> Self
Converts to this type from the input type.
sourceimpl From<CombinedFieldsQuery> for Query
impl From<CombinedFieldsQuery> for Query
sourcefn from(q: CombinedFieldsQuery) -> Self
fn from(q: CombinedFieldsQuery) -> Self
Converts to this type from the input type.
sourceimpl IntoIterator for CombinedFieldsQuery
impl IntoIterator for CombinedFieldsQuery
type Item = CombinedFieldsQuery
type Item = CombinedFieldsQuery
The type of the elements being iterated over.
type IntoIter = IntoIter<<CombinedFieldsQuery as IntoIterator>::Item>
type IntoIter = IntoIter<<CombinedFieldsQuery as IntoIterator>::Item>
Which kind of iterator are we turning this into?
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 PartialEq<CombinedFieldsQuery> for Query
impl PartialEq<CombinedFieldsQuery> for Query
sourceimpl PartialEq<Query> for CombinedFieldsQuery
impl PartialEq<Query> for CombinedFieldsQuery
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