mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-10 21:38:30 +02:00
* Add 'Stable Ordering' section to 'Pagination' section * Add FAQ entry * Small edits to the Pagination section * Apply title case to all headers on page * Small edit
37 lines
750 B
Go
37 lines
750 B
Go
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
|
|
|
|
seenIds := []uint64{83461, 19284, 57392, 44017, 91825} // IDs returned on previous pages
|
|
|
|
pointIds := make([]*qdrant.PointId, len(seenIds))
|
|
for i, id := range seenIds {
|
|
pointIds[i] = qdrant.NewIDNum(id)
|
|
}
|
|
|
|
client.Query(context.Background(), &qdrant.QueryPoints{
|
|
CollectionName: "{collection_name}",
|
|
Query: qdrant.NewQuery(0.2, 0.1, 0.9, 0.7),
|
|
Filter: &qdrant.Filter{
|
|
MustNot: []*qdrant.Condition{
|
|
qdrant.NewHasID(pointIds...),
|
|
},
|
|
},
|
|
Limit: qdrant.PtrOf(uint64(5)),
|
|
})
|
|
}
|