All Products
Search
Document Center

Tablestore:Data types

Last Updated:Dec 06, 2025

This topic describes the mappings between field data types in data tables and their corresponding types in search indexes. It also explains the additional properties and query features supported by different field data types.

Data type mappings

The value of a field in a search index is derived from the value of the corresponding field in the data table. The data types of these fields must match. The following table describes the mappings between field data types in search indexes and data tables.

Important

The data types in the table must have a one-to-one mapping. Geo-point and Nested types also require specific formats. If these requirements are not met, the data is discarded as dirty data. This can cause data to exist in the table but not be found in the search index.

Field data type in search indexes

Field data type in data tables

Description

Long

Integer

A 64-bit long integer.

Double

Double

A 64-bit double-precision floating-point number.

Boolean

Boolean

A Boolean value.

Keyword

String

A string that cannot be tokenized.

FuzzyKeyword

String

A string that supports high-performance fuzzy queries.

Text

String

A string or text that can be tokenized. For more information, see String types.

Date

Integer, String

The Date data type supports various custom formats for date data.

IP

String

The IP type supports IP addresses in IPv4 and IPv6 formats.

Geo-point

String

The coordinate information of a point. The format is latitude,longitude, with latitude first, then longitude. The latitude must be in the range of [-90, +90], and the longitude must be in the range of [-180, +180]. For example, 35.8,-45.91.

Vector

String, Binary

The vector type. The value is a string in the format of a Float32 array. The length of the array is equal to the dimension of the field. For example, the vector string [1, 5.1, 4.7, 0.08 ] has a dimension of 4.

Nested

String

The nested type. For example, [{"a": 1}, {"a": 3}].

JSON type

String

The JSON type. It supports the OBJECT and NESTED types.

Field attribute support

Search index fields support additional properties, such as array, virtual column, and highlighting. The supported properties vary based on the data type. The following table lists the applicable data types and provides a description for each additional property.

Property

Applicable data types

Description

Array

Long, Double, Boolean, Keyword, Text, Date, IP, and Geo-point

To store a series of data of the same type, set the field to the array type.

When you write data, it must be in the JSON array format, such as ["a","b","c"].

Nested, Vector, and JSON types are arrays by nature, so you do not need to set this property.

Virtual column

Long, Double, Keyword, FuzzyKeyword, Text, Date, IP, Geo-point, and Vector

If you want to query new fields with new types without changing the storage structure and data in Tablestore, set the field as a virtual column.

Date format

Date

When you use the Date type, you must specify the date format.

Tokenization

Text

To implement full-text search, configure tokenization for the field.

Summary and highlighting

Text

To highlight hit search queries in full-text searches, enable the Summary and Highlighting feature for the field.

Vector configuration

Vector

When you use a Vector field, you must specify the vector's measure algorithm and dimension.

JSON type configuration

JSON

When using a JSON field, specify the JSON type. The Object and Nested types are supported.

Query feature support

The following table describes the query features available for each data type.

Note
  • "✓" indicates that the feature is supported. "×" indicates that the feature is not supported.

  • The match all query feature does not require you to set fields.

Query feature

Long

Double

Boolean

Keyword

FuzzyKeyword

Text

Date

IP

Geo-point

JSON Object

Nested/JSON Nested

Vector

Term query

×

×

×

×

×

Terms query

×

×

×

×

×

×

Range query

×

×

×

×

×

Column exists query

Wildcard query

×

×

×

×

×

×

×

×

×

Prefix query

×

×

×

×

×

×

×

×

×

Suffix query

×

×

×

×

×

×

×

×

×

×

Wildcard query based on tokenization

×

×

×

×

×

×

×

×

×

×

Geo query

×

×

×

×

×

×

×

×

×

×

Nested type query

×

×

×

×

×

×

×

×

×

×

×

Collapse (deduplicate)

×

×

×

×

×

×

×

×

Boolean query

×

Match query

×

×

×

×

×

×

Match phrase query

×

×

×

×

×

×

AISearch

×

×

×

×

×

×

×

×

×

×

×