diff --git a/milvus/grpc/Collection.ts b/milvus/grpc/Collection.ts index f8e98aba..dc39f1a4 100644 --- a/milvus/grpc/Collection.ts +++ b/milvus/grpc/Collection.ts @@ -315,7 +315,9 @@ export class Collection extends Database { * }); * ``` */ - async alterCollection(data: AlterCollectionReq): Promise { + async alterCollectionProperties( + data: AlterCollectionReq + ): Promise { checkCollectionName(data); const req: any = { @@ -337,6 +339,11 @@ export class Collection extends Database { return promise; } + /** + * @deprecated Use alterCollectionProperties instead. + */ + alterCollection = this.alterCollectionProperties; + /** * Drops collection properties. * Note that this operation only deletes the properties of the collection, not the collection itself. diff --git a/test/grpc/Collection.spec.ts b/test/grpc/Collection.spec.ts index 2cadf77e..0d3be8fe 100644 --- a/test/grpc/Collection.spec.ts +++ b/test/grpc/Collection.spec.ts @@ -408,7 +408,7 @@ describe(`Collection API`, () => { const key = 'collection.ttl.seconds'; const value = 18000; - const alter = await milvusClient.alterCollection({ + const alter = await milvusClient.alterCollectionProperties({ collection_name: LOAD_COLLECTION_NAME, properties: { [key]: value }, }); @@ -417,7 +417,7 @@ describe(`Collection API`, () => { const key2 = 'mmap.enabled'; const value2 = true; - const alter2 = await milvusClient.alterCollection({ + const alter2 = await milvusClient.alterCollectionProperties({ collection_name: LOAD_COLLECTION_NAME, properties: { [key2]: value2 }, }); diff --git a/test/grpc/Database.spec.ts b/test/grpc/Database.spec.ts index f60da33e..d8de72f1 100644 --- a/test/grpc/Database.spec.ts +++ b/test/grpc/Database.spec.ts @@ -126,7 +126,7 @@ describe(`Database API`, () => { ); // alterCollection - const alterCollection = await milvusClient.alterCollection({ + const alterCollection = await milvusClient.alterCollectionProperties({ collection_name: COLLECTION_NAME2, db_name: DB_NAME2, properties: { 'collection.segment.rowLimit': 10000 },