Files
Abdon Pijpelink cf4119fa3f Add subsection about stable ordering to pagination section (#2463)
* 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
2026-06-30 13:07:43 +02:00

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)),
})
}