Browse Source

Merge remote-tracking branch 'upstream/main' into feature/insert-data

tumao 4 years ago
parent
commit
92411c4438

+ 1 - 1
server/package.json

@@ -30,7 +30,7 @@
     "@nestjs/swagger": "^4.8.0",
     "@types/passport-jwt": "^3.0.5",
     "@types/passport-local": "^1.0.33",
-    "@zilliz/milvus2-sdk-node": "^0.1.0",
+    "@zilliz/milvus2-sdk-node": "^1.0.0",
     "class-transformer": "^0.4.0",
     "class-validator": "^0.13.1",
     "passport": "^0.4.1",

+ 2 - 2
server/src/collections/collections.service.ts

@@ -86,7 +86,7 @@ export class CollectionsService {
     const data = [];
     const res = await this.getCollectionNames();
     const loadedCollections = await this.getCollectionNames({
-      type: ShowCollectionsType.InMemory,
+      type: ShowCollectionsType.Loaded,
     });
     if (res.collection_names.length > 0) {
       for (const name of res.collection_names) {
@@ -113,7 +113,7 @@ export class CollectionsService {
   async getLoadedColletions() {
     const data = [];
     const res = await this.getCollectionNames({
-      type: ShowCollectionsType.InMemory,
+      type: ShowCollectionsType.Loaded,
     });
     if (res.collection_names.length > 0) {
       for (const [index, value] of res.collection_names.entries()) {

+ 3 - 3
server/src/milvus/milvus.service.ts

@@ -1,9 +1,9 @@
 import { Injectable } from '@nestjs/common';
-import { MilvusNode } from '@zilliz/milvus2-sdk-node';
+import { MilvusClient } from '@zilliz/milvus2-sdk-node';
 @Injectable()
 export class MilvusService {
   private milvusAddress: string;
-  private milvusClient: MilvusNode;
+  private milvusClient: MilvusClient;
 
   constructor() {
     this.milvusAddress = '';
@@ -20,7 +20,7 @@ export class MilvusService {
   async connectMilvus(address: string) {
     const milvusAddress = address.replace(/(http|https):\/\//, '');
     try {
-      this.milvusClient = new MilvusNode(milvusAddress);
+      this.milvusClient = new MilvusClient(milvusAddress);
       await this.milvusClient.hasCollection({
         collection_name: 'not_exist',
       });

+ 4 - 4
server/yarn.lock

@@ -1292,10 +1292,10 @@
   resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
   integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
 
-"@zilliz/milvus2-sdk-node@^0.1.0":
-  version "0.1.1"
-  resolved "https://registry.yarnpkg.com/@zilliz/milvus2-sdk-node/-/milvus2-sdk-node-0.1.1.tgz#4f099e16545b3af98fbbbca122978060803db7a7"
-  integrity sha512-Jc9qtPGU9m/4YP87ugf7Iaci5pdK4B2CukFf/TKbSFB7JFzA8WmhsltwfslscgKeKkSRegiGUIGUNJdI8o8isQ==
+"@zilliz/milvus2-sdk-node@^1.0.0":
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/@zilliz/milvus2-sdk-node/-/milvus2-sdk-node-1.0.0.tgz#8f846c446e2017812e560c6387f6351222eb26f0"
+  integrity sha512-QlVeqCEwdtP97err+cRq5niFMt7zbfxDynR2NnvvSBR8RyT7qIRz7zyWDqbqTCSDqyXI62QNT0OdA3O53k3HaA==
   dependencies:
     "@grpc/grpc-js" "^1.2.12"
     "@grpc/proto-loader" "^0.6.0"