Add worked with_lookup example

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dylan Couzon
2026-05-19 19:08:36 -04:00
co-authored by Claude Opus 4.7
parent 2b97750ade
commit a6104d7b7a
42 changed files with 960 additions and 37 deletions
@@ -0,0 +1,54 @@
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.Upsert(context.Background(), &qdrant.UpsertPoints{
CollectionName: "documents",
Points: []*qdrant.PointStruct{
{
Id: qdrant.NewIDNum(1),
Vectors: qdrant.NewVectorsMap(map[string]*qdrant.Vector{}),
Payload: qdrant.NewValueMap(map[string]any{
"title": "Document A",
"text": "This is document A",
}),
},
{
Id: qdrant.NewIDNum(2),
Vectors: qdrant.NewVectorsMap(map[string]*qdrant.Vector{}),
Payload: qdrant.NewValueMap(map[string]any{
"title": "Document B",
"text": "This is document B",
}),
},
},
})
client.Upsert(context.Background(), &qdrant.UpsertPoints{
CollectionName: "chunks",
Points: []*qdrant.PointStruct{
{
Id: qdrant.NewIDNum(0),
Vectors: qdrant.NewVectors(0.1, 0.2, 0.3, 0.4),
Payload: qdrant.NewValueMap(map[string]any{"document_id": 1}),
},
{
Id: qdrant.NewIDNum(1),
Vectors: qdrant.NewVectors(0.5, 0.6, 0.7, 0.8),
Payload: qdrant.NewValueMap(map[string]any{"document_id": 2}),
},
},
})
}