Vector search
Nearest-neighbour search on an HNSW index. Search by vector, or by query text with an embedder.
01Features · search and AI
Tessera DB has vector search, full-text search and hybrid ranking on one store, next to a graph database with SQL and Cypher. A search hit is the same record a query returns. So retrieval for AI can find a record by meaning or by words, then follow its links.
02At a glance
03What is here
A separate search engine and a separate vector database each hold a copy of your data. Here the text index and the vector index are indexes over the store itself. A write lands in them in the same transaction as the record.
Nearest-neighbour search on an HNSW index. Search by vector, or by query text with an embedder.
Relevance ranking with BM25, highlighted snippets and fuzzy matching.
Text and vector rankings fused into one list, with an equality filter on properties.
Chunking, embedding and retrieval inside the database, and graph hops from the hits.
04Vector search
A vector is a list of numbers that stands for the meaning of a piece of text or another item. Vector search finds the records whose vectors are nearest to yours. Tessera DB uses HNSW: a layered graph of vectors that a search walks from coarse layers to fine ones.
curl -X POST http://localhost:8080/api/search/vector \
-H "Content-Type: application/json" \
-d '{"embedding": [0.1, 0.2, 0.3], "top_k": 5}'
| Topic | Behaviour |
|---|---|
| Search by vector | Send a vector and top_k. The answer lists the nearest records. |
| Search by text | Send text. The server embeds it and searches. This needs an embedder. |
| Vector width | Fixed in the server's configuration, or detected from the embedder. A vector of another length is refused. |
| Filter | A pure vector search takes no metadata filter. Hybrid search takes an equality filter. |
| Indexes | One vector index per database. |
| Measured size | Up to 100,000 vectors at 128 dimensions. |
05Full-text search
Full-text search finds the records that mention your words. An inverted index maps each word to the records that hold it. BM25 ranks the hits, so that a rare word in a short record counts for more than a common word in a long one.
curl "http://localhost:8080/api/search?q=Alice&limit=5"
Each hit carries a score. The best matches come first.
The answer can mark the words that matched, for a result page.
Matches words that are a few letter changes away, by Levenshtein distance.
06Hybrid search
Text search is exact about words and blind to meaning. Vector search is the reverse. Hybrid search runs both and merges the two rankings with Reciprocal Rank Fusion. A record that both rankers place high comes out on top.
curl -X POST http://localhost:8080/api/search/hybrid \
-H "Content-Type: application/json" \
-d '{"text": "late transfer", "vector": [0.1, 0.2, 0.3], "top_k": 10,
"filter": {"owner": "asha"}}'
filter is an equality test on record properties. It narrows both rankers before the two lists are fused.| Field | What it does |
|---|---|
text | The words for the BM25 ranker. |
vector | The vector for the HNSW ranker. |
top_k | How many results to return. |
filter | Equality on record properties. Narrows both rankers before fusion. |
bm25_weight, vector_weight | Optional. How much each ranker counts. |
rrf_k | Optional. The constant of the fusion formula. |
per_ranker_top_n | Optional. How many hits each ranker hands to the fusion step. |
Why fuse by rank. A BM25 score and a vector distance are on different scales, so adding them makes little sense. Reciprocal Rank Fusion ignores the raw scores. It uses each record's position in each list. That makes the merge stable, whatever the two scales are.
07GraphRAG retrieval
Retrieval-augmented generation feeds a language model the records that matter for a question. GraphRAG adds the graph: find a record, then follow its links to the context around it. In Tessera DB the chunks, their vectors and the graph are in one store, so one statement does both steps.
Document chunking and embedding run inside the database.
Find chunks by vector, by keyword, or by both with hybrid search.
From each hit, hop to what it cites, who wrote it, or what it belongs to.
CALL db.index.vector.queryNodes('Doc', 1, [1.0, 0.0, 0.0]) YIELD node
MATCH (node)-[:CITES]->(m) RETURN node.name AS from, m.name AS to
CALL db.index.fulltext.queryNodes('Doc', 'apple') YIELD node, score
RETURN node.name AS name ORDER BY name
These two procedures are the ones common graph-RAG client libraries call. So a library written for the Neo4j drivers can retrieve from Tessera DB over Bolt. The server also answers the schema procedures such libraries read first. It does not support CREATE VECTOR INDEX or CREATE FULLTEXT INDEX, and a client that checks for a Neo4j version must have that check turned off.
08Embeddings
To search by text with vectors, something has to turn text into a vector. You have two choices, and they are very different.
| Built-in embedder | Your own model | |
|---|---|---|
| What it is | An embedder inside the server. No outside service. | An embedding service you run or rent. |
| How you turn it on | TESSERA_AUTO_EMBED=on. It is off by default. | TESSERA_EMBEDDING_URL points the server at it. |
| What it matches | Spelling. It is lexical. | Meaning, as far as your model captures it. |
| Example | "database" and "databases" score 0.95. "car" and "automobile" score 0.00. | Depends on your model. |
| Use it for | Trying vector search with no setup. Matching words that are spelled almost alike. | Semantic search and retrieval for AI. |
| Limit | It does not understand synonyms. | Only the OpenAI request and response shape is spoken. |
09Permissions
A search index that ignores access rules leaks data through its results. In Tessera DB a search is a read like any other, and it passes the same checks.
| Check | What it means |
|---|---|
| Roles | The caller's key needs the right to read. This applies in every edition. |
| Tenant | A result from another tenant is never returned. Tenants are an Enterprise feature. |
| Branch | A search on a branch sees that branch's records. |
| As of | A search pinned to a past moment sees the records of that moment. |
| Row rules | A record that a row rule hides from this caller is removed. Row-level security is an Enterprise feature. |
A hidden record never uses up one of the k places. The caller gets k results they may see, not k minus the hidden ones.
10In Enterprise
Two AI features are in the commercial editions. This is what they do.
A memory store for AI agents. The store, not the caller, decides what is currently true. Facts are append-only: a new value for the same subject and predicate supersedes the old one, and the history is a separate call. It survives a restart.
Translation from a question to a query, grounded in your vocabulary, and four agents: Query, Anomaly, Schema and Threat.
11Source and editions
The indexes are source-available as a library. The routes that serve search are part of the closed full server. This table says which is which.
| Part | Source | Community edition source server | Community tier (free binary) | Enterprise |
|---|---|---|---|---|
| In the source-available index library | ||||
| HNSW vector index | Source-available | Library only. Not served. | ||
| Inverted index with BM25 | Source-available | Library only. Not served. | ||
| Rank fusion for hybrid search | Source-available | Library only. Not served. | ||
| Stemmers, phrase search, boolean search | Source-available | Library only. Not served. | Not used by the server | Not used by the server |
| Only in the full server | ||||
| Search routes: vector, text and hybrid | Closed | |||
| GraphRAG retrieval: chunking and embedding | Closed | |||
| Retrieval procedures over Bolt | Closed | |||
| Built-in embedder, and your own model | Closed | |||
| Permission checks on results | Closed | Roles | Roles, tenants and row rules | |
| Agent memory, natural-language queries, AI agents | Closed | |||
The Community edition source is planned and not published yet. The free Community tier is a binary download today.
12Limits
13Questions
Yes. Tessera DB has vector search, full-text search, hybrid search and GraphRAG retrieval inside the database: document chunking, embedding and retrieval. A query can retrieve by vector or by keyword and then follow graph links from the hits, in one statement. All of this runs in the free Community tier. The built-in embedder matches spelling rather than meaning, so connect your own embedding model for semantic retrieval.
Tessera DB has an HNSW vector index over the same records that the graph, the SQL tables and the full-text index read. So a vector hit is also a graph node and a table row, with no copy to keep in sync. The vector index was measured at up to 100,000 vectors of 128 dimensions. It was not measured at a million vectors, and a pure vector search takes no metadata filter. Hybrid search does take an equality filter.
In a committed test, the median HNSW search took 0.156 ms at 1,000 vectors, 0.244 ms at 10,000 and 0.341 ms at 100,000. The parameters were 128 dimensions, k = 10, M = 16, ef_construction 100, ef_search 50 and L2 distance, on one thread of an Apple Silicon laptop with an in-memory index, on 1 September 2026. The figures hold at those parameters only, and no recall figure was computed.
No. The built-in embedder is lexical. It matches spelling: it scores "database" and "databases" at 0.95, and "car" and "automobile" at 0.00. It is off by default. For semantic search, point the server at your own embedding model. The server speaks the OpenAI request and response shape only.
Yes. Every search result passes the tenant, branch, as-of and row-rule checks before it is returned. A record the caller may not see is removed before the list is cut to k results, so a hidden record never takes a place in the answer. Row-level security rules themselves are an Enterprise feature.
The index library is. The Community edition source holds the HNSW vector index, the BM25 inverted index and rank fusion as library code. The small server in that source layer does not serve vector or full-text search. The search routes run in the free Community tier, whose source is closed.
The free Community tier runs one node with vector search, full-text search, hybrid ranking and GraphRAG retrieval. Tell us what you are building and we send the kit and a licence key.