Struct elasticsearch_dsl::search::queries::joining::HasParentQuery [−][src]
pub struct HasParentQuery { /* fields omitted */ }
Expand description
Returns child documents joined to a specific parent document. You can use a join field mapping to create parent-child relationships between documents in the same index.
To create has_parent query:
Query::has_parent("parent", Query::term("tag", "elasticsearch"));
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-HasParent-query.html
Implementations
Indicates whether the relevance score of a matching parent document is aggregated into its
child documents. Defaults to false
.
If false
, Elasticsearch ignores the relevance score of the parent document. Elasticsearch
also assigns each child document a relevance score equal to the query
’s boost
, which
defaults to 1
.
If true
, the relevance score of the matching parent document is aggregated into its child
documents’ relevance scores.
Indicates whether to ignore an unmapped parent_type
and not return any documents instead
of an error. Defaults to false
.
If false
, Elasticsearch returns an error if the parent_type
is unmapped.
You can use this parameter to query multiple indices that may not contain the parent_type
.
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.
You can use named queries to track which queries matched
returned documents. If named queries are used, the response
includes a matched_queries
property for each hit.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for HasParentQuery
impl Send for HasParentQuery
impl Sync for HasParentQuery
impl Unpin for HasParentQuery
impl UnwindSafe for HasParentQuery
Blanket Implementations
Mutably borrows from an owned value. Read more