Qdrant.jl

A high-performance, idiomatic Julia client for the Qdrant vector database with HTTP/REST and gRPC support.

Getting Started

using Qdrant

client = QdrantClient()
create_collection(client, "demo",
    CollectionConfig(vectors=VectorParams(size=4, distance=Cosine)))

upsert_points(client, "demo", [
    Point(id=1, vector=Float32[1, 0, 0, 0], payload=Dict("color" => "red")),
]; wait=true)

resp = query_points(client, "demo"; query=Float32[1, 0, 0, 0], limit=5, with_payload=true)
resp.result.points   # Vector{ScoredPoint}

Every API call returns QdrantResponse{T} with .result, .status, and .time.

API

QdrantModule
Qdrant

A Julian client for the Qdrant vector database.

Supports both HTTP/REST and gRPC transports. Every endpoint returns a QdrantResponse{T} carrying the typed .result, the server .status, and the server-side .time.

Quick Start — HTTP (default)

using Qdrant

client = QdrantClient()
create_collection(client, "demo", CollectionConfig(vectors=VectorParams(size=4, distance=Dot)))
upsert_points(client, "demo", [Point(id=1, vector=Float32[1,0,0,0])])
resp = query_points(client, "demo"; query=Float32[1,0,0,0], limit=5)
resp.result.points   # Vector{ScoredPoint}

Quick Start — gRPC

client = QdrantClient(GRPCTransport(host="localhost", port=6334))
# Same API — transport is selected via dispatch
source
Qdrant.QdrantClientType
QdrantClient{T<:AbstractTransport}

Connection to a Qdrant server. The type parameter T selects the transport, enabling zero-cost dispatch to HTTP or gRPC code paths.

Constructors

QdrantClient()                                        # HTTP localhost:6333
QdrantClient(host="myhost", port=6333, api_key="k")  # HTTP with options
QdrantClient(GRPCTransport(host="h", port=6334))      # gRPC
source
Qdrant.GRPCTransportType
GRPCTransport <: AbstractTransport

gRPC transport using gRPCClient.jl with HTTP/2 and Protocol Buffers. Provides ~2-10x faster throughput than REST for bulk operations.

Fields

  • host: Server hostname (default: "localhost")
  • port: gRPC port (default: 6334)
  • api_key: Optional API key for authentication
  • timeout: Request deadline in seconds (default: 30)
  • tls: Use TLS/gRPCS (default: false)
  • keepalive: TCP keepalive interval in seconds (default: 60)
  • max_message_size: Max message size in bytes (default: 64MB)
source
Qdrant.QdrantResponseType
QdrantResponse{T}

Standard envelope wrapping every API return value.

Fields

  • result::T — the typed payload
  • status::String — server status (e.g. "ok")
  • time::Float64 — server-side processing time in seconds

Examples

resp = upsert_points(client, "demo", points)
resp.result   # UpdateResult(operation_id=0, status="completed")
resp.status   # "ok"
resp.time     # 0.001
source
Qdrant.QdrantErrorType
QdrantError <: Exception

Error from the Qdrant API.

Fields

  • status::Int: HTTP status code (0 for non-HTTP errors)
  • message::String: Human-readable error description
  • detail::Any: Parsed error details from the API response
source
Qdrant.get_clientFunction
get_client() -> QdrantClient

Return the global default connection, creating one if needed.

source

Type Hierarchy

Qdrant.OptionalType
Optional{T}

Alias for Union{Nothing, T}. Used throughout for optional fields.

source
Qdrant.PointIdType
PointId

A unique point identifier — integer or UUID. Qdrant accepts uint64 or uuid format strings.

source

Collections

Qdrant.list_collectionsFunction
list_collections(client) -> QdrantResponse{Vector{CollectionDescription}}

List all collections on the server.

source
Qdrant.create_collectionFunction
create_collection(client, name, config) -> QdrantResponse{Bool}
create_collection(client, name; vectors, kwargs...) -> QdrantResponse{Bool}

