TuringDB has a built-in vector index that lets you run k-nearest-neighbor searches over embedding vectors. You bring your own embeddings, from any model or provider, and TuringDB handles the indexing, storage, and fast retrieval. Each vector is associated with a numerical ID. That ID can be a node property, an edge property, or a foreign key referencing data in an external system. This keeps the index lightweight and flexible: the vector store doesn’t need to know what your data looks like.Documentation Index
Fetch the complete documentation index at: https://docs.turingdb.ai/llms.txt
Use this file to discover all available pages before exploring further.
Create a vector index
A vector index is defined by a name, a dimension, and a distance metric. Syntax:| Parameter | Description |
|---|---|
<name> | Identifier for the vector index |
<dim> | Dimension of the embedding vectors (positive integer) |
<metric> | Distance metric: EUCLID (Euclidean distance) or COSINE (cosine similarity) |
- Cypher
- Python SDK
Load embeddings
Once the index exists, load your pre-computed embeddings from a file. Each row in the file maps a numerical ID to a vector. The file path is relative to your TuringDB data directory (~/.turing/data by default).
The TuringDB data directory defaults to
~/.turing/data. You can change it at startup with the -turing-dir flag.| Parameter | Description |
|---|---|
<filepath> | Path to the embeddings file, relative to the TuringDB data directory |
<index_name> | Name of the target vector index |
- Cypher
- Python SDK
Search
VECTOR SEARCH finds the k nearest neighbors of a query vector and yields their IDs. It is a read statement, so you can chain it with MATCH to pull back the actual graph data.
Syntax:
| Parameter | Description |
|---|---|
<index_name> | Name of the vector index to search |
<k> | Number of nearest neighbors to return (positive integer) |
<vector> | Query vector as a list literal of float values |
<variable> | Variable name to hold the result IDs |
Standalone search
- Cypher
- Python SDK
Combining with MATCH
This is where it gets interesting. ChainVECTOR SEARCH with a MATCH clause to join the nearest-neighbor IDs back to your graph:
- Cypher
- Python SDK
ids variable works exactly like a variable introduced by CALL ... YIELD, so any subsequent MATCH clause can reference it.
Manage indexes
List all vector indexes
Delete a vector index
Complete workflow
- Cypher
- Python SDK

