When you passed query_texts to Chroma, it embedded the text with the collection's embedding function. That was all-MiniLM-L6-v2 by default, or Chroma Cloud's hosted Qwen if you chose it.
Your stored vectors move as they are. After the move, either embed queries yourself with the same model, or let the new database embed both documents and queries.
Which model did your collection use?
Check before you export. Each collection records its embedding function:
for col in client.list_collections():
print(col.name, col.configuration.get("embedding_function"))
| What you see | What made your vectors |
|---|---|
default | all-MiniLM-L6-v2, 384 dimensions, run in your client |
| A named provider (OpenAI, Cohere...) | That provider's model |
| Chroma Cloud Qwen | Chroma's hosted Qwen embedding model |
| Chroma Cloud SPLADE | Sparse vectors for keyword search, not dense |
none | You embedded everything yourself, so nothing changes |
Option 1: Embed queries yourself
Keep the same model and call it before each query. For the default model:
from sentence_transformers import SentenceTransformer
from topk_sdk.query import select, field, fn
model = SentenceTransformer("all-MiniLM-L6-v2")
q = model.encode("how do refunds work").tolist()
results = client.collection("docs").query(
select("document", score=fn.vector_distance("embedding", q))
.sort(field("score"), asc=False) # cosine: higher is closer
.limit(10)
)
This keeps results closest to what Chroma returned, which makes validation easy. Sort direction depends on the metric: ascending for euclidean, descending for cosine and dot_product.
Option 2: Let the database embed for you
In TopK, add a semantic index to the document field and query with plain text:
results = client.collection("docs").query(
select("document", score=fn.semantic_similarity("document", "how do refunds work"))
.sort(field("score"), asc=False)
.limit(10)
)
There's no model to host and no embedding pipeline. Results will differ from Chroma's because the model changes, so treat it as an embedding upgrade and check quality on real queries.
What about Chroma Cloud's hosted SPLADE?
SPLADE gave you sparse keyword-style matching. Instead of moving sparse vectors, use a keyword index for BM25 on the document text. Better yet, combine keyword and vector scores in one query with true hybrid search rather than Chroma's separate rankings merged afterwards.
Next steps
Map your filters next, then check results match. The TopK migration guide covers each step, and the Chroma to TopK page shows what else changes. Moving from Chroma Cloud? Book a migration call.