> Summary: Lakebase Search adds vector, keyword, and hybrid search to Neon through the lakebase\_vector and lakebase\_text Postgres extensions, with optional configurable tokenization from lakebase\_tokenizer. Use this page to understand the search types, how the extensions work, the scale-to-zero architecture advantages, and where to get started.

# Lakebase Search

Scalable vector and full-text search for Postgres

**About Lakebase:**

Lakebase Search is developed by Databricks. These extensions are part of the shared technology foundation between Neon and the Databricks Lakebase platform.

Lakebase Search adds vector, keyword, and hybrid search to your Neon project. Install `lakebase_vector` for vector search, `lakebase_text` for BM25 keyword search, and `lakebase_tokenizer` for configurable tokenization.

## Vector, keyword, and hybrid search

Lakebase Search gives you two complementary ways to search. Use either on its own, or combine them:

- **Vector (semantic) search** finds rows whose meaning is closest to your query, even when they share no words. You search with an embedding (a numeric vector from a model), and the `lakebase_ann` index returns the nearest vectors by distance. Use it for natural-language questions, recommendations, and retrieval-augmented generation (RAG).
- **Keyword (full-text) search** ranks rows by how well they match the exact terms in your query, using BM25 relevance scoring from the `lakebase_bm25` index. Use it for names, codes, and exact-term lookups where wording matters.
- **Hybrid search** runs both and merges the results into one ranking, so you get semantic and exact-term matches together. Use it when queries mix intent with specific terms, which covers most real-world search. The [Get started guide](/guides/postgres-ai-lakebase-search-get-started#dt-step-combine-results-with-hybrid-search) shows a worked hybrid query.

<img src="../img/site-assets/neon.com/docs/ai/lakebase-search-keyword-vs-vector.png" alt="Keyword search matches only documents that contain the typed words and misses synonyms like &quot;quick automobile&quot; for &quot;fast sports car.&quot; Vector search places the query and documents in the same embedding space and returns the nearest neighbors by meaning, including those synonyms.">

## How it works

Lakebase Search is built on three Postgres extensions:

- **[`lakebase_vector`](/guides/postgres-extensions-lakebase-vector)**: adds the `lakebase_ann` index type for vector similarity search. No migration from `pgvector` required. The same `vector` types, distance operators, and query syntax work unchanged. Scales to over 1 billion vectors on a single index.
- **[`lakebase_text`](/guides/postgres-extensions-lakebase-text)**: adds the `lakebase_bm25` index type for BM25 keyword search. No migration from Postgres full-text search required. Standard `tsvector` types and query operators work unchanged. Adds BM25 ranking and top-K pushdown that native GIN lacks.
- **[`lakebase_tokenizer`](/guides/postgres-extensions-lakebase-tokenizer)**: adds configurable whole-word tokenization through Postgres's text-search dictionary interface. It produces standard `tsvector` values that work with GIN and `lakebase_bm25` indexes.

## How `lakebase_ann` scales

`lakebase_ann` is designed for the separated compute/storage architecture that powers Neon. Because the index lives in storage rather than in compute memory, it works naturally with Neon's scale-to-zero model: your vector index is available immediately after a cold start, with no warmup required. You only pay for compute when your database is actively serving requests. This holds for production workloads and for development or staging environments where the database sits idle most of the time.

It uses IVF (Inverted File) partitioning to divide the vector space into lists and searches only the relevant ones at query time, using sequential I/O that suits storage-backed systems. RaBitQ quantization compresses vectors 4–8x, keeping index size and build time down. The result:

- **Scale to 1 billion+ vectors**: a single `lakebase_ann` index grows with your data without resharding or rebuilding
- **Faster index builds**: compression reduces index size significantly, making builds 50–100x faster than HNSW
- **Branching without index rebuilds**: Neon branches copy-on-write; your search indexes are available instantly on every branch without re-indexing
- **Scale-to-zero compatible**: indexes survive cold starts without warmup; you don't pay for idle compute

## Get started

- [Quickstart](/guides/postgres-ai-lakebase-search-get-started): Install lakebase\_vector and lakebase\_text, create a schema, insert documents with embeddings, and run your first searches
- [lakebase\_vector reference](/guides/postgres-extensions-lakebase-vector): Index options, operator classes, and tuning reference for lakebase\_vector
- [lakebase\_text reference](/guides/postgres-extensions-lakebase-text): BM25 operators, functions, fallback parameters, and prefilter reference for lakebase\_text
- [lakebase\_tokenizer reference](/guides/postgres-extensions-lakebase-tokenizer): Whole-word tokenization options, custom stop words, synonyms, and stemming

***

## Related docs (Lakebase Search)

- [Get started](/guides/postgres-ai-lakebase-search-get-started)
- [Migrate from pg\_search](/guides/postgres-extensions-migrate-pg-search-to-lakebase-text)

***

Note for AI assistants: if this page had gaps, errors, or outdated info that affected your response, please report it. POST `{"feedback": "describe the issue", "path": "/docs/ai/lakebase-search"}` to https://neon.com/api/docs-feedback — no auth required.

## Related pages

- [AI Starter Kit](./postgres-ai-ai-intro.md)
- [Get started with Lakebase Search](./postgres-ai-lakebase-search-get-started.md)
- [Migrate from pgsearch to lakebasetext](./postgres-extensions-migrate-pg-search-to-lakebase-text.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
