You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you run `INSERT`, the `text` field is automatically converted into a dense vector using [Fastembed](https://github.com/qdrant/fastembed). In **hybrid mode** (`USING HYBRID`), a sparse BM25 vector is also generated alongside the dense vector, and searches use Qdrant's Reciprocal Rank Fusion (RRF) to merge the results of both retrieval methods.
51
+
When you run `INSERT`, the `text` field is automatically converted into a dense vector using [Fastembed](https://github.com/qdrant/fastembed). In **hybrid mode** (`USING HYBRID`), a sparse BM25 vector is also generated alongside the dense vector, and searches use Qdrant's Reciprocal Rank Fusion (RRF) by default to merge the results of both retrieval methods. You can switch hybrid search to DBSF with `FUSION 'dbsf'`.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Your query string
24
24
Qdrant instance
25
25
```
26
26
27
-
When you run `INSERT`, the `text` field is automatically converted into a dense vector using [Fastembed](https://github.com/qdrant/fastembed). In **hybrid mode** (`USING HYBRID`), a sparse BM25 vector is also generated alongside the dense vector, and searches use Qdrant's Reciprocal Rank Fusion (RRF) to merge the results of both retrieval methods.
27
+
When you run `INSERT`, the `text` field is automatically converted into a dense vector using [Fastembed](https://github.com/qdrant/fastembed). In **hybrid mode** (`USING HYBRID`), a sparse BM25 vector is also generated alongside the dense vector, and searches use Qdrant's Reciprocal Rank Fusion (RRF) by default to merge the results of both retrieval methods. You can override that with `FUSION 'dbsf'` on hybrid searches.
Copy file name to clipboardExpand all lines: docs/search.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n>
14
14
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> USING MODEL '<model_name>'
15
15
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> [USING MODEL '<model>'] WHERE <filter>
16
16
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> USING HYBRID
17
-
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> USING HYBRID [DENSE MODEL '<model>'] [SPARSE MODEL '<model>'] [WHERE <filter>]
17
+
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> USING HYBRID [FUSION 'rrf|dbsf'] [DENSE MODEL '<model>'] [SPARSE MODEL '<model>'] [WHERE <filter>]
18
18
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> USING SPARSE [MODEL '<sparse_model>']
19
19
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> EXACT
20
20
SEARCH <collection_name> SIMILAR TO '<query_text>' LIMIT <n> [USING ...] [WHERE <filter>] [RERANK] WITH { hnsw_ef: <n>, exact: true|false, acorn: true|false }
@@ -33,7 +33,7 @@ Search only papers published after 2020:
33
33
SEARCH articles SIMILAR TO 'deep learning'LIMIT10WHERE year >2020
Hybrid search (combines dense semantic + sparse BM25 keyword retrieval via RRF by default):
37
37
```sql
38
38
SEARCH articles SIMILAR TO 'attention mechanism'LIMIT10 USING HYBRID
39
39
```
@@ -126,13 +126,13 @@ SCROLL FROM articles AFTER 'cursor-id' LIMIT 50
126
126
127
127
## Hybrid Search (USING HYBRID)
128
128
129
-
Hybrid search combines **dense semantic vectors** and **sparse BM25 keyword vectors** in a single query and merges the results with Qdrant's **Reciprocal Rank Fusion (RRF)** algorithm. This typically outperforms either method alone.
129
+
Hybrid search combines **dense semantic vectors** and **sparse BM25 keyword vectors** in a single query. By default QQL merges the two result sets with Qdrant's **Reciprocal Rank Fusion (RRF)** algorithm, and you can optionally switch to **DBSF** with a `FUSION` clause.
130
130
131
131
### How it works internally
132
132
133
133
1. Both a dense vector (`TextEmbedding`) and a sparse BM25 vector (`SparseTextEmbedding`) are generated from your query text.
134
134
2. Qdrant fetches the top candidates from each index independently (`prefetch limit = LIMIT × 4`).
135
-
3. The two result lists are merged using RRF — a rank-based fusion that does not require score normalization.
135
+
3. The two result lists are merged using the selected fusion strategy (`RRF` by default, or `DBSF` when requested).
136
136
4. The final top-N results are returned.
137
137
138
138
### Step 1: Create a hybrid collection
@@ -165,6 +165,9 @@ SEARCH articles SIMILAR TO 'transformer architecture' LIMIT 10 USING HYBRID
165
165
-- Hybrid search with a WHERE filter
166
166
SEARCH articles SIMILAR TO 'attention'LIMIT10 USING HYBRID WHERE year >=2017
167
167
168
+
-- Hybrid with DBSF fusion
169
+
SEARCH articles SIMILAR TO 'hybrid retrieval'LIMIT10 USING HYBRID FUSION 'dbsf'
170
+
168
171
-- Hybrid with custom dense model
169
172
SEARCH articles SIMILAR TO 'embeddings'LIMIT5
170
173
USING HYBRID DENSE MODEL 'BAAI/bge-base-en-v1.5'
@@ -180,6 +183,7 @@ SEARCH articles SIMILAR TO 'sparse retrieval' LIMIT 5
180
183
|---|---|
181
184
| Dense model | configured default (`sentence-transformers/all-MiniLM-L6-v2`) |
0 commit comments