Was this page helpful?
Reference for Vector Search¶
This page is a technical reference for working with Vector Search in ScyllaDB. It includes a list of supported instance types, the CQL syntax needed to define and query vector data, and the API endpoints for working with Vector Search. Use it as a quick lookup when writing queries or building integrations.
Supported Instance Types¶
The following instance types are supported for Vector Search clusters.
On AWS¶
Instance Type |
ID |
|---|---|
t4g.medium |
176 |
r7g.medium |
177 |
r7g.large |
204 |
r7g.xlarge |
205 |
r7g.2xlarge |
206 |
r7g.4xlarge |
207 |
r7g.8xlarge |
208 |
r7g.12xlarge |
209 |
r7g.16xlarge |
210 |
r7i.24xlarge |
211 |
r7i.48xlarge |
212 |
On GCP¶
Instance Type |
ID |
|---|---|
e2-medium |
179 |
n4-highmem-2 |
180 |
n4-highmem-4 |
213 |
n4-highmem-8 |
214 |
n4-highmem-16 |
215 |
n4-highmem-32 |
216 |
n4-highmem-48 |
217 |
n4-highmem-64 |
218 |
n4-highmem-80 |
219 |
m4-megamem-28 |
220 (limited availability - contact us) |
m4-ultramem-56 |
221 (limited availability - contact us) |
m4-ultramem-112 |
222 (limited availability - contact us) |
m4-ultramem-224 |
223 (limited availability - contact us) |
CQL Reference¶
Create Vector Table¶
Syntax:
CREATE TABLE IF NOT EXISTS `keyspace.table` ( column1 `type`, column2 `type`, column3 `type`, vector_column_name vector<float, n>, );
Example:
CREATE TABLE IF NOT EXISTS mykeyspace.pictures ( userid uuid, pictureid uuid, body text, posted_by text, picture_vector vector<float, 64>, PRIMARY KEY (userid, pictureid, posted_by) );
Create Vector Index¶
Syntax:
CREATE CUSTOM INDEX [ IF NOT EXISTS ] `index_name`
ON `table_name` (`vector_column_name`)
USING 'vector_index'
[WITH OPTIONS = ];
Example:
CREATE CUSTOM INDEX vectorIndex
ON pictures (picture_vector)
USING 'vector_index'
WITH OPTIONS = {'similarity_function': 'COSINE', 'maximum_node_connections': '16'};
See Global Secondary Indexes - Vector Index in the ScyllaDB documentation for a list of available options.
Drop Vector Index¶
Syntax:
DROP INDEX [ IF EXISTS ] `index_name`
Example:
DROP INDEX [ IF EXISTS ] vectorIndex
Run Similarity Search¶
Syntax:
SELECT `column1`, `column2`, ...
FROM `keyspace.table`
ORDER BY `vector_column_name`
ANN OF `vector`
LIMIT `integer`;
Example:
SELECT pictureid
FROM mykeyspace.pictures
ORDER BY picture_vector ANN OF [
0.12,0.34,0.56,0.78,0.91,0.15,0.62,0.48,0.22,0.31,
0.40,0.67,0.53,0.84,0.19,0.72,0.63,0.54,0.26,0.33,
0.11,0.09,0.27,0.41,0.69,0.82,0.57,0.38,0.71,0.46,
0.55,0.64,0.17,0.81,0.23,0.95,0.66,0.35,0.44,0.59,
0.02,0.75,0.28,0.16,0.92,0.88,0.47,0.13,0.99,0.21,
0.32,0.83,0.45,0.04,0.86,0.25,0.36,0.73,0.07,0.61,
0.52,0.14,0.68,0.05
]
LIMIT 3;
API Reference¶
Create a Vector Search Cluster¶
Create a new cluster with Vector Search enabled:
curl -X POST "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/cluster" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "clusterName": "my-vector-cluster", "cloudProviderId": 1, "regionId": 1, "scyllaVersion":"2025.4.0~rc0-0.20251001.6969918d3151", "numberOfNodes": 3, "instanceId": 62, "freeTier": true, "replicationFactor": 3, "vectorSearch": { "defaultNodes": 1, "defaultInstanceTypeId": 175 } }'
Deploy Vector Search Nodes¶
Deploy Vector Search nodes in the specified datacenter (DC):
curl -X POST "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/cluster/{CLUSTER_ID}/dc/{DC_ID}/vector-search" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"defaultNodes": 1,
"defaultInstanceTypeId": 175
}'
Delete Vector Search Nodes¶
Delete Vector Search nodes from the specified datacenter (DC):
curl -X DELETE "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/cluster/{CLUSTER_ID}/dc/{DC_ID}/vector-search" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
Get Vector Search Nodes¶
Get information about Vector Search nodes in the specified datacenter (DC):
curl -X GET "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/cluster/{CLUSTER_ID}/dc/{DC_ID}/vector-search" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
Example response:
{
"data": {
"availabilityZones": [
{
"azid": "use1-az4",
"nodes": [
{
"id": 337,
"instanceTypeId": 175,
"status": "ACTIVE"
}
]
},
{
"azid": "use1-az5",
"nodes": [
{
"id": 338,
"instanceTypeId": 175,
"status": "ACTIVE"
}
]
},
{
"azid": "use1-az2",
"nodes": [
{
"id": 339,
"instanceTypeId": 175,
"status": "ACTIVE"
}
]
}
]
}
}
Get Your Account ID¶
curl -X GET "https://api.cloud.scylladb.com/account/default" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response:
{
"error": "",
"data": {
"accountId": 12345,
"name": "my-account",
"userId": "12345"
}
}
Get Your Cluster ID¶
curl -X GET "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/clusters" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get Your DC ID¶
curl -X GET "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/cluster/{CLUSTER_ID}/dcs" \
-H "Authorization: Bearer YOUR_API_TOKEN"