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 BETA Reference for Vector Search

Reference for Vector Search¶

This page is a technical reference for working with vector search in ScyllaDB. It includes the CQL syntax needed to define and query vector data, along with the API endpoints for working with vector search. Use it as a quick lookup when writing queries or building integrations.

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"

Was this page helpful?

PREVIOUS
Vector Search Glossary
NEXT
API Documentation
  • Create an issue

On this page

  • Reference for Vector Search
    • CQL Reference
      • Create Vector Table
      • Create Vector Index
      • Drop Vector Index
      • Run Similarity Search
    • API Reference
      • Create a Vector Search Cluster
      • Deploy Vector Search Nodes
      • Delete Vector Search Nodes
      • Get Vector Search Nodes
      • Get Your Account ID
      • Get Your Cluster ID
      • Get Your DC ID
ScyllaDB Cloud
  • New to ScyllaDB? Start here!
  • Quick Start Guide to ScyllaDB Cloud
  • About ScyllaDB Cloud as a Service
    • Benefits
    • Backups
    • Best Practices
    • Managing ScyllaDB Versions
    • Support, Alerts, and SLA Commitments
    • 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
  • Using ScyllaDB
    • Apache Cassandra Query Language (CQL)
    • ScyllaDB Drivers
    • Tracing
    • Role Based Access Control (RBAC)
    • ScyllaDB Integrations
  • Monitoring
    • Monitoring Clusters
    • Extracting Cluster Metrics in Prometheus Format
  • Security
    • Security Best Practices
    • Security Concepts
    • Database-level Encryption
    • Storage-level Encryption
    • Service Users
    • Data Privacy and Compliance
  • Vector Search
    • Quick Start Guide to Vector Search
    • Vector Search Clusters
    • Working with Vector Search
    • Glossary
    • Reference
    • Example Project
  • 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
© 2025, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 24 Nov 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.9
Ask AI