createShardKey

abstract suspend fun createShardKey(name: String, shardKey: ShardKey, shardsNumber: Int? = null, replicationFactor: Int? = null, placement: List<Long>? = null, timeout: Int? = null)

Create a custom sharding key, so a query that names it touches only its shards.

qdrant.createShardKey("docs", ShardKey.of("eu-west"), shardsNumber = 2)

The collection must have been created with custom sharding for this to be accepted.

Parameters

shardsNumber

shards to create for this key; the server's default when null.

replicationFactor

replicas per shard; the server's default when null.

placement

peer ids allowed to hold these shards; anywhere when null.

timeout

optional server-side commit timeout, in seconds.