ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Ask AI
ScyllaDB Docs ScyllaDB Cloud Vector Search Reference for Vector Search

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 managing Vector Search clusters.

Supported Instance Types¶

The following instance types are supported for Vector Search clusters.

On AWS¶

Instance Type

ID

vCPUs

RAM (GiB)

Use Case

t4g.medium

176

2

4

Development and testing

r7g.medium

177

1

8

Small workloads

r7g.large

204

2

16

Light production workloads

r7g.xlarge

205

4

32

Medium workloads

r7g.2xlarge

206

8

64

General-purpose production

r7g.4xlarge

207

16

128

Large indexes

r7g.8xlarge

208

32

256

Very large indexes

r7g.12xlarge

209

48

384

High-dimensional / high-volume

r7g.16xlarge

210

64

512

Maximum Graviton capacity

r7i.24xlarge

211

96

768

Extreme workloads (Intel)

r7i.48xlarge

212

192

1,536

Maximum capacity (Intel)

On GCP¶

Instance Type

ID

vCPUs

RAM (GiB)

Use Case

e2-medium

179

2

4

Development and testing

n4-highmem-2

180

2

16

Small workloads

n4-highmem-4

213

4

32

Light production workloads

n4-highmem-8

214

8

64

General-purpose production

n4-highmem-16

215

16

128

Large indexes

n4-highmem-32

216

32

256

Very large indexes

n4-highmem-48

217

48

384

High-dimensional / high-volume

n4-highmem-64

218

64

512

High-dimensional / high-volume

n4-highmem-80

219

80

640

Maximum N4 capacity

m4-megamem-28

220 (limited availability - contact us)

28

448

Memory-optimized workloads

m4-ultramem-56

221 (limited availability - contact us)

56

896

Ultra-memory workloads

m4-ultramem-112

222 (limited availability - contact us)

112

1,792

Extreme workloads

m4-ultramem-224

223 (limited availability - contact us)

224

3,584

Maximum capacity

CQL Reference¶

Create Vector Table¶

Syntax:

CREATE TABLE IF NOT EXISTS keyspace.table (
  column1 type,
  column2 type,
  vector_column_name vector<float, n>,
  PRIMARY KEY (column1, column2)
);

Example:

CREATE TABLE IF NOT EXISTS myapp.comments (
  record_id timeuuid,
  id uuid,
  commenter text,
  comment text,
  comment_vector vector<float, 5>,
  created_at timestamp,
  PRIMARY KEY (id, created_at)
);

Create Vector Index¶

Syntax:

CREATE CUSTOM INDEX [ IF NOT EXISTS ] index_name
ON table_name (vector_column_name)
USING 'vector_index'
[ WITH OPTIONS = { options } ];

Available options:

Option

Default

Description

similarity_function

COSINE

Distance metric: COSINE, DOT_PRODUCT, or EUCLIDEAN.

maximum_node_connections

16

Max connections per HNSW graph node (commonly known as m).

construction_beam_width

128

Dynamic candidate list size during index build (commonly known as efConstruct).

search_beam_width

128

Dynamic candidate list size during queries (commonly known as efSearch).

quantization

f32

Vector precision: f32, f16, bf16, i8, or b1.

oversampling

1.0

Candidate multiplier for quantized search (1.0-100.0).

rescoring

false

Re-rank results using full-precision vectors from disk.

Example:

CREATE CUSTOM INDEX comment_ann_index
ON myapp.comments(comment_vector)
USING 'vector_index'
WITH OPTIONS = {
  'similarity_function': 'COSINE',
  'maximum_node_connections': '16',
  'quantization': 'i8',
  'oversampling': '5.0',
  'rescoring': 'true'
};

See Global Secondary Indexes - Vector Index in the ScyllaDB documentation for details.

Drop Vector Index¶

Syntax:

DROP INDEX [ IF EXISTS ] index_name;

Example:

DROP INDEX IF EXISTS comment_ann_index;

Run Similarity Search¶

Syntax:

SELECT column1, column2, ...
FROM keyspace.table
[ WHERE condition ]
ORDER BY vector_column_name ANN OF [v1, v2, ..., vn]
LIMIT k
[ ALLOW FILTERING ];

Example:

SELECT id, commenter, comment
FROM myapp.comments
ORDER BY comment_vector ANN OF [0.12, 0.34, 0.56, 0.78, 0.91]
LIMIT 3;

See Data Manipulation - SELECT - Vector Queries in the ScyllaDB documentation for details.

To combine similarity search with metadata constraints using global or local indexes, see Filtering Vector Search Results.

Retrieve Similarity Scores¶

Use one of the built-in similarity functions to return a similarity score for each row. The function must match the similarity_function configured on your vector index.

Available functions:

  • similarity_cosine(<vector>, <vector>)

  • similarity_dot_product(<vector>, <vector>)

  • similarity_euclidean(<vector>, <vector>)

Each argument can be either a vector column name or a vector literal. Both arguments must have the same dimension.

Note

There is no generic similarity() function. You must call the specific function matching your index’s distance metric.

Syntax:

SELECT column1, similarity_cosine(vector_column, [v1, ..., vn])
FROM keyspace.table
ORDER BY vector_column ANN OF [v1, ..., vn]
LIMIT k;

Example:

SELECT commenter, comment,
       similarity_cosine(comment_vector, [0.12, 0.34, 0.56, 0.78, 0.91])
       AS similarity
FROM myapp.comments
ORDER BY comment_vector ANN OF [0.12, 0.34, 0.56, 0.78, 0.91]
LIMIT 3;

Each function returns a float in the range [0, 1]. Values closer to 1 indicate greater similarity. The similarity_euclidean and similarity_dot_product functions do not perform vector normalization prior to computing similarity.

