Overview
DataType is an enumeration that defines all supported data types in Zvec, including scalar types, dense/sparse vector types, and array types.
Scalar Types
Basic data types for single values.String/text data type. Stores text values of variable length.
Boolean data type. Stores
True or False values.32-bit signed integer (-2,147,483,648 to 2,147,483,647).
64-bit signed integer (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807).
32-bit unsigned integer (0 to 4,294,967,295).
64-bit unsigned integer (0 to 18,446,744,073,709,551,615).
32-bit floating point number (single precision).
64-bit floating point number (double precision).
Dense Vector Types
Fixed-dimensional dense vectors for embeddings.Dense vector with 16-bit floating point elements (half precision). More memory-efficient than FP32 with slight precision loss.
Dense vector with 32-bit floating point elements (single precision). Most common vector type for embeddings.
Dense vector with 64-bit floating point elements (double precision). Highest precision but uses more memory.
Dense vector with 8-bit signed integer elements. Used for quantized embeddings.
Sparse Vector Types
Sparse vectors for high-dimensional spaces where most elements are zero.Sparse vector with 16-bit floating point values. Stores only non-zero elements.
Sparse vector with 32-bit floating point values. Most common sparse vector type.
Array Types
Variable-length arrays of scalar values.Array of strings. Stores multiple text values.
Array of boolean values.
Array of 32-bit signed integers.
Array of 64-bit signed integers.
Array of 32-bit unsigned integers.
Array of 64-bit unsigned integers.
Array of 32-bit floating point numbers.
Array of 64-bit floating point numbers.
Usage Examples
Defining Schema with Data Types
Checking Data Type
Vector Type Comparison
Type Properties
AllDataType enum members have these properties:
The name of the data type as a string.
The internal integer value of the data type.
Choosing the Right Data Type
For Vectors
For Scalars
For Arrays
See Also
- Field Definition
- Collection Schema
- MetricType - Distance metrics for vectors
- QuantizeType - Vector quantization options