Create a new collection.

Examples

create_collection(client, "demo", CollectionConfig(vectors=VectorParams(size=4, distance=Dot)))
create_collection(client, "demo"; vectors=VectorParams(size=4, distance=Dot))
source
Qdrant.get_collectionFunction
get_collection(client, name) -> QdrantResponse{CollectionInfo}

Get detailed collection information.

source
Qdrant.update_collectionFunction
update_collection(client, name, config) -> QdrantResponse{Bool}
update_collection(client, name; kwargs...) -> QdrantResponse{Bool}

Update collection parameters.

source

Aliases

Qdrant.list_aliasesFunction
list_aliases(client) -> QdrantResponse{Vector{AliasDescription}}

List all aliases across collections.

source

Points

Qdrant.upsert_pointsFunction
upsert_points(client, collection, points; wait=true, ordering="weak") -> QdrantResponse{UpdateResult}

Insert or update points.

source
Qdrant.get_pointsFunction
get_points(client, collection, ids; with_vectors=false, with_payload=true) -> QdrantResponse{Vector{Record}}

Retrieve multiple points by IDs.

source
Qdrant.get_pointFunction
get_point(client, collection, id) -> QdrantResponse{Record}

Retrieve a single point by ID (HTTP only — uses GET endpoint).

source
Qdrant.delete_pointsFunction
delete_points(client, collection, selector; wait=true) -> QdrantResponse{UpdateResult}

Delete points by IDs or filter.

source
Qdrant.scroll_pointsFunction
scroll_points(client, collection; filter, limit, offset, with_vectors, with_payload) -> QdrantResponse{ScrollResult}

Scroll through points with optional filtering.

source
Qdrant.count_pointsFunction
count_points(client, collection; filter, exact) -> QdrantResponse{CountResult}

Count points in a collection.

source
Qdrant.batch_pointsFunction
batch_points(client, collection, operations; wait=true) -> QdrantResponse{Vector{UpdateResult}}

Execute multiple point operations in a single batch call.

source
Qdrant.set_payloadFunction
set_payload(client, collection, payload, selector; wait=true) -> QdrantResponse{UpdateResult}

Set payload fields on selected points.

source
Qdrant.overwrite_payloadFunction
overwrite_payload(client, collection, payload, selector; wait=true) -> QdrantResponse{UpdateResult}

Replace the entire payload on selected points (removes unlisted keys).

source
Qdrant.delete_payloadFunction
delete_payload(client, collection, keys, selector; wait=true) -> QdrantResponse{UpdateResult}

Delete payload keys from selected points.

source
Qdrant.clear_payloadFunction
clear_payload(client, collection, selector; wait=true) -> QdrantResponse{UpdateResult}

Remove all payload from selected points.

source
Qdrant.update_vectorsFunction
update_vectors(client, collection, points; wait=true) -> QdrantResponse{UpdateResult}

Update vectors for existing points.

source
Qdrant.delete_vectorsFunction
delete_vectors(client, collection, vector_names, selector; wait=true) -> QdrantResponse{UpdateResult}

Delete named vector fields from selected points.

source

Query

Qdrant.query_pointsFunction
query_points(client, collection, request) -> QdrantResponse{QueryResult}
query_points(client, collection; query, limit, kwargs...) -> QdrantResponse{QueryResult}

Universal query API — replaces the deprecated search/recommend/discover endpoints.

Examples

query_points(client, "demo", QueryRequest(query=Float32[1,0,0,0], limit=5))
query_points(client, "demo"; query=Float32[1,0,0,0], limit=5, with_payload=true)
source
Qdrant.query_batchFunction
query_batch(client, collection, requests) -> QdrantResponse{Vector{QueryResult}}

Execute multiple queries in one call.

source
Qdrant.query_groupsFunction
query_groups(client, collection, request) -> QdrantResponse{GroupsResult}

Query with result grouping.

Examples

