浏览代码

add nbits

iynewz 3 年之前
父节点
当前提交
4306fc7b9e
共有 3 个文件被更改,包括 8 次插入1 次删除
  1. 1 1
      client/src/consts/Milvus.tsx
  2. 2 0
      client/src/pages/schema/Create.tsx
  3. 5 0
      client/src/pages/schema/CreateForm.tsx

+ 1 - 1
client/src/consts/Milvus.tsx

@@ -71,7 +71,7 @@ export const FLOAT_INDEX_CONFIG: indexConfigType = {
     search: ['nprobe'],
   },
   IVF_PQ: {
-    create: ['nlist', 'm'],
+    create: ['nlist', 'm', 'nbits'],
     search: ['nprobe'],
   },
   IVF_SQ8: {

+ 2 - 0
client/src/pages/schema/Create.tsx

@@ -67,6 +67,7 @@ const CreateIndex = (props: {
     m: '4',
     efConstruction: '',
     nlist: '',
+    nbits: '',
     n_trees: '',
     outDegree: '',
     candidatePoolSize: '',
@@ -205,6 +206,7 @@ const CreateIndex = (props: {
       m: '4',
       efConstruction: '',
       nlist: '',
+      nbits: '8', // 8 by default
       n_trees: '',
       out_degree: '',
       candidate_pool_size: '',

+ 5 - 0
client/src/pages/schema/CreateForm.tsx

@@ -86,6 +86,7 @@ const CreateForm = (
     };
 
     const nlist = generateNumberConfig('nlist', 'nlist', 1, 65536);
+    const nbits = generateNumberConfig('nbits', 'nbits', 1, 16);
     const nTrees = generateNumberConfig('nTrees', 'n_trees', 1, 1024);
 
     const M = generateNumberConfig('M', 'M', 4, 64);
@@ -115,6 +116,10 @@ const CreateForm = (
       result.push(nlist);
     }
 
+    if (indexParams.includes('nbits')) {
+      result.push(nbits);
+    }
+
     if (indexParams.includes('M')) {
       result.push(M);
     }