mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 12:58:31 +02:00
[v1.16] Collection metadata docs (#1986)
* wip: initial docs * docs: Go snippets Signed-off-by: Anush008 <anushshetty90@gmail.com> * docs: Java snippets Signed-off-by: Anush008 <anushshetty90@gmail.com> * docs: Removed TODO! Signed-off-by: Anush008 <anushshetty90@gmail.com> * docs: C# snippets Signed-off-by: Anush008 <anushshetty90@gmail.com> * move collection metadata section into collection info * fix code fence mismatch in markdown * Remove empty line --------- Signed-off-by: Anush008 <anushshetty90@gmail.com> Co-authored-by: Anush008 <anushshetty90@gmail.com> Co-authored-by: trean <trean.mi@gmail.com> Co-authored-by: Tim Visée <tim@visee.me>
This commit is contained in:
co-authored by
Anush008
trean
Tim Visée
parent
be24d900ef
commit
5ed4822559
+24
@@ -0,0 +1,24 @@
|
||||
```go
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "localhost",
|
||||
Port: 6334,
|
||||
})
|
||||
|
||||
client.CreateCollection(context.Background(), &qdrant.CreateCollection{
|
||||
CollectionName: "{collection_name}",
|
||||
VectorsConfig: qdrant.NewVectorsConfig(&qdrant.VectorParams{
|
||||
Size: 100,
|
||||
Distance: qdrant.Distance_Cosine,
|
||||
}),
|
||||
Metadata: qdrant.NewValueMap(map[string]any{
|
||||
"my-metadata-field": "value-1",
|
||||
"another-field": 123,
|
||||
}),
|
||||
})
|
||||
```
|
||||
Reference in New Issue
Block a user