query_groups(client, "demo", QueryRequest(
    query=Float32[1,0,0,0], limit=10, group_by="category", group_size=3))
source
Qdrant.search_matrix_pairsFunction
search_matrix_pairs(client, collection; filter, sample, limit) -> QdrantResponse{SearchMatrixPairsResponse}

Compute pairwise distance matrix in pair format.

source
Qdrant.search_matrix_offsetsFunction
search_matrix_offsets(client, collection; filter, sample, limit) -> QdrantResponse{SearchMatrixOffsetsResponse}

Compute pairwise distance matrix in offset format.

source
Qdrant.facetFunction
facet(client, collection, key; filter, limit, exact) -> QdrantResponse{FacetResult}

Get value counts for a payload field (faceted search).

source

Snapshots

Qdrant.recover_from_snapshotFunction
recover_from_snapshot(client, collection; location, priority) -> QdrantResponse{Bool}

Recover a collection from a snapshot URL or local path.

Examples

recover_from_snapshot(client, "demo"; location="http://host/snapshot.tar")
recover_from_snapshot(client, "demo"; location="file:///data/snapshot.tar")
source

Service

Qdrant.get_versionFunction
get_version(client) -> QdrantResponse{HealthInfo}

Get Qdrant server version and title.

source
Qdrant.get_metricsFunction
get_metrics(client) -> QdrantResponse{String}

Retrieve Prometheus-format metrics (plain text response).

source
Qdrant.healthzFunction
healthz(client) -> QdrantResponse{String}

Kubernetes health check endpoint (plain text response).

source
Qdrant.livezFunction
livez(client) -> QdrantResponse{String}

Kubernetes liveness probe (plain text response).

source
Qdrant.readyzFunction
readyz(client) -> QdrantResponse{String}

Kubernetes readiness probe (plain text response).

source
Qdrant.get_issuesFunction
get_issues(client) -> QdrantResponse{Dict{String,Any}}

Get performance issues and configuration suggestions.

source

Cluster & Distributed

Qdrant.cluster_telemetryFunction
cluster_telemetry(client) -> QdrantResponse{Dict{String,Any}}

Get cluster-wide telemetry (peers, collections, shard transfers).

source
Qdrant.remove_peerFunction
remove_peer(client, peer_id; force=false) -> QdrantResponse{Bool}

Remove a peer from the cluster. Fails if peer still has shards.

source
Qdrant.update_collection_clusterFunction
update_collection_cluster(client, collection, operations) -> QdrantResponse{Bool}

Update collection cluster configuration (move/replicate shards).

source

Shard Keys

Qdrant.list_shard_keysFunction
list_shard_keys(client, collection) -> QdrantResponse{ShardKeysResult}

List shard keys for a collection.

source
Qdrant.create_shard_keyFunction
create_shard_key(client, collection, request) -> QdrantResponse{Bool}

Create a shard key for a collection.

source
Qdrant.delete_shard_keyFunction
delete_shard_key(client, collection, request) -> QdrantResponse{Bool}

Delete a shard key from a collection.

source

Shard Snapshots

Qdrant.list_shard_snapshotsFunction
list_shard_snapshots(client, collection, shard_id) -> QdrantResponse{Vector{SnapshotInfo}}

List snapshots for a specific shard.

source
Qdrant.delete_shard_snapshotFunction
delete_shard_snapshot(client, collection, shard_id, snapshot_name) -> QdrantResponse{Bool}

Delete a snapshot for a specific shard.

source

Payload Indexes

Qdrant.create_payload_indexFunction
create_payload_index(client, collection, field_name; field_schema, wait=true) -> QdrantResponse{UpdateResult}

Create an index on a payload field.

source
Qdrant.delete_payload_indexFunction
delete_payload_index(client, collection, field_name; wait=true) -> QdrantResponse{UpdateResult}

Delete an index on a payload field.

source

Types

Qdrant.CollectionConfigType
CollectionConfig <: AbstractConfig

