Basic query

更新时间: 2026-06-22 14:19:54

Tablestore SDK for Go supports the following basic query types for search indexes.

Query type

Description

Match all query

Matches all rows in a table. You can use this query to get the total row count or return random rows.

Term query

Retrieves rows that exactly match a specified column value, similar to string matching.

Terms query

Retrieves rows whose column value matches at least one of the specified keywords, equivalent to the IN operator in SQL.

Prefix query

Retrieves rows whose column value contains a specified prefix.

Wildcard query

Retrieves rows whose column value matches a string that contains wildcard characters.

Range query

Retrieves rows whose column value falls within a specified range.

Exists query

Also called a NULL query or NULL-value query. Determines whether a specific column exists in a row, which is useful for sparse data.

Collapse (distinct)

Collapses the result set based on a specific column so that only one row per distinct value is returned, ensuring diversity in the results.

Geo query

Geo queries include the following types:

  • Geo-distance query: Retrieves rows in which the value of a geo-point field falls within a circular area defined by a central point and a radius.

  • Geo-bounding box query: Retrieves rows in which the value of a geo-point field falls within a specified rectangular area.

  • Geo-polygon query: Retrieves rows in which the value of a geo-point field falls within a specified polygon area.

Nested query

Queries the child rows of nested fields.

上一篇: Data query 下一篇: Match all query
阿里云首页 表格存储 相关技术圈