qdrant / go-client

Go client for Qdrant vector search engine
Apache License 2.0
161 stars 15 forks source link

Update client for v1.12 #58

Closed coszio closed 1 month ago

coszio commented 1 month ago

Updates the client with the latest proto definitions, by following the contributing guide. Everything went smoothly 🏄

coszio commented 1 month ago

Example usage of the new endpoints:

SearchMatrixOffsets

import (
    "context"

    "github.com/qdrant/go-client/qdrant"
)

client, err := qdrant.NewClient(&qdrant.Config{
    Host: "localhost",
    Port: 6334,
})

sample := uint64(10)
limit := uint64(10)
res, err := client.SearchMatrixOffsets(context.Background(), &qdrant.SearchMatrixPoints{
    CollectionName: "{collection_name}",
    Sample:         &sample,
    Limit:          &limit,
})

SearchMatrixPairs

import (
    "context"

    "github.com/qdrant/go-client/qdrant"
)

client, err := qdrant.NewClient(&qdrant.Config{
    Host: "localhost",
    Port: 6334,
})

sample := uint64(10)
limit := uint64(10)
res, err := client.SearchMatrixPairs(context.Background(), &qdrant.SearchMatrixPoints{
    CollectionName: "{collection_name}",
    Sample:         &sample,
    Limit:          &limit,
})

Facet

import (
    "context"

    "github.com/qdrant/go-client/qdrant"
)

client, err := qdrant.NewClient(&qdrant.Config{
    Host: "localhost",
    Port: 6334,
})

res, err := client.Facet(context.Background(), &qdrant.FacetCounts{
    CollectionName: "{collection_name}",
    Key:            "key",
})
generall commented 1 month ago

don't seem to be used in facet

sample := uint64(10)
limit := uint64(10)
coszio commented 1 month ago

Sorry, too much copy paste