Service distributed setup and cluster management.
Functions accepting a Qdrant.Client are the primary API. No-client forms
remain available for compatibility with application and environment configuration.
Summary
Functions
Get information about the current state and composition of the cluster.
Get cluster information for a collection.
Create a shard key for a collection.
Delete a shard key for a collection.
Tries to recover the current peer Raft state.
Remove a peer from the cluster by its id.
Update collection cluster setup.
Functions
@spec cluster_status() :: Qdrant.Types.result()
Get information about the current state and composition of the cluster.
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
Qdrant.Api.Http.Cluster.cluster_status(client)
@spec cluster_status(Qdrant.Client.t()) :: Qdrant.Types.result()
@spec collection_cluster_info(String.t()) :: Qdrant.Types.result()
Get cluster information for a collection.
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
Qdrant.Api.Http.Cluster.collection_cluster_info(client, "my_collection")
@spec collection_cluster_info(Qdrant.Client.t(), String.t()) :: Qdrant.Types.result()
@spec create_shard_key(String.t(), Qdrant.Types.request_body()) :: Qdrant.Types.result()
Create a shard key for a collection.
Options:
:timeout- operation commit timeout in seconds
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
body = %{shard_key: "city"}
Qdrant.Api.Http.Cluster.create_shard_key(client, "my_collection", body)
@spec create_shard_key(Qdrant.Client.t(), String.t(), Qdrant.Types.request_body()) :: Qdrant.Types.result()
@spec create_shard_key(String.t(), Qdrant.Types.request_body(), integer() | nil) :: Qdrant.Types.result()
@spec create_shard_key( Qdrant.Client.t(), String.t(), Qdrant.Types.request_body(), Qdrant.Types.request_options() ) :: Qdrant.Types.result()
@spec delete_shard_key(String.t(), Qdrant.Types.request_body()) :: Qdrant.Types.result()
Delete a shard key for a collection.
Options:
:timeout- operation commit timeout in seconds
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
body = %{shard_key: "city"}
Qdrant.Api.Http.Cluster.delete_shard_key(client, "my_collection", body)
@spec delete_shard_key(Qdrant.Client.t(), String.t(), Qdrant.Types.request_body()) :: Qdrant.Types.result()
@spec delete_shard_key(String.t(), Qdrant.Types.request_body(), integer() | nil) :: Qdrant.Types.result()
@spec delete_shard_key( Qdrant.Client.t(), String.t(), Qdrant.Types.request_body(), Qdrant.Types.request_options() ) :: Qdrant.Types.result()
@spec recover_current_peer() :: Qdrant.Types.result()
Tries to recover the current peer Raft state.
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
Qdrant.Api.Http.Cluster.recover_current_peer(client)
@spec recover_current_peer(Qdrant.Client.t()) :: Qdrant.Types.result()
@spec remove_peer(Qdrant.Types.extended_point_id()) :: Qdrant.Types.result()
Remove a peer from the cluster by its id.
Options:
:force- remove the peer even when it has shards or replicas
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
Qdrant.Api.Http.Cluster.remove_peer(client, 42, force: true)
@spec remove_peer(Qdrant.Client.t(), Qdrant.Types.extended_point_id()) :: Qdrant.Types.result()
@spec remove_peer(Qdrant.Types.extended_point_id(), boolean() | nil) :: Qdrant.Types.result()
@spec remove_peer( Qdrant.Client.t(), Qdrant.Types.extended_point_id(), Qdrant.Types.request_options() ) :: Qdrant.Types.result()
@spec update_collection_cluster(String.t(), Qdrant.Types.request_body()) :: Qdrant.Types.result()
Update collection cluster setup.
Options:
:timeout- operation commit timeout in seconds
Example
client = Qdrant.Client.new!(url: "http://localhost:6333")
body = %{move_shard: %{shard_id: 1, to_peer_id: 2, from_peer_id: 1}}
Qdrant.Api.Http.Cluster.update_collection_cluster(client, "my_collection", body)
@spec update_collection_cluster( Qdrant.Client.t(), String.t(), Qdrant.Types.request_body() ) :: Qdrant.Types.result()
@spec update_collection_cluster( String.t(), Qdrant.Types.request_body(), integer() | nil ) :: Qdrant.Types.result()
@spec update_collection_cluster( Qdrant.Client.t(), String.t(), Qdrant.Types.request_body(), Qdrant.Types.request_options() ) :: Qdrant.Types.result()