mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-05 02:48:30 +02:00
Replaces the older `FusionQuery(fusion=Fusion.RRF)` enum form with
`RrfQuery(rrf=Rrf())` across all language tabs (Python, TypeScript,
Rust, Go, Java, C#) plus the REST body in `http.md`, for both the
`hybrid-rrf/` snippet and the inner RRF prefetch inside
`hybrid-formula-decay/`. The newer dedicated `Rrf` message is the
recommended path going forward; the old enum stays supported for
backward compatibility. Server-side both forms converge to the same
`FusionInternal::Rrf { k: 2, weights: None }`, verified against the
qdrant/qdrant source.
`generated/*.md` files in both directories regenerated via
`./docker.sh ./generate-md.py`. `./docker.sh ./check.py build` passes
across all six SDKs.
Also softens the DBSF prose in hybrid-queries.md to drop the
"weighted RRF tends to win" framing. Neither method dominates the
other in general.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
32 lines
636 B
Go
32 lines
636 B
Go
package snippet
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/qdrant/go-client/qdrant"
|
|
)
|
|
|
|
func Main() {
|
|
client, err := qdrant.NewClient(&qdrant.Config{
|
|
Host: "localhost",
|
|
Port: 6334,
|
|
})
|
|
|
|
if err != nil { panic(err) } // @hide
|
|
|
|
client.Query(context.Background(), &qdrant.QueryPoints{
|
|
CollectionName: "{collection_name}",
|
|
Prefetch: []*qdrant.PrefetchQuery{
|
|
{
|
|
Query: qdrant.NewQuerySparse([]uint32{1, 42}, []float32{0.22, 0.8}),
|
|
Using: qdrant.PtrOf("sparse"),
|
|
},
|
|
{
|
|
Query: qdrant.NewQueryDense([]float32{0.01, 0.45, 0.67}),
|
|
Using: qdrant.PtrOf("dense"),
|
|
},
|
|
},
|
|
Query: qdrant.NewQueryRRF(&qdrant.Rrf{}),
|
|
})
|
|
}
|