Interface CollectionMethods
- All Superinterfaces:
ClientSettings,io.metaloom.qdrant.client.CommonSettings
- All Known Subinterfaces:
QDrantGRPCClient
- All Known Implementing Classes:
AbstractQDrantGRPCClient,QDrantGRPCClientImpl
-
Method Summary
Modifier and TypeMethodDescriptioncreateCollection(String collectionName, Collections.VectorParams params) Create new collection with given parameters.createCollection(String collectionName, Collections.VectorParamsMap paramsMap) createCollection(String collectionName, Collections.VectorsConfig config, Integer shardNumber, Integer replicationFactor, Integer writeConsistencyFactor, Boolean onDiskPayload, Collections.HnswConfigDiff hnswConfig, Collections.WalConfigDiff walConfig, Collections.OptimizersConfigDiff optimizersConfig, Integer timeout) Create new collection with given parameters.deleteCollection(String collectionName, Integer timeout) Drop collection and all associated dataGet list name of all existing collections.loadCollections(String collectionName) Get detailed information about specified existing collectionupdateCollection(String collectionName, Collections.CollectionParamsDiff paramConfig) Update parameters of the existing collectionupdateCollection(String collectionName, Collections.CollectionParamsDiff paramConfig, Collections.OptimizersConfigDiff optimizerConfig, Integer timeout) Update parameters of the existing collectionupdateCollectionAliases(List<? extends Collections.AliasOperations> actions, Integer timeout) Update aliases of the collections.Methods inherited from interface io.metaloom.qdrant.client.ClientSettings
channel, requestMethods inherited from interface io.metaloom.qdrant.client.CommonSettings
getConnectTimeout, getHostname, getPort, getReadTimeout, getWriteTimeout
-
Method Details
-
listCollections
Get list name of all existing collections.- Returns:
-
loadCollections
default GrpcClientRequest<Collections.GetCollectionInfoResponse> loadCollections(String collectionName) Get detailed information about specified existing collection- Parameters:
collectionName- Name of the collection to retrieve- Returns:
-
createCollection
default GrpcClientRequest<Collections.CollectionOperationResponse> createCollection(String collectionName, Collections.VectorParams params) Create new collection with given parameters.- Parameters:
collectionName- Name of the new collectionparams- Vector parameters for the new collection (e.g. dimension, method of distance computation)- Returns:
-
createCollection
default GrpcClientRequest<Collections.CollectionOperationResponse> createCollection(String collectionName, Collections.VectorParamsMap paramsMap) -
createCollection
default GrpcClientRequest<Collections.CollectionOperationResponse> createCollection(String collectionName, Collections.VectorsConfig config, Integer shardNumber, Integer replicationFactor, Integer writeConsistencyFactor, Boolean onDiskPayload, Collections.HnswConfigDiff hnswConfig, Collections.WalConfigDiff walConfig, Collections.OptimizersConfigDiff optimizersConfig, Integer timeout) Create new collection with given parameters.- Parameters:
collectionName- Name of the new collectionconfig- Vector configuration for the new collection which contains vector params (e.g. dimension, method of distance computation)shardNumber- Number of shards in collection. Default is 1 for standalone, otherwise equal to the number of nodes Minimum is 1replicationFactor- Number of shards replicas. Default is 1 Minimum is 1writeConsistencyFactor- 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.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- Custom params for HNSW index. If none - values from service configuration file are used.walConfig- Custom params for WAL. If none - values from service configuration file are used.optimizersConfig- Custom params for Optimizers. If none - values from service configuration file are used.timeout- Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error.- Returns:
-
deleteCollection
default GrpcClientRequest<Collections.CollectionOperationResponse> deleteCollection(String collectionName, Integer timeout) Drop collection and all associated data- Parameters:
collectionName- Name of the collection to deletetimeout- Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error.- Returns:
-
updateCollectionAliases
default GrpcClientRequest<Collections.CollectionOperationResponse> updateCollectionAliases(List<? extends Collections.AliasOperations> actions, Integer timeout) Update aliases of the collections.- Parameters:
actions- Alias update operations (create,delete,rename)timeout- Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error.- Returns:
-
updateCollection
default GrpcClientRequest<Collections.CollectionOperationResponse> updateCollection(String collectionName, Collections.CollectionParamsDiff paramConfig) Update parameters of the existing collection- Parameters:
collectionName- Name of the collection to updateparamConfig- Collection base params. If none - values from service configuration file are used.- Returns:
-
updateCollection
default GrpcClientRequest<Collections.CollectionOperationResponse> updateCollection(String collectionName, Collections.CollectionParamsDiff paramConfig, Collections.OptimizersConfigDiff optimizerConfig, Integer timeout) Update parameters of the existing collection- Parameters:
collectionName- Name of the collection to updateparamConfig- Collection base params. If none - values from service configuration file are used.optimizerConfig- Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are completetimeout- Wait for operation commit timeout in seconds. If timeout is reached - request will return with service error.- Returns:
-