NestedQuery defines the configuration for a nested query. Nested fields cannot be directly queried. Use NestedQuery to query data in the child rows of Nested fields by specifying the field path and a subquery.
Data structure
message NestedQuery {
optional string path = 1;
optional Query query = 2;
optional ScoreMode score_mode = 3;
optional float weight = 4;
optional InnerHits inner_hits = 5;
}
|
Parameter |
Type |
Required |
Description |
|
path |
string |
Yes |
The path of the Nested field, expressed in dot notation. For example, |
|
query |
Yes |
The subquery to run on the subfield in the Nested field. Accepts any query type. |
|
|
score_mode |
No |
How to calculate the score when a field contains multiple values. |
|
|
weight |
float |
No |
The weight of this query condition when scoring. |
|
inner_hits |
No |
Settings for returning matched subfields of the Nested field. |