Configuration for creating a collection.

Examples

CollectionConfig(vectors=VectorParams(size=128, distance=Cosine))
CollectionConfig(
    vectors=VectorParams(size=4, distance=Dot),
    hnsw_config=HnswConfig(m=32),
    optimizers_config=OptimizersConfig(indexing_threshold=10000),
)
# Named vectors:
CollectionConfig(vectors=Dict{String,VectorParams}(
    "image" => VectorParams(size=512, distance=Cosine),
    "text" => VectorParams(size=768, distance=Dot),
))
source
Qdrant.CollectionUpdateType
CollectionUpdate <: AbstractConfig

Patch payload for updating collection parameters.

Examples

CollectionUpdate(optimizers_config=OptimizersConfig(indexing_threshold=10000))
CollectionUpdate(params=CollectionParamsDiff(replication_factor=2))
source
Qdrant.VectorParamsType
VectorParams <: AbstractConfig

Configuration for a vector field in a collection.

Examples

VectorParams(size=128, distance=Cosine)
VectorParams(size=4, distance=Dot, on_disk=true)
VectorParams(size=4, distance=Euclid, hnsw_config=HnswConfig(m=32, ef_construct=200))
source
Qdrant.HnswConfigType
HnswConfig <: AbstractConfig

HNSW index configuration parameters.

Fields

  • m: Number of edges per node in the index graph
  • ef_construct: Number of neighbours to consider during index building
  • full_scan_threshold: Size (KB) below which full-scan is preferred
  • max_indexing_threads: Parallel threads for background index building
  • on_disk: Store HNSW index on disk (default: false)
  • payload_m: Custom M param for payload-aware HNSW links
  • inline_storage: Store vector copies within the HNSW index file
source
Qdrant.WalConfigType
WalConfig <: AbstractConfig

Write-Ahead Log configuration.

Fields

  • wal_capacity_mb: Size of a single WAL segment in MB
  • wal_segments_ahead: Number of WAL segments to create ahead
  • wal_retain_closed: Number of closed WAL segments to retain
source
Qdrant.OptimizersConfigType
OptimizersConfig <: AbstractConfig

Segment optimizer configuration.

Fields

  • deleted_threshold: Minimal fraction of deleted vectors to trigger optimization
  • vacuum_min_vector_number: Minimal vectors in a segment for optimization
  • default_segment_number: Target number of segments
  • max_segment_size: Max segment size in KB
  • memmap_threshold: Max in-memory vectors per segment (KB)
  • indexing_threshold: Max vectors for plain index (KB)
  • flush_interval_sec: Minimum interval between forced flushes
  • max_optimization_threads: Max threads for optimizations per shard
  • prevent_unoptimized: Prevent creation of large unoptimized segments
source
Qdrant.SearchParamsType
SearchParams <: AbstractConfig

Parameters controlling the search process.

Fields

  • hnsw_ef: Size of the beam in beam-search (larger = more accurate, slower)
  • exact: If true, search without approximation (exact but slow)
  • quantization: Quantization parameters for search
  • indexed_only: Only search among indexed/small segments
source
Qdrant.TextIndexParamsType
TextIndexParams <: AbstractConfig

Configuration for full-text index on a payload field.

Examples

TextIndexParams(tokenizer="word", lowercase=true)
source
Qdrant.PointType
Point <: AbstractQdrantType

A point with id, vector(s), and optional payload.

Examples

Point(id=1, vector=Float32[0.1, 0.2, 0.3, 0.4])
Point(id=uuid4(), vector=Float32[0.1, 0.2, 0.3, 0.4], payload=Dict("label" => "cat"))
Point(id=1, vector=NamedVector(name="image", vector=Float32[1.0, 0.0, 0.0, 0.0]))
Point(id=1, vector=Dict{String,Vector{Float32}}("image" => Float32[...], "text" => Float32[...]))
source
Qdrant.NamedVectorType
NamedVector <: AbstractQdrantType

