Consistent, full-text search that scales with your data.

SurrealDB is designed for building applications of any size - and for that, query performance, and improved data analysis workloads are key. With SurrealDB secondary indexes, you can now index data using traditional indexes, full-text search indexing, and vector-embedding search for artificial intelligence use cases.

Support for multiple index types

SurrealDB has support for traditional indexing, unique indexes and constraints, full-text search indexes, and vector-embedding indexing. We reimagined how indexing might be implemented - opting for a completely custom-built indexing engine, which sits within the SurrealDB core itself.

Indexing support regardless of deployment environment

The indexing engine is agnostic to its deployment environment - whether running on top of IndexedDB in the browser, an embedded run-time in Rust or Python, or distributed over multiple nodes in a highly-scalable cluster. The indexing engine is integrated with the SurrealQL query language natively, without the need for an additional external query language, or for indexing-specific functions or plugins

Built within the ACID transaction model of the database

The indexing logic is handled directly within the ACID transaction model of the database. For a developer using SurrealDB, this means that any indexed data is consistent and in-sync with the data in the database.

Index any of your data, however it is structured

For traditional and unique indexes, SurrealDB supports simple single-field indexes, multi-field compound indexes, nested object and array fields, and also has support for flattened indexing of array data.

Full-featured full-text search built in to the core

Using the full-text search indexing engine, SurrealDB allows developers to define custom analysers which specify exactly how their text data should be processed, with support for multiple tokenizers, advanced filters including Ngram, EdgeNGram, and Snowball, and support for 17 languages from English to Arabic.

Integrate with ML and AI workflows with vector search

With vector-embedding indexing, our initial implementation supports exact nearest neighbour retrieval for vectors of arbitrary size using Metric Trees, with support for HNSW-based approximate nearest neighbours retrieval coming in the future.