import { Schemas } from './types.js'; import { ClientApi } from './openapi/generated_client_type.js'; export type QdrantClientParams = { port?: number | null; apiKey?: string; https?: boolean; prefix?: string; url?: string; host?: string; /** * Local timeout for requests (uses fetch's AbortSignal) - Default 300 seconds */ timeout?: number; /** * Additional HTTP Headers to send. */ headers?: Record; /** * The Node.js fetch API (undici) uses HTTP/1.1 under the hood. * This indicates the maximum number of keep-alive connections * to open simultaneously while building a request pool in memory. */ maxConnections?: number; /** * Check compatibility with the server version. Default: `true` */ checkCompatibility?: boolean; }; export declare class QdrantClient { private _https; private _scheme; private _port; private _prefix; private _host; private _restUri; private _openApiClient; constructor({ url, host, apiKey, https, prefix, port, timeout, checkCompatibility, ...args }?: QdrantClientParams); /** * API getter * * @returns An instance of an API, generated from OpenAPI schema. */ api(): ClientApi; /** * Scroll over all (matching) points in the collection. * @param collection_name Name of the collection * @param {object} args * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - filter: If provided - only returns points matching filtering conditions * - limit: How many points to return * - offset: If provided - skip points with ids less than given `offset` * - with_payload: * - Specify which stored payload should be attached to the result. * - If `True` - attach all payload * - If `False` - do not attach any payload * - If List of string - include only specified fields * - If `PayloadSelector` - use explicit rules * - Default: `true` * - with_vector: * - If `True` - Attach stored vector to the search result. * - If `False` - Do not attach vector. * - If List of string - include only specified fields * - Default: `false` * - consistency: * Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * - int - number of replicas to query, values should present in all queried replicas * - 'majority' - query all replicas, but return values present in the majority of replicas * - 'quorum' - query the majority of replicas, return values present in all of them * - 'all' - query all replicas, and return values present in all replicas * - order_by: * Order the records by a payload field. * @returns * A pair of (List of points) and (optional offset for the next scroll request). * If next page offset is `None` - there is no more points in the collection to scroll. */ scroll(collection_name: string, { shard_key, filter, consistency, timeout, limit, offset, with_payload, with_vector, order_by, }?: Schemas['ScrollRequest'] & { timeout?: number; } & { consistency?: Schemas['ReadConsistency']; }): Promise; /** * Count points in the collection. * Count points in the collection matching the given filter. * @param collection_name * @param {object} args * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - filter: filtering conditions * - exact: * If `True` - provide the exact count of points matching the filter. * If `False` - provide the approximate count of points matching the filter. Works faster. * Default: `true` * @returns Amount of points in the collection matching the filter. */ count(collection_name: string, { shard_key, filter, exact, timeout }?: Schemas['CountRequest'] & { timeout?: number; }): Promise; /** * Get cluster information for a collection. * @param collection_name * @returns Operation result */ collectionClusterInfo(collection_name: string): Promise; /** * Update collection cluster setup * @param collection_name Name of the collection * @param {object} args * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - operation: Cluster operation to perform. Can be one of: * - move_shard: Move a shard from one peer to another * - replicate_shard: Replicate a shard to another peer * - abort_transfer: Abort an ongoing shard transfer * - drop_replica: Drop a replica from a peer * - create_sharding_key: Create a new sharding key * - drop_sharding_key: Drop an existing sharding key * - restart_transfer: Restart a failed shard transfer * - start_resharding: Start resharding operation * - abort_resharding: Abort an ongoing resharding operation * @returns Operation result */ updateCollectionCluster(collection_name: string, { timeout, ...operation }: { timeout?: number; } & Schemas['ClusterOperations']): Promise; /** * Update vectors * @param collection_name * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - Default: `true` * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points: Points with named vectors * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * @returns Operation result */ updateVectors(collection_name: string, { wait, ordering, timeout, points, shard_key, }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['UpdateVectors']): Promise; /** * Delete vectors * @param collection_name * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - Default: `true` * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points: Deletes values from each point in this list * - filter: Deletes values from points that satisfy this filter condition * - vector: Vector names * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * @returns Operation result */ deleteVectors(collection_name: string, { wait, ordering, timeout, points, filter, vector, shard_key, }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['DeleteVectors']): Promise; /** * Create a new named vector on an existing collection. * Only the immutable properties of the vector space are configurable here; * storage, index and quantization are inferred and may be tuned later via {@link updateCollection}. * @param collection_name * @param vector_name Name of the new vector * @param config Vector configuration - either dense or sparse * @param {object} args * - wait: Await for the results to be processed. * - ordering: Define strategy for ordering of the operation. * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ createVectorName(collection_name: string, vector_name: string, config: Schemas['VectorNameConfig'], { wait, ordering, timeout }?: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; }): Promise; /** * Delete a named vector from a collection. * @param collection_name * @param vector_name Name of the vector to delete * @param {object} args * - wait: Await for the results to be processed. * - ordering: Define strategy for ordering of the operation. * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ deleteVectorName(collection_name: string, vector_name: string, { wait, ordering, timeout }?: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; }): Promise; /** * Update or insert a new point into the collection. * @param collection_name * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - Default: `true` * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points: Batch or list of points to insert * @returns Operation result */ upsert(collection_name: string, { wait, ordering, timeout, ...points_or_batch }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointInsertOperations']): Promise; /** * Retrieve stored points by IDs * @param collection_name * @param {object} args - * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - ids: list of IDs to lookup * - with_payload: * - Specify which stored payload should be attached to the result. * - If `True` - attach all payload * - If `False` - do not attach any payload * - If List of string - include only specified fields * - If `PayloadSelector` - use explicit rules * - Default: `true` * - with_vector: * - If `True` - Attach stored vector to the search result. * - If `False` - Do not attach vector. * - If List of string - Attach only specified vectors. * - Default: `false` * - consistency: * Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * - number - number of replicas to query, values should present in all queried replicas * - 'majority' - query all replicas, but return values present in the majority of replicas * - 'quorum' - query the majority of replicas, return values present in all of them * - 'all' - query all replicas, and return values present in all replicas * @returns List of points */ retrieve(collection_name: string, { shard_key, ids, with_payload, with_vector, consistency, timeout, }: Schemas['PointRequest'] & { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; }): Promise; /** * Deletes selected points from collection * @param collection_name Name of the collection * @param {object} args - * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points_selector: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ delete(collection_name: string, { wait, ordering, timeout, ...points_selector }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointsSelector']): Promise; /** * Sets payload values for specified points. * @param collection_name Name of the collection * @param {object} args - * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - payload: Key-value pairs of payload to assign * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - key: Assigns payload to each point that satisfy this path of property * - points|filter: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ setPayload(collection_name: string, { payload, points, filter, shard_key, key, ordering, timeout, wait, }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['SetPayload']): Promise; /** * Overwrites payload of the specified points * After this operation is applied, only the specified payload will be present in the point. * The existing payload, even if the key is not specified in the payload, will be deleted. * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - payload: Key-value pairs of payload to assign * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - key: Assigns payload to each point that satisfy this path of property * - points|filter: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ overwritePayload(collection_name: string, { ordering, timeout, payload, points, filter, shard_key, key, wait, }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['SetPayload']): Promise; /** * Remove values from point's payload * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - keys: List of payload keys to remove. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - points|filter: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ deletePayload(collection_name: string, { ordering, timeout, keys, points, filter, shard_key, wait, }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointsSelector'] & Schemas['DeletePayload']): Promise; /** * Delete all payload for selected points * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - points_selector: List of affected points, filter or points selector. * Example: * - `points: [ * 1, 2, 3, "cd3b53f0-11a7-449f-bc50-d06310e7ed90" * ]` * - `filter: { * must: [ * { * key: 'rand_number', * range: { * gte: 0.7 * } * } * ] * }` * @returns Operation result */ clearPayload(collection_name: string, { ordering, timeout, wait, ...points_selector }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['PointsSelector']): Promise; /** * Operation for performing changes of collection aliases. * Alias changes are atomic, meaning that no collection modifications can happen between alias operations. * @param {object} args * - actions: List of operations to perform * - timeout: Wait for operation commit timeout in seconds. If timeout is reached, request will return with service error. * @returns Operation result */ updateCollectionAliases({ actions, timeout, }: { timeout?: number; } & Schemas['ChangeAliasesOperation']): Promise; /** * Get collection aliases * @param collection_name Name of the collection * @returns Collection aliases */ getCollectionAliases(collection_name: string): Promise; /** * Get all aliases * @returns All aliases of all collections */ getAliases(): Promise; /** * Get list name of all existing collections * @returns List of the collections */ getCollections(): Promise; /** * Get detailed information about specified existing collection * * @param collection_name Name of the collection * @returns Detailed information about the collection */ getCollection(collection_name: string): Promise; /** * Update parameters of the collection * * @param collection_name Name of the collection * @param {object} args * - optimizer_config: Override for optimizer configuration * - collection_params: Override for collection parameters * - timeout: Wait for operation commit timeout in seconds. If timeout is reached, request will return with service error. * @returns Operation result */ updateCollection(collection_name: string, args?: Schemas['UpdateCollection'] & { timeout?: number; }): Promise; /** * Removes collection and all it's data * @param collection_name Name of the collection to delete * @param {object} args * - timeout: * Wait for operation commit timeout in seconds. * If timeout is reached, request will return with service error. * @returns Operation result */ deleteCollection(collection_name: string, args?: { timeout?: number; }): Promise; /** * Create empty collection with given parameters * @returns Operation result * @param collectionName Name of the collection to recreate * @param {object} args * - vectors_config: * Configuration of the vector storage. Vector params contains size and distance for the vector storage. * If dict is passed, service will create a vector storage for each key in the dict. * If single VectorParams is passed, service will create a single anonymous vector storage. * - shard_number: Number of shards in collection. Default is 1, minimum is 1. * - sharding_method: Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key * - replication_factor: * Replication factor for collection. Default is 1, minimum is 1. * Defines how many copies of each shard will be created. * Have effect only in distributed mode. * - write_consistency_factor: * Write consistency factor for collection. Default is 1, minimum is 1. * Defines how many replicas should apply the operation for us to consider it successful. * Increasing this number will make the collection more resilient to inconsistencies, but will * also make it fail if not enough replicas are available. * Does not have any performance impact. * Have effect only in distributed mode. * - on_disk_payload: * If true - point`s payload will not be stored in memory. * It will be read from the disk every time it is requested. * This setting saves RAM by (slightly) increasing the response time. * Note: those payload values that are involved in filtering and are indexed - remain in RAM. * - hnsw_config: Params for HNSW index * - optimizers_config: Params for optimizer * - wal_config: Params for Write-Ahead-Log * - quantization_config: Params for quantization, if None - quantization will be disabled * - init_from: Use data stored in another collection to initialize this collection * - sparse_vectors: Sparse vector data config * - strict_mode_config: Strict mode configuration * - timeout: * Wait for operation commit timeout in seconds. * If timeout is reached, request will return with service error. */ createCollection(collection_name: string, { timeout, vectors, hnsw_config, on_disk_payload, optimizers_config, quantization_config, replication_factor, shard_number, sharding_method, wal_config, write_consistency_factor, sparse_vectors, strict_mode_config, payload, metadata, }: { timeout?: number; } & Schemas['CreateCollection']): Promise; /** * Delete and create empty collection with given parameters * @returns Operation result * @param collectionName Name of the collection to recreate * @param {object} args * - vectorsConfig: * Configuration of the vector storage. Vector params contains size and distance for the vector storage. * If dict is passed, service will create a vector storage for each key in the dict. * If single VectorParams is passed, service will create a single anonymous vector storage. * - shardNumber: Number of shards in collection. Default is 1, minimum is 1. * - sharding_method: Sharding method Default is Auto - points are distributed across all available shards Custom - points are distributed across shards according to shard key * - replicationFactor: * Replication factor for collection. Default is 1, minimum is 1. * Defines how many copies of each shard will be created. * Have effect only in distributed mode. * - writeConsistencyFactor: * Write consistency factor for collection. Default is 1, minimum is 1. * Defines how many replicas should apply the operation for us to consider it successful. * Increasing this number will make the collection more resilient to inconsistencies, but will * also make it fail if not enough replicas are available. * Does not have any performance impact. * Have effect only in distributed mode. * - onDiskPayload: * If true - point`s payload will not be stored in memory. * It will be read from the disk every time it is requested. * This setting saves RAM by (slightly) increasing the response time. * Note: those payload values that are involved in filtering and are indexed - remain in RAM. * - hnswConfig: Params for HNSW index * - optimizersConfig: Params for optimizer * - walConfig: Params for Write-Ahead-Log * - quantizationConfig: Params for quantization, if None - quantization will be disabled * - initFrom: Use data stored in another collection to initialize this collection * - sparse_vectors: Sparse vector data config * - strict_mode_config: Strict mode configuration * - timeout: * Wait for operation commit timeout in seconds. * If timeout is reached, request will return with service error. */ recreateCollection(collection_name: string, { timeout, vectors, hnsw_config, on_disk_payload, optimizers_config, quantization_config, replication_factor, shard_number, sharding_method, wal_config, write_consistency_factor, sparse_vectors, strict_mode_config, payload, metadata, }: { timeout?: number; } & Schemas['CreateCollection']): Promise; /** * Creates index for a given payload field. * Indexed fields allow to perform filtered search operations faster. * @param collectionName Name of the collection * @param {object} args * - fieldName: Name of the payload field. * - fieldSchema: Type of data to index. * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: * Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * @returns Operation Result */ createPayloadIndex(collection_name: string, { wait, ordering, timeout, field_name, field_schema, }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['CreateFieldIndex']): Promise; /** * Removes index for a given payload field. * @param collection_name Name of the collection * @param field_name Name of the payload field * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: * Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * @returns Operation Result */ deletePayloadIndex(collection_name: string, field_name: string, { wait, ordering, timeout }?: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; }): Promise; /** * List all snapshots for a given collection * @param collection_name Name of the collection * @returns List of snapshots */ listSnapshots(collection_name: string): Promise; /** * Create snapshot for a given collection * @param collection_name Name of the collection * @returns Snapshot description */ createSnapshot(collection_name: string, args?: { wait?: boolean; }): Promise; /** * Delete snapshot for a given collection * @param collection_name Name of the collection * @param snapshot_name Snapshot id * @returns True if snapshot was deleted */ deleteSnapshot(collection_name: string, snapshot_name: string, args?: { wait?: boolean; }): Promise; /** * List all snapshots for a whole storage * @returns List of snapshots */ listFullSnapshots(): Promise; /** * Create snapshot for a whole storage * @returns Snapshot description */ createFullSnapshot(args?: { wait?: boolean; }): Promise; /** * Delete snapshot for a whole storage * @param snapshot_name Snapshot name * @returns True if the snapshot was deleted */ deleteFullSnapshot(snapshot_name: string, args?: { wait?: boolean; }): Promise; /** * Recover collection from snapshot * @param collection_name Name of the collection * @param {object} args * - location: * URL of the snapshot. * Example: * - URL `http://localhost:8080/collections/my_collection/snapshots/my_snapshot` * - Local path `file:///qdrant/snapshots/test_collection-2022-08-04-10-49-10.snapshot` * - priority: * Defines source of truth for snapshot recovery * - `snapshot` means - prefer snapshot data over the current state * - `replica` means - prefer existing data over the snapshot * Default: `replica` * - checksum: * SHA256 checksum to verify snapshot integrity before recovery * @returns True if the snapshot was recovered */ recoverSnapshot(collection_name: string, { location, priority, checksum, api_key }: Schemas['SnapshotRecover']): Promise; /** * Batch update points * Apply a series of update operations for points, vectors and payloads. * @param collection_name Name of the collection * @param {object} args * - wait: Await for the results to be processed. * - If `true`, result will be returned only when all changes are applied * - If `false`, result will be returned immediately after the confirmation of receiving. * - ordering: Define strategy for ordering of the points. Possible values: * - 'weak' - write operations may be reordered, works faster, default * - 'medium' - write operations go through dynamically selected leader, * may be inconsistent for a short period of time in case of leader change * - 'strong' - Write operations go through the permanent leader, * consistent, but may be unavailable if leader is down * - operations: List of operations to perform * @returns Operation result */ batchUpdate(collection_name: string, { wait, ordering, timeout, ...operations }: { wait?: boolean; ordering?: Schemas['WriteOrdering']; timeout?: number; } & Schemas['UpdateOperations']): Promise; /** * Recover from a snapshot * @param collection_name Name of the collection * @param shard_id Shard ID * @returns Operation result */ recoverShardFromSnapshot(collection_name: string, shard_id: number, { wait, ...shard_snapshot_recover }: { wait?: boolean; } & Schemas['ShardSnapshotRecover']): Promise; /** * Get list of snapshots for a shard of a collection * @param collection_name Name of the collection * @param shard_id Shard ID * @returns Operation result */ listShardSnapshots(collection_name: string, shard_id: number): Promise; /** * Create new snapshot of a shard for a collection * @param collection_name Name of the collection * @param shard_id Shard ID * @returns Operation result */ createShardSnapshot(collection_name: string, shard_id: number, { wait }: { wait?: boolean; }): Promise; /** * Delete snapshot of a shard for a collection * @param collection_name Name of the collection * @param shard_id Shard ID * @param snapshot_name Snapshot name * @returns Operation result */ deleteShardSnapshot(collection_name: string, shard_id: number, snapshot_name: string, { wait }: { wait?: boolean; }): Promise; /** * List shard keys * @param collection_name Name of the collection * @returns Shard keys response */ listShardKeys(collection_name: string): Promise; /** * Create shard key * @param collection_name Name of the collection * @param {object} args - * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - shards_number: How many shards to create for this key If not specified, will use the default value from config * - replication_factor: How many replicas to create for each shard If not specified, will use the default value from config * - placement: Placement of shards for this key List of peer ids, that can be used to place shards for this key If not specified, will be randomly placed among all peers * - initial_state: Initial state of the shards for this key If not specified, will be `Initializing` first and then `Active` Warning: do not change this unless you know what you are doing. * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ createShardKey(collection_name: string, { shard_key, shards_number, replication_factor, placement, initial_state, timeout, }: { timeout?: number; } & Schemas['CreateShardingKey']): Promise; /** * Delete shard key * @param collection_name Name of the collection * @param {object} args - * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * @returns Operation result */ deleteShardKey(collection_name: string, { shard_key, timeout }: { timeout?: number; } & Schemas['DropShardingKey']): Promise; /** * Collect cluster telemetry data * @description Get telemetry data, from the point of view of the cluster. * This includes peers info, collections info, shard transfers, and resharding status. * @param {object} args * - details_level: The level of detail to include in the response * - per_collection: If true, include per-collection request statistics in the response * - timeout: Timeout for this request * @returns Cluster telemetry data */ clusterTelemetry(args?: { details_level?: number; per_collection?: boolean; timeout?: number; }): Promise; /** * Get optimization progress * @description Get progress of ongoing and completed optimizations for a collection * @param collection_name Name of the collection * @param {object} args * - with: Comma-separated list of optional fields to include in the response. * Possible values: queued, completed, idle_segments. * - completed_limit: Maximum number of completed optimizations to return. * @returns Optimizations progress */ getOptimizations(collection_name: string, args?: { with?: string; completed_limit?: number; }): Promise; /** * Get the cluster-wide quota configuration and how close each peer is to it * @description The configuration is cluster-wide, the utilization is not: memory and disk are node-local, * so one peer being under its limit says nothing about the others. `usage` describes the node that served * the request, `peers` is what every peer that answered reports about itself. * @returns Quota configuration in effect, and per-peer utilization */ getQuotas(): Promise; /** * Set the cluster-wide limits on node resources * @description An unset limit means the corresponding resource is not capped. Limits are only enforced * while `enabled` is true. * @param {object} args * - enabled: Whether the limits are enforced * - max_resident_memory_percent: Reject memory-consuming updates once process resident memory reaches * this percentage of the memory available to it * - max_disk_usage_percent: Reject disk-consuming updates once the storage filesystem is filled to * this percentage of its capacity * - release_margin_percent: How far below its limit a resource has to fall before updates resume * - wait: Await for the configuration to be applied cluster-wide * @returns Operation result */ updateQuotas({ wait, ...config }?: { wait?: boolean; } & Schemas['QuotaConfig']): Promise; /** * Returns information about the running Qdrant instance * @description Returns information about the running Qdrant instance like version and commit id * @returns Operation result */ versionInfo(): Promise; /** * Check the existence of a collection * @param collection_name Name of the collection * @description Returns "true" if the given collection name exists, and "false" otherwise * @returns Operation result */ collectionExists(collection_name: string): Promise; /** * Query points * @description Universally query points. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - prefetch: Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es). * - query: Query to perform. If missing without prefetches, returns points ordered by their IDs. * - using: Define which vector name to use for querying. If missing, the default vector is used. * - filter: Filter conditions - return only those points that satisfy the specified conditions. * - params: Search params for when there is no prefetch * - score_threshold: Return points with scores better than this threshold. * - limit: Max number of points to return. Default is 10. * - offset: Offset of the result. Skip this many points. Default is 0 * - with_vector: Options for specifying which vectors to include into the response. Default is false. * - with_payload: Options for specifying which payload to include or not. Default is false. * - lookup_from: The location to use for IDs lookup, if not specified - use the current collection and the 'using' vector Note: the other collection vectors should have the same vector size as the 'using' vector in the current collection. * @returns Operation result */ query(collection_name: string, { consistency, timeout, shard_key, prefetch, query, using, filter, params, score_threshold, limit, offset, with_vector, with_payload, lookup_from, }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['QueryRequest']): Promise; /** * Query points in batch * @description Universally query points in batch. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - searches: List of queries * @returns Operation result */ queryBatch(collection_name: string, { consistency, timeout, searches, }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['QueryRequestBatch']): Promise; /** * Query points, grouped by a given payload field * @description Universally query points, grouped by a given payload field * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - prefetch: Sub-requests to perform first. If present, the query will be performed on the results of the prefetch(es). * - query: Query to perform. If missing without prefetches, returns points ordered by their IDs. * - using: Define which vector name to use for querying. If missing, the default vector is used. * - filter: Filter conditions - return only those points that satisfy the specified conditions. * - params: Search params for when there is no prefetch * - score_threshold: Return points with scores better than this threshold. * - with_vector: Options for specifying which vectors to include into the response. Default is false. * - with_payload: Options for specifying which payload to include or not. Default is false. * - group_by: Payload field to group by, must be a string or number field. If the field contains more than 1 value, all values will be used for grouping. One point can be in multiple groups. * - group_size: Maximum amount of points to return per group. Default is 3. * - limit: Maximum amount of groups to return. Default is 10. * - with_lookup: Look for points in another collection using the group ids. * @returns Operation result */ queryGroups(collection_name: string, { consistency, timeout, shard_key, prefetch, query, using, filter, params, score_threshold, with_vector, with_payload, group_by, group_size, limit, with_lookup, }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['QueryGroupsRequest']): Promise; /** * Facet a payload key with a given filter. * @description Count points that satisfy the given filter for each unique value of a payload key. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - key: Payload key to use for faceting. * - limit: Max number of hits to return. Default is 10. * - filter: Filter conditions - only consider points that satisfy these conditions. * - exact: Whether to do a more expensive exact count for each of the values in the facet. Default is false. * @returns Operation result */ facet(collection_name: string, { consistency, timeout, shard_key, key, limit, filter, exact, }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['FacetRequest']): Promise; /** * Search points matrix distance pairs. * @description Compute distance matrix for sampled points with a pair based output format. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - filter: Look only for points which satisfies this conditions. * - sample: How many points to select and search within. Default is 10. * - limit: How many neighbours per sample to find. Default is 3. * - using: Define which vector name to use for querying. If missing, the default vector is used. * @returns Operation result */ searchMatrixPairs(collection_name: string, { consistency, timeout, shard_key, filter, sample, limit, using, }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['SearchMatrixRequest']): Promise; /** * Search points matrix distance offsets. * @description Compute distance matrix for sampled points with an offset based output format. * @param collection_name Name of the collection * @param {object} args - * - consistency: Read consistency of the search. Defines how many replicas should be queried before returning the result. * Values: * number - number of replicas to query, values should present in all queried replicas * 'majority' - query all replicas, but return values present in the majority of replicas * 'quorum' - query the majority of replicas, return values present in all of them * 'all' - query all replicas, and return values present in all replicas * - timeout: If set, overrides global timeout setting for this request. Unit is seconds. * - shard_key: Specify in which shards to look for the points, if not specified - look in all shards. * - filter: Look only for points which satisfies this conditions. * - sample: How many points to select and search within. Default is 10. * - limit: How many neighbours per sample to find. Default is 3. * - using: Define which vector name to use for querying. If missing, the default vector is used. * @returns Operation result */ searchMatrixOffsets(collection_name: string, { consistency, timeout, shard_key, filter, sample, limit, using, }: { consistency?: Schemas['ReadConsistency']; } & { timeout?: number; } & Schemas['SearchMatrixRequest']): Promise; }