A vector with an associated name, for collections with multiple named vectors.

Examples

NamedVector(name="image", vector=Float32[1.0, 0.0, 0.0, 0.0])
source
Qdrant.FilterType
Filter <: AbstractCondition

Compound filter with must, should, must_not clauses.

Examples

Filter(must=[Dict("key" => "color", "match" => Dict("value" => "red"))])
source
Qdrant.QueryRequestType
QueryRequest <: AbstractRequest

Advanced query request (Qdrant universal query API). Replaces the deprecated search_points, recommend_points, and discover_points endpoints.

Examples

# Nearest-neighbor search
QueryRequest(query=Float32[1,0,0,0], limit=5)

# With named vector
QueryRequest(query=Float32[1,0,0,0], limit=10, using_="image", with_payload=true)

# Recommendation via query API
QueryRequest(query=Dict("recommend" => Dict("positive" => [1], "negative" => [3])), limit=5)

# Prefetch + re-rank
QueryRequest(query=Float32[1,0,0,0], limit=5,
    prefetch=[Dict("query" => Float32[1,0,0,0], "limit" => 50)])
source
Qdrant.UpdateResultType
UpdateResponse <: AbstractResponse

Result of a mutating operation (upsert, delete, set_payload, etc.).

Fields

  • operation_id::Int: Server-assigned operation ID
  • status::String: Operation status ("completed" or "acknowledged")
source
Qdrant.CountResultType
CountResult <: AbstractResponse

Result of count_points.

Fields

  • count::Int: Number of matching points
source
Qdrant.ScoredPointType
ScoredPoint <: AbstractResponse

A point returned from a search/query, with a similarity score.

Fields

  • id::PointId: Point identifier
  • version::Int: Point version
  • score::Float64: Similarity score
  • payload::Optional{Dict{String,Any}}: Payload data
  • vector::Any: Vector data (Float32[], Dict, etc.)
source
Qdrant.RecordType
Record <: AbstractResponse

A stored point record (from get_points, scroll_points).

Fields

  • id::PointId: Point identifier
  • payload::Optional{Dict{String,Any}}: Payload data
  • vector::Any: Vector data
source
Qdrant.ScrollResultType
ScrollResult <: AbstractResponse

Result of scroll_points.

Fields

  • points::Vector{Record}: Page of records
  • next_page_offset::Optional{PointId}: Offset for the next page (nothing if last page)
source
Qdrant.QueryResultType
QueryResult <: AbstractResponse

Result of query_points.

Fields

  • points::Vector{ScoredPoint}: Matching points with scores
source
Qdrant.GroupResultType
GroupResult <: AbstractResponse

A single group within a grouped query result.

Fields

  • id::Any: Group key value
  • hits::Vector{ScoredPoint}: Points in this group
source
Qdrant.GroupsResultType
GroupsResult <: AbstractResponse

Result of query_groups.

Fields

  • groups::Vector{GroupResult}: Groups of matching points
source
Qdrant.SnapshotInfoType
SnapshotInfo <: AbstractResponse

Description of a snapshot.

Fields

  • name::String: Snapshot filename
  • creation_time::Optional{String}: ISO timestamp of creation
  • size::Int: Snapshot size in bytes
  • checksum::Optional{String}: Checksum if available
source
Qdrant.HealthInfoType
HealthInfo <: AbstractResponse

Health check result.

Fields

  • title::String: Service title
  • version::String: Server version
source
Qdrant.AliasDescriptionType
AliasDescription <: AbstractResponse

Alias mapping from list_aliases.

Fields

  • alias_name::String
  • collection_name::String
source
Qdrant.CollectionInfoType
CollectionInfo <: AbstractResponse

Detailed collection information from get_collection.

