All Products
Search
Document Center

Tablestore:ScanQuery

Last Updated:May 11, 2024

ScanQuery specifies the scan configurations that you set when you call the ParallelScan operation.

Data structure

message ScanQuery {
    optional Query query = 1;
    optional int32 limit = 2;
    optional int32 alive_time = 3;  //unit is second
    optional bytes token = 4;
    optional int32 current_parallel_id = 5;
    optional int32 max_parallel = 6;
}

Parameter

Type

Required

Description

query

Query

Yes

The query conditions. The following query methods are supported: term query, fuzzy query, query by range, query by geographical location, and nested query.

limit

int32

No

The maximum number of rows that can be returned by each ParallelScan call.

alive_time

int32

No

The validity period of the current parallel scan task. This validity period is also the validity period of the token. Default value: 60. Unit: seconds. We recommend that you use the default value.

If the next request is not initiated within the validity period, more data cannot be queried. The validity time of the token is refreshed each time you send a request.

token

bytes

No

The token that is used to paginate query results.

The results of the ParallelScan request contain the token for the next page. You can use the token to retrieve the next page.

current_parallel_id

int32

Yes

The ID of the parallel scan task in the request. Valid values: [0, max_parallel).

max_parallel

int32

Yes

The maximum number of parallel scan tasks per request. The maximum number of parallel scan tasks per request varies based on the data volume. A larger volume of data requires more parallel scan tasks in a session.

Related operations

ParallelScan