Note

similarity_dot_product assumes that all input vectors are L2-normalized. Supplying non-normalized vectors will produce values that are not meaningful for similarity comparison. If your vectors are not normalized, use similarity_cosine instead.

See Vector Similarity Functions in the ScyllaDB documentation for details.

API Reference¶

All ScyllaDB Cloud API requests require a personal API token for authentication. See Create a Personal Token for details.

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,
    "numberOfNodes": 3,
    "instanceId": 62,
    "replicationFactor": 3,
    "vectorSearch": {
      "nodeCount": 1,
      "defaultInstanceTypeId": 176
    }
  }'

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 '{
    "nodeCount": 1,
    "defaultInstanceTypeId": 176
  }'

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"

Resize Vector Search Nodes¶

Resize the Vector Search deployment in the specified datacenter (DC) by changing the node count or instance type:

curl -X PATCH "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 '{
    "nodeCount": 3,
    "defaultInstanceTypeId": 177
  }'

Parameters:

  • nodeCount (integer, 1–27, required) — number of vector search nodes, distributed evenly across cluster racks.

  • defaultInstanceTypeId (integer, required) — ID of the instance type. See Supported Instance Types or use the deployment endpoint with target=VECTOR_SEARCH to list available types.

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"

Example response:

{
  "data": {
    "availabilityZones": [
      {
        "azid": "use1-az4",
        "nodes": [
          {
            "id": 337,
            "instanceTypeId": 176,
            "status": "ACTIVE"
          }
        ]
      },
      {
        "azid": "use1-az5",
        "nodes": [
          {
            "id": 338,
            "instanceTypeId": 176,
            "status": "ACTIVE"
          }
        ]
      },
      {
        "azid": "use1-az2",
        "nodes": [
          {
            "id": 339,
            "instanceTypeId": 176,
            "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"

Get Available Vector Search Instance Types¶

List available Vector Search instance types for a specific cloud provider and region by passing target=VECTOR_SEARCH:

curl -X GET "https://api.cloud.scylladb.com/deployment/cloud-provider/{CLOUD_PROVIDER_ID}/region/{REGION_ID}?target=VECTOR_SEARCH" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

The response contains a list of instance types with their IDs. Use the instance type ID as the defaultInstanceTypeId parameter when deploying or resizing Vector Search nodes.

Track Operation Status¶

All asynchronous Vector Search operations (deploy, resize, delete) return a ClusterRequest object with a request ID. You can poll for the operation status:

curl -X GET "https://api.cloud.scylladb.com/account/{ACCOUNT_ID}/cluster/request/{REQUEST_ID}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

The status field in the response is one of: QUEUED, IN_PROGRESS, COMPLETED, or FAILED.

Was this page helpful?

PREVIOUS
Vector Search Glossary
NEXT
Service Behavior
  • Create an issue

On this page

  • Reference for Vector Search
    • Supported Instance Types
      • On AWS
      • On GCP
    • CQL Reference
      • Create Vector Table
      • Create Vector Index
      • Drop Vector Index
      • Run Similarity Search
      • Retrieve Similarity Scores
    • API Reference
      • Create a Vector Search Cluster
      • Deploy Vector Search Nodes
      • Delete Vector Search Nodes
      • Resize Vector Search Nodes
      • Get Vector Search Nodes
      • Get Your Account ID
      • Get Your Cluster ID
      • Get Your DC ID
      • Get Available Vector Search Instance Types
      • Track Operation Status
ScyllaDB Cloud
  • Quick Start Guide to ScyllaDB Cloud
  • About ScyllaDB Cloud as a Service
    • Benefits
    • Best Practices
    • Billing
  • Deployment
    • Cluster Types - X Cloud and Standard
    • Bring Your Own Account (BYOA) - AWS
    • Bring Your Own Account (BYOA) - GCP
    • Terraform Provider
    • Free Trial
  • Cluster Connections
    • Configure AWS Transit Gateway (TGW) VPC Attachment Connection
    • Configure Virtual Private Cloud (VPC) Peering with AWS
    • Configure Virtual Private Cloud (VPC) Peering with GCP
    • Migrating Cluster Connection
    • Checking Cluster Availability
    • Glossary for Cluster Connections
  • Access Management
    • SAML Single Sign-On (SSO)
    • User Management
  • Managing Clusters
    • Resizing a Cluster
    • Adding a Datacenter
    • Deleting a Cluster
    • Maintenance Windows
    • Email Notifications
    • Usage
  • Security
    • Security Best Practices
    • Security Concepts
    • Database-level Encryption
    • Storage-level Encryption
    • Client-to-node Encryption
    • Service Users
    • Data Privacy and Compliance
  • Using ScyllaDB
    • Apache Cassandra Query Language (CQL)
    • ScyllaDB Drivers
    • Tracing
    • Role Based Access Control (RBAC)
    • ScyllaDB Integrations
  • Vector Search
    • Quick Start Guide
    • Vector Search Concepts
    • Vector Search Deployments
    • Sizing and Capacity Planning
    • Working with Vector Search
    • Filtering
    • Quantization and Rescoring
    • Security
    • Troubleshooting
    • FAQ
    • Glossary
    • Reference
    • Example Project
  • Service Behavior
    • Backups
    • Managing ScyllaDB Versions
    • Advanced Internode (RPC) Compression
  • Monitoring
    • Monitoring Clusters
    • Extracting Cluster Metrics in Prometheus Format
  • API Documentation
    • Create a Personal Token for Authentication
    • Terraform Provider for ScyllaDB Cloud
    • API Reference
    • Error Codes
  • Help & Learning
    • Tutorials
    • FAQ
    • Getting Help
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 26 Mar 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.1
Ask AI