Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-client

> 编程语言
Open source

Go client for Qdrant vector search engine

344 stars0 likes1 views
WebsiteGitHub

About

Go client for Qdrant vector search engine

Go client for the Qdrant vector search engine.

Go client library with handy utilities for interfacing with Qdrant.

Installation

bash
go get -u github.com/qdrant/go-client

Documentation

  • Usage examples are available throughout the Qdrant documentation and API Reference.
  • Godoc Reference

Getting started

Creating a client

A client can be instantiated with

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

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

Which creates a client that will connect to Qdrant on .

Internally, the high-level client uses a low-level gRPC client to interact with Qdrant. qdrant.Config provides additional options to control how the gRPC client is configured. The following example configures API key authentication with TLS:

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

client, err := qdrant.NewClient(&qdrant.Config{
	Host:   "xyz-example.eu-central.aws.cloud.qdrant.io",
	Port:   6334,
	APIKey: "",
	UseTLS: true,  // uses default config with minimum TLS version set to 1.3
	// PoolSize: 3,
	// KeepAliveTime: 10,
	// KeepAliveTimeout: 2,
	// TLSConfig: &tls.Config{...},
	// GrpcOptions: []grpc.DialOption{},
})

Working with collections

Once a client has been created, create a new collection

go
import (
	"context"

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

client.CreateCollection(context.Background(), &qdrant.CreateCollection{
	CollectionName: "{collection_name}",
	VectorsConfig: qdrant.NewVectorsConfig(&qdrant.VectorParams{
		Size:     4,
		Distance: qdrant.Distance_Cosine,
	}),
})

Insert vectors into the collection

…

Search for similar vectors

go
searchResult, err := client.Query(context.Background(), &qdrant.QueryPoints{
	CollectionName: "{collection_name}",
	Query:          qdrant.NewQuery(0.2, 0.1, 0.9, 0.7),
})

Search for similar vectors with a filtering condition

go
searchResult, err := client.Query(context.Background(), &qdrant.QueryPoints{
	CollectionName: "{collection_name}",
	Query:          qdrant.NewQuery(0.2, 0.1, 0.9, 0.7),
	Filter: &qdrant.Filter{
		Must: []*qdrant.Condition{
			qdrant.NewMatch("city", "London"),
		},
	},
	WithPayload: qdrant.NewWithPayload(true),
})

⚖️ LICENSE

Apache 2.0

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Go

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言