mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 19:38:30 +02:00
* 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>
546 B
546 B
import (
"context"
"github.com/qdrant/go-client/qdrant"
)
client, err := qdrant.NewClient(&qdrant.Config{
Host: "localhost",
Port: 6334,
})
client.Query(context.Background(), &qdrant.QueryPoints{
CollectionName: "{collection_name}",
Query: qdrant.NewQueryMMR(
qdrant.NewVectorInput(0.01, 0.45, 0.67),
&qdrant.Mmr{
Diversity: qdrant.PtrOf(float32(0.5)), // 0.0 - relevance; 1.0 - diversity
CandidatesLimit: qdrant.PtrOf(uint32(100)), // num of candidates to preselect
}),
Limit: qdrant.PtrOf(uint64(10)),
})