logo
pub struct HasChildQuery { /* private fields */ }
Expand description

Returns parent documents whose joined child documents match a provided query. You can create parent-child relationships between documents in the same index using a join field mapping.

To create has_child query:

Query::has_child("child", Query::term("tag", "elasticsearch"));

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-HasChild-query.html

Implementations

Indicates whether to ignore an unmapped type and not return any documents instead of an error. Defaults to false.

If false, Elasticsearch returns an error if the type is unmapped.

You can use this parameter to query multiple indices that may not contain the type.

Maximum number of child documents that match the query allowed for a returned parent document. If the parent document exceeds this limit, it is excluded from the search results.

Minimum number of child documents that match the query required to match the query for a returned parent document. If the parent document does not meet this limit, it is excluded from the search results.

Indicates how scores for matching child documents affect the root parent document’s relevance score.

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.

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html#named-queries

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.