Skip to content

Commit

Permalink
depreacted GetIndexState
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid committed Aug 20, 2024
1 parent 5806ef7 commit c677df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 3 additions & 1 deletion milvus/grpc/MilvusIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class Index extends Data {
* @returns {Promise<ListIndexResponse>} A Promise that resolves to an array of strings representing the names of indexes associated with the specified collection.
* @returns {Object} return.status - An object with properties 'error_code' (number) and 'reason' (string).
* @returns {Array<string>} return.string - index names
*
*
* @example
* ```
* const milvusClient = new MilvusClient(MILUVS_ADDRESS);
Expand All @@ -208,6 +208,7 @@ export class Index extends Data {

/**
* Get the index building state.
* @deprecated
*
* @param {Object} data - An object with the following properties:
* @param {string} data.collection_name - The name of the collection for which the index state is to be retrieved.
Expand All @@ -229,6 +230,7 @@ export class Index extends Data {
* console.log(res);
* ```
*/
/* istanbul ignore next */
async getIndexState(data: GetIndexStateReq): Promise<GetIndexStateResponse> {
checkCollectionName(data);
const promise = await promisify(
Expand Down
10 changes: 1 addition & 9 deletions test/grpc/Index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,6 @@ describe(`Milvus Index API`, () => {
expect(res.status.error_code).toEqual(ErrorCode.SUCCESS);
});

it(`Get Index State with field name `, async () => {
const res = await milvusClient.getIndexState({
collection_name: COLLECTION_NAME,
field_name: VECTOR_FIELD_NAME,
});
expect(res.status.error_code).toEqual(ErrorCode.SUCCESS);
});

it(`Get Index progress with index name`, async () => {
const res = await milvusClient.getIndexBuildProgress({
collection_name: COLLECTION_NAME,
Expand All @@ -386,7 +378,7 @@ describe(`Milvus Index API`, () => {
});
expect(alter.error_code).toEqual(ErrorCode.SUCCESS);
const params = describe.index_descriptions[0].params;
expect(findKeyValue(params, 'mmap.enabled')).toEqual("true");
expect(findKeyValue(params, 'mmap.enabled')).toEqual('true');

// console.log('describe', describe.index_descriptions[0].params);
});
Expand Down

0 comments on commit c677df0

Please sign in to comment.