This topic describes the mappings between field data types in data tables and search indexes, and the additional attributes supported by different data types of fields.
The value of a field in a search index is the value of the field with the same name in the data table for which the search index is created. The data types of the two values must match. The following table describes the matching rules.
Field data type in search indexes | Field data type in data tables | Description |
---|---|---|
Long | Integer | 64-bit long integers. |
Double | Double | 64-bit double-precision floating-point numbers. |
Boolean | Boolean | Boolean values. |
Keyword | String | Character strings that cannot be tokenized. |
Text | String |
Character strings or text that can be tokenized. For more information about tokenization, see Tokenization. |
Date | Integer and String | The Date data type. You can specify the format of data of the Date type. For more information, see Types of date data. |
Geo-point | String | The coordinate information about the location. This parameter value must be in the
format of latitude,longitude . Valid values of the latitude: [-90,+90]. Valid values of the longitude: [-180,+180].
Example: 35.8,-45.91 .
|
Nested | String | The nested type. Example: [{"a": 1}, {"a": 3}]. |
The following table describes the additional attributes of fields in search indexes.
Attribute | Type | Description |
---|---|---|
IsArray | Boolean | Specifies whether the value of the column is an array.
The value of true indicates that the value of the column is an array. Data written to the column must be a JSON array such as ["a","b","c"]. You do not need to specify the IsArray attribute for a nested column because a nested column is an array. Data of the ARRAY type can be used in all queries because arrays do not affect queries. |
isVirtualField | Boolean | Specifies whether the column is a virtual column.
|
Type | IsArray | isVirtualField |
---|---|---|
Long | Supported | Supported |
Double | Supported | Supported |
Boolean | Supported | Not supported |
Keyword | Supported | Supported |
Text | Supported | Supported |
Date | Supported | Supported |
Geo-point | Supported | Supported |
Nested | Nested fields are arrays. | Not supported |