All Products
Search
Document Center

Tablestore:SearchQuery

Last Updated:Oct 31, 2025

SearchQuery specifies query configurations that are specified when you call the Search operation of search indexes.

Data structure

message SearchQuery {
    optional int32 offset = 1;
    optional int32 limit = 2;
    optional Query query = 4;
    optional Collapse collapse = 5;
    optional Sort sort = 6;
    optional bool getTotalCount = 8;
    optional bytes token = 9;
    optional Aggregations aggs = 10;
    optional GroupBys group_bys = 11;
    optional Highlight highlight = 12;
    optional SearchFilter filter = 14;
}

Name

Type

Required

Description

offset

int32

No

The position from which the current query starts.

limit

int32

No

The maximum number of rows that you want the current query to return.

query

Query

Yes

The query configuration.

collapse

Collapse

No

Collapses the returned results based on the specified column.

sort

Sort

No

The sorting method of the results.

getTotalCount

bool

No

Specifies whether to return the total number of rows that meet the query conditions. The default value of this parameter is false, which specifies that the total number of rows that meet the query conditions is not returned.

Returning the total number of matched rows degrades query performance.

token

bytes

No

If Tablestore cannot read all data that meets the query conditions, Tablestore returns next_token. You can use next_token to continue reading the subsequent data.

aggs

Aggregations

No

The aggregation configurations.

group_bys

GroupBys

No

The grouping configurations.

highlight

Highlight

No

The highlight configurations.

filter

SearchFilter

No

A post-filter for the query phase. The filter is applied to the results of the query. Aggregations and groupings are executed only on the filtered data.

Related operations

Search