mem0ai/mem0 · error · Error
Databricks HYBRID search requires query_text, but search() o
Error message
Databricks HYBRID search requires query_text, but search() only receives query vectors.
What it means
HYBRID (vector + full-text) search on Databricks needs the raw query text, but the VectorStore.search() interface only receives an embedding vector. The store detects queryType 'HYBRID' inside search() and throws rather than silently returning vector-only results.
Source
Thrown at mem0-ts/src/oss/src/vector_stores/databricks.ts:593
await this.executeSql(`
INSERT INTO ${this.fullTableName}
(memory_id, embedding, payload, text_lemmatized, user_id, agent_id, run_id)
VALUES ${values.join(", ")}
`);
this.requestIndexSync();
}
async search(
query: number[],
topK: number = 5,
filters?: SearchFilters,
): Promise<VectorStoreResult[]> {
await this.initialize();
this.assertVectorDimension(query, "Query");
if (this.queryType === "HYBRID") {
throw new Error(
"Databricks HYBRID search requires query_text, but search() only receives query vectors.",
);
}
const requestFilters = buildDatabricksServerFilters(
this.endpointType,
filters,
);
return this.queryIndex(
{
columns: ["memory_id", "payload"],
query_type: this.queryType,
query_vector: query,
...requestFilters,
},
filters,
topK,View on GitHub (pinned to 001c235229)
Solutions
- Set queryType: 'VECTOR' (default) for the OSS Memory flow
- If hybrid search is required, call the Databricks Vector Search REST API directly with query_text, bypassing this store's search()
Example fix
// before
new Databricks({ queryType: 'HYBRID', ... });
await memory.search('hello');
// after
new Databricks({ queryType: 'VECTOR', ... });
await memory.search('hello'); Defensive patterns
Strategy: validation
Validate before calling
if (cfg.queryType && cfg.queryType !== 'VECTOR') {
throw new Error(`queryType ${cfg.queryType} is not usable via Memory.search(); use VECTOR`);
} Prevention
- Keep queryType 'VECTOR' in OSS Memory pipelines
- Call the Databricks Vector Search REST API directly when hybrid search is needed
When it happens
Trigger: Configuring the Databricks store with queryType: 'HYBRID' and then calling memory.search(query) — Memory embeds the query and calls store.search(vector), which hits this guard.
Common situations: Enabling HYBRID expecting better recall without realizing the OSS Memory pipeline never passes the text down to the vector store; copying config from a Databricks example that used the REST API directly.
Related errors
- Databricks vector store requires either workspaceUrl or host
- Extra fields not allowed: {', '.join(extra_fields)}. Please
- Either access_token or both client_id/client_secret or azure
- Unsupported vector store provider: ${provider}
- Baidu vector store requires a non-empty '${name}' config val
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/09fc1778f2c7fb5c.
Report an issue: GitHub.