{"record":{"id":"09fc1778f2c7fb5c","repo":"mem0ai/mem0","slug":"databricks-hybrid-search-requires-query-text-but","errorCode":null,"errorMessage":"Databricks HYBRID search requires query_text, but search() only receives query vectors.","messagePattern":"Databricks HYBRID search requires query_text, but search\\(\\) only receives query vectors\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/databricks.ts","lineNumber":593,"sourceCode":"\n    await this.executeSql(`\n      INSERT INTO ${this.fullTableName}\n        (memory_id, embedding, payload, text_lemmatized, user_id, agent_id, run_id)\n      VALUES ${values.join(\", \")}\n    `);\n    this.requestIndexSync();\n  }\n\n  async search(\n    query: number[],\n    topK: number = 5,\n    filters?: SearchFilters,\n  ): Promise<VectorStoreResult[]> {\n    await this.initialize();\n    this.assertVectorDimension(query, \"Query\");\n\n    if (this.queryType === \"HYBRID\") {\n      throw new Error(\n        \"Databricks HYBRID search requires query_text, but search() only receives query vectors.\",\n      );\n    }\n\n    const requestFilters = buildDatabricksServerFilters(\n      this.endpointType,\n      filters,\n    );\n\n    return this.queryIndex(\n      {\n        columns: [\"memory_id\", \"payload\"],\n        query_type: this.queryType,\n        query_vector: query,\n        ...requestFilters,\n      },\n      filters,\n      topK,","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/databricks.ts#L575-L611","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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()"],"exampleFix":"// before\nnew Databricks({ queryType: 'HYBRID', ... });\nawait memory.search('hello');\n\n// after\nnew Databricks({ queryType: 'VECTOR', ... });\nawait memory.search('hello');","handlingStrategy":"validation","validationCode":"if (cfg.queryType && cfg.queryType !== 'VECTOR') {\n  throw new Error(`queryType ${cfg.queryType} is not usable via Memory.search(); use VECTOR`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep queryType 'VECTOR' in OSS Memory pipelines","Call the Databricks Vector Search REST API directly when hybrid search is needed"],"tags":["databricks","hybrid-search","configuration","vector-store"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}