Files
myyrakleandmyyrakle 0316544a1a Replace memmap_threshold with indexing_threshold (#2041)
* Replace memmap_threshold with indexing_threshold

* Update GitHub Stars

* Update GitHub Stars

* Update GitHub Stars

---------

Co-authored-by: myyrakle <16988115+myyrakle@users.noreply.github.com>
2025-12-28 22:38:46 +01:00

30 lines
573 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.CreateCollection(context.Background(), &qdrant.CreateCollection{
CollectionName: "{collection_name}",
VectorsConfig: qdrant.NewVectorsConfig(&qdrant.VectorParams{
Size: 768,
Distance: qdrant.Distance_Cosine,
}),
OptimizersConfig: &qdrant.OptimizersConfigDiff{
IndexingThreshold: qdrant.PtrOf(uint64(20000)),
},
})
}