All Products
Search
Document Center

Tablestore:Basic query

Last Updated:Jun 03, 2026

Tablestore SDK for Python supports the following search index query types.

Query type

Description

Match all query

Matches all rows. Use to get the total row count or return random rows.

Term query

Retrieves data by exact match on a column value, similar to string matching.

Terms query

Matches rows where a column value equals any of the specified keywords. Equivalent to the SQL IN operator.

Prefix query

Matches rows where a column value starts with the specified prefix.

Range query

Matches rows where a column value falls within a specified range.

Wildcard query

Matches rows by using wildcard characters in the search string.

Exists query

Checks whether a specific column exists in a row. Also known as a NULL query or NULL-value query. Useful for sparse data.

Collapse (distinct)

Deduplicates results by a specified column so that each distinct value appears only once, ensuring diversity in the result set.

Geo query

Queries rows by geographic location. Includes three subtypes:

  • Geo-distance query: Matches rows within a circular area defined by a center point and radius.

  • Geo-bounding box query: Matches rows within a specified rectangular area.

  • Geo-polygon query: Matches rows within a specified polygon area.

Nested query

Queries child rows of nested fields.