Getting Started with Hybrid Semantic / Full-Text Search with Milvus 2.5
Dec 17, 2024Stefan Webb

Summary
This post details the implementation of full-text search in Milvus 2.5 by introducing the `Function` object and `FunctionType.BM25`. It demonstrates how to define a schema with a VARCHAR field enabled for analysis and a SPARSE_FLOAT_VECTOR field to store BM25 embeddings. The post shows how to add a `Function` to the schema to automatically generate sparse vectors from text, configure a `SPARSE_INVERTED_INDEX` with `BM25` metric type, and perform full-text searches. It also illustrates how to combine this with dense vector search using `hybrid_search` and `RRFRanker` for improved recall.
More from the Multilingual Full-Text Search trail
- How to Fix Hermes Agent's Learning Loop with Milvus 2.6 Hybrid Search
- Phrase Match with Slop in Milvus 2.6: How to Improve Phrase-Level Full-Text Search Accuracy
- Tokenize Smarter, Retrieve Better: A Deep Dive into Milvus Analyzer for Full-Text Search
- How Milvus 2.6 Upgrades Multilingual Full-Text Search at Scale
- Full-Text Search in Milvus - What's Under the Hood