[v1.15.0] MMR docs (#1754)

* add mmr to hybrid queries section

* update to new interface

* proofread

* update for renaming `lambda` into `diversity`

* update for `candidates_limit`

* add formula

* fix rust snippet

* docs: Simplified go.md

* docs: Simplify csharp.md

* docs: Simplified java.md

* output is regular scores

---------

Co-authored-by: Anush <anushshetty90@gmail.com>
This commit is contained in:
Luis Cossío
2025-07-18 13:24:16 +02:00
committed by GitHub
co-authored by Anush
parent ef31a4afe0
commit 33c9c18f9a
9 changed files with 181 additions and 26 deletions
@@ -0,0 +1,17 @@
```rust
use qdrant_client::Qdrant;
use qdrant_client::qdrant::{PrefetchQueryBuilder, Query, QueryPointsBuilder};
let client = Qdrant::from_url("http://localhost:6334").build()?;
client.query(
QueryPointsBuilder::new("{collection_name}")
.query(Query::new_nearest_with_mmr(
vec![0.01, 0.45, 0.67], // search vector
MmrBuilder::new()
.diversity(0.5) // 0.0 - relevance; 1.0 - diversity
.candidates_limit(100) // num of candidates to preselect
))
.limit(10)
).await?;
```