feat(ts-oss): add Qdrant server-side BM25 keywordSearch() + filter indexes (#5851)

Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
This commit is contained in:
Sudhanva Bharadwaj BM
2026-07-30 15:34:00 +05:30
committed by GitHub
co-authored by kartik-mem0
parent bcca72e3f0
commit 74f6dc6f0d
3 changed files with 739 additions and 18 deletions
+6
View File
@@ -60,6 +60,12 @@ await memory.add(messages, { userId: "alice", metadata: { category: "movies" } }
```
</CodeGroup>
### Hybrid keyword search
Mem0 blends semantic similarity with BM25 keyword scoring. On the TypeScript SDK, Qdrant computes the BM25 vectors server-side, which requires Qdrant 1.15.2 or newer with inference enabled. Qdrant Cloud enables inference by default only for clusters created after 2025-07-07; older clusters must activate it from the Cluster Detail page. The Python SDK encodes BM25 locally instead and needs the `fastembed` package, so scores are not numerically comparable between the two SDKs.
When BM25 is unavailable, or when the collection was created before hybrid search was added, Mem0 logs a warning and falls back to semantic-only search. Writes are unaffected. To enable keyword scoring on an older collection, use a fresh collection name.
### Config
Let's see the available parameters for the `qdrant` config: