All Products
Search
Document Center

Tablestore:NestedQuery

Last Updated:Apr 30, 2026

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, news.title refers to the title subfield in the Nested field named news.

query

Query

Yes

The subquery to run on the subfield in the Nested field. Accepts any query type.

score_mode

SortMode

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

InnerHits

No

Settings for returning matched subfields of the Nested field.