Create code snippets for distributed deployment.

This commit is contained in:
István Zoltán Szabó
2026-07-20 17:06:30 +02:00
parent 780e323e79
commit 5b61a30535
72 changed files with 1359 additions and 703 deletions
@@ -0,0 +1,27 @@
package snippet
import (
"context"
"github.com/qdrant/go-client/qdrant"
)
func Main() {
// @hide-start
client, err := qdrant.NewClient(&qdrant.Config{
Host: "localhost",
Port: 6334,
})
if err != nil { panic(err) }
// @hide-end
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
CollectionName: "{collection_name}",
VectorsConfig: qdrant.NewVectorsConfig(&qdrant.VectorParams{
Size: 300,
Distance: qdrant.Distance_Cosine,
}),
ShardNumber: qdrant.PtrOf(uint32(6)),
})
}