Search index fields map to specific data types from data tables. Each data type supports different properties and query features.
Data type mappings
Search index field values are derived from the corresponding fields in the data table. The data types must match between search indexes and data tables.
Data types must have a one-to-one mapping. Geo-point and Nested types also require specific formats. Mismatched types or formats cause the data to be discarded as dirty data, so the data exists in the table but does not appear in search index results.
|
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 custom formats for date values. |
|
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 |
|
Vector |
String, Binary |
The vector type. The value is a Float32 array formatted as a string. The array length equals the field dimension. For example, the vector string |
|
String |
The nested type. For example, |
|
|
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 by data type.
|
Property |
Applicable data types |
Description |
|
Array |
Long, Double, Boolean, Keyword, Text, Date, IP, and Geo-point |
To store multiple values of the same type, set the field to the array type. Data must be written in JSON array format, such as Nested, Vector, and JSON types are arrays by nature. You do not need to set this property for these types. |
|
Virtual column |
Long, Double, Keyword, FuzzyKeyword, Text, Date, IP, Geo-point, and Vector |
To query fields with new types without changing the table storage structure, set the field as a virtual column. |
|
Date format |
Date |
Specify the date format when using the Date type. |
|
Tokenization |
Text |
To implement full-text search, configure tokenization for the field. |
|
Summary and highlighting |
Text |
To highlight matched terms in full-text search results, enable the Summary and Highlighting feature for the field. |
|
Vector configuration |
Vector |
Specify the vector's distance metric algorithm and dimension when using a Vector field. |
|
JSON type configuration |
JSON |
Specify the JSON type when using a JSON field. Object and Nested types are supported. |
Query feature support
Each data type supports a specific set of query features.
-
A check mark (✓) indicates that the feature is supported. A cross mark (×) indicates that the feature is not supported.
-
Match all query does not require specific fields.
|
Query feature |
Long |
Double |
Boolean |
Keyword |
FuzzyKeyword |
Text |
Date |
IP |
Geo-point |
JSON Object |
Nested/JSON Nested |
Vector |
|
✓ |
✓ |
✓ |
✓ |
× |
× |
✓ |
✓ |
× |
✓ |
× |
× |
|
|
✓ |
✓ |
✓ |
✓ |
× |
× |
✓ |
× |
× |
✓ |
× |
× |
|
|
✓ |
✓ |
✓ |
✓ |
× |
× |
✓ |
✓ |
× |
✓ |
× |
× |
|
|
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
|
|
× |
× |
× |
✓ |
✓ |
× |
× |
× |
× |
✓ |
× |
× |
|
|
× |
× |
× |
✓ |
✓ |
× |
× |
× |
× |
✓ |
× |
× |
|
|
× |
× |
× |
× |
✓ |
× |
× |
× |
× |
✓ |
× |
× |
|
|
× |
× |
× |
× |
× |
✓ |
× |
× |
× |
✓ |
× |
× |
|
|
× |
× |
× |
× |
× |
× |
× |
× |
✓ |
✓ |
× |
× |
|
|
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
✓ |
× |
|
|
✓ |
✓ |
× |
✓ |
× |
× |
× |
× |
× |
✓ |
× |
× |
|
|
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
✓ |
× |
✓ |
✓ |
✓ |
✓ |
|
|
✓ |
✓ |
✓ |
✓ |
× |
✓ |
× |
× |
× |
✓ |
× |
× |
|
|
✓ |
✓ |
✓ |
✓ |
× |
✓ |
× |
× |
× |
✓ |
× |
× |
|
|
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
× |
✓ |