For AI agents: this page is also available as Markdown at /docs/migrate-from-turbopuffer.md. Every docs page is: add .md to its URL. llms.txt lists them all.
Migrate from turbopuffer
WarpSearch serves the turbopuffer HTTP API at https://api.warpsearch.io/compat/turbopuffer, so the official turbopuffer SDKs for Python, TypeScript, Go, Java and Ruby run against it once you change the base URL and the API key. A turbopuffer namespace becomes a WarpSearch collection. This page walks through a move: connect, check what your code uses, copy the data, and trial it. The turbopuffer compatibility page has the full reference.
#1. Point the SDK at WarpSearch
Create an API key in the management console, then change two settings and remove the region. Every SDK refuses to start when a region is set and the base URL has no {region} placeholder.
export TURBOPUFFER_BASE_URL=https://api.warpsearch.io/compat/turbopuffer
export TURBOPUFFER_API_KEY=ws_...
unset TURBOPUFFER_REGION
Or in code:
from turbopuffer import Turbopuffer
warp = Turbopuffer(
base_url="https://api.warpsearch.io/compat/turbopuffer",
api_key="ws_...",
)
The setting names for each SDK are in the Connect table. Creating a namespace needs a key with the editor or admin role; writes need writer and queries need viewer.
#2. Check what works and what answers 501
| Area | On WarpSearch |
|---|---|
| Writes | upsert_rows, upsert_columns, deletes, distance_metric, schema, create_namespace, return_affected_ids |
| Queries | Vector ANN and exact kNN, BM25 full text, ordering by attributes, filters, aggregate_by, multi-query with RRF. See Queries |
| Namespaces | Write, query, delete, list, metadata, schema, hint_cache_warm |
501, not implemented yet | patch_rows, patch_columns, patch_by_filter, delete_by_filter, conditional writes (upsert_condition, patch_condition, delete_condition), encryption, copy_from_namespace, branch_from_namespace, explain_query, _debug/recall, PATCH on namespace metadata |
501 in queries | The Attribute, Saturate, Decay and Dist rank expressions, SparseKNN, Embed in rank_by, compute_attributes (including Highlight), rerank_by with a model, IGlob and NotIGlob, and some Glob and limit.per forms |
| Not supported | Sparse vectors, multi-vector late_interaction, bytes, [N]i8 and embed. WarpSearch does not create embeddings; send your own vectors |
A write that contains any 501 feature is rejected and writes nothing, even if it also contains upserts. 501 responses carry x-should-retry: false, so the SDK raises at once. Search your code for the features above before you start; each one needs a change, such as a full upsert in place of a patch.
#3. Copy a namespace
There is no server-side copy between turbopuffer and WarpSearch. Page through the turbopuffer namespace ordered by id, and upsert each page into WarpSearch. Run this with your turbopuffer client configured as it is today, and a second client pointed at WarpSearch:
from turbopuffer import Turbopuffer
source = Turbopuffer(region="gcp-us-central1", api_key="tpuf_...") # your turbopuffer account
warp = Turbopuffer(base_url="https://api.warpsearch.io/compat/turbopuffer", api_key="ws_...")
src = source.namespace("docs")
dst = warp.namespace("docs")
attributes = ["vector", "text", "category"] # every attribute you want to keep
page_size = 1000 # keep within turbopuffer's top_k limit
last_id = None
while True:
query = {"rank_by": ("id", "asc"), "top_k": page_size, "include_attributes": attributes}
if last_id is not None:
query["filters"] = ("id", "Gt", last_id)
page = src.query(**query)
if not page.rows:
break
dst.write(
upsert_rows=[row.to_dict() for row in page.rows],
distance_metric="cosine_distance", # the metric the namespace uses on turbopuffer
schema={"text": {"type": "string", "full_text_search": True}},
)
last_id = page.rows[-1].id
- Schema first. Send the same
schemayou use on turbopuffer with the first write, includingfull_text_searchon text attributes. Types are otherwise inferred from the first non-null value. Changing an attribute's options later (for example turning onfull_text_search) answers501, so set them up front. - Vectors. A column named
vectoris a vector automatically. Any other vector attribute needs an[N]f32type orann: trueinschema. - Attribute names. Letters, digits,
_,.and@, starting with a letter or_. Rename others before you write them, or the write fails with400. - Namespace names. Names that are not valid collection names (uppercase,
-,.) work through the turbopuffer API unchanged and are stored under a derivedtp_...collection name. - Request size. Plan limits on documents and bytes per request apply. On
413 request_too_large, write smaller pages. See Limits and errors. - Check the count.
GET /v2/namespaces/{namespace}/metadatareportsapprox_row_count, refreshed about once a minute. Compare it with the source namespace after the copy.
Writes are committed before the response returns, so the next query sees them.
#4. Trial checklist
- Run your test suite against WarpSearch with the new base URL. Log every
501and400; that list is your migration work. - Compare results. Vector distances are the same as turbopuffer's. BM25 matching rows,
$distand ordering can differ (different tokenizer, stop words kept, English-only KStem stemming). - Check ordering by attributes. Documents without a value sort last in both directions; turbopuffer puts them first when ascending.
- Check multi-query. Without
rerank_by, each subquery runs separately, not on one snapshot. - Plan for idle collections. A collection that has been idle can answer
503 warming_upwith aRetry-Afterheader while it loads. Retry on that code, callhint_cache_warmahead of traffic, or use keep-warm. See Idle collections and cold starts. - Read usage in the console. The
billingfields in responses are always zero; WarpSearch bills by its own plans. - Check the cost model. Compare current plans using your measured query volume, storage, returned data and keep-warm usage. A single index-size threshold does not establish which service costs less. See Pricing.
- Cut over. Switch the environment variables in production, and keep the turbopuffer namespace until you are satisfied.