Fields

  • status::String: Collection status (e.g. "green", "yellow", "red")
  • optimizer_status::String: Optimizer status ("ok" or error message)
  • points_count::Optional{Int}: Total number of points
  • indexed_vectors_count::Optional{Int}: Number of indexed vectors
  • segments_count::Int: Number of segments
  • config::Dict{String,Any}: Collection configuration (vectors, HNSW, WAL, etc.)
  • payload_schema::Dict{String,Any}: Indexed payload field schemas
source
Qdrant.OptimizationsStatusType
OptimizationsStatus <: AbstractResponse

Optimization progress for a collection from get_collection_optimizations.

Fields

  • running::Vector{Dict{String,Any}}: Currently running optimizations
  • summary::Dict{String,Any}: Aggregated optimization statistics
  • queued::Optional{Vector{Dict{String,Any}}}: Pending optimizations (requires ?with=queued)
  • completed::Optional{Vector{Dict{String,Any}}}: Completed optimizations (requires ?with=completed)
source
Qdrant.ClusterStatusType
ClusterStatus <: AbstractResponse

Cluster status from cluster_status.

Fields

  • status::String: "disabled" or "enabled"
  • peer_id::Optional{Int}: This node's peer ID (only when enabled)
  • peers::Dict{String,Any}: Peer ID → peer info map (only when enabled)
  • raft_info::Dict{String,Any}: Raft consensus state (only when enabled)
  • message_send_failures::Dict{String,Any}: Consecutive send failures per peer (only when enabled)
source
Qdrant.LocalShardInfoType
LocalShardInfo <: AbstractResponse

Information about a locally-hosted shard.

Fields

  • shard_id::Int: Shard identifier
  • points_count::Optional{Int}: Number of points in the shard
  • state::String: Shard state (e.g. "Active", "Partial")
  • shard_key::Optional{Any}: Shard key if using custom sharding
source
Qdrant.RemoteShardInfoType
RemoteShardInfo <: AbstractResponse

Information about a remotely-hosted shard replica.

Fields

  • shard_id::Int: Shard identifier
  • peer_id::Int: Peer hosting this shard
  • state::String: Shard state
  • shard_key::Optional{Any}: Shard key if using custom sharding
source
Qdrant.ShardTransferInfoType
ShardTransferInfo <: AbstractResponse

Information about an in-progress shard transfer.

Fields

  • shard_id::Int: Shard being transferred
  • from::Int: Source peer ID
  • to::Int: Destination peer ID
  • sync::Bool: Whether this is a synchronous transfer
  • to_shard_id::Optional{Int}: Target shard ID (for resharding)
  • method::Optional{String}: Transfer method
  • comment::Optional{String}: Human-readable description
source
Qdrant.CollectionClusterInfoType
CollectionClusterInfo <: AbstractResponse

Cluster information for a specific collection from collection_cluster_info.

Fields

  • peer_id::Int: This node's peer ID
  • shard_count::Int: Total number of shards
  • local_shards::Vector{LocalShardInfo}: Shards hosted on this node
  • remote_shards::Vector{RemoteShardInfo}: Shards hosted on remote nodes
  • shard_transfers::Vector{ShardTransferInfo}: In-progress shard transfers
source
Qdrant.ShardKeysResultType
ShardKeysResult <: AbstractResponse

Result of list_shard_keys.

Fields

  • shard_keys::Vector{Any}: List of shard keys (strings, integers, or key objects)
source
Qdrant.FacetHitType
FacetHit <: AbstractResponse

A single facet count.

Fields

  • value::Any: The facet value
  • count::Int: Number of points with this value
source
Qdrant.FacetResultType
FacetResult <: AbstractResponse

Result of facet.

Fields

  • hits::Vector{FacetHit}: Facet value counts
source
Qdrant.SearchMatrixOffsetsResponseType
SearchMatrixOffsetsResponse <: AbstractResponse

Distance matrix in offset format.

Fields

  • offsets_row::Vector{Int}: Row offsets
  • offsets_col::Vector{Int}: Column offsets
  • scores::Vector{Float64}: Distance scores
  • ids::Vector{PointId}: Point IDs
source

Advanced