From b80329db85d4ff3d0a8f92f5acbed710d8e46f81 Mon Sep 17 00:00:00 2001 From: PahudPlus Date: Tue, 30 Jun 2020 11:22:56 +0800 Subject: [PATCH] PR #551 --- site/en/guides/milvus_operation.md | 10 +++++----- site/en/menuStructure/en.json | 12 ++++++------ site/zh-CN/guides/milvus_operation.md | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/site/en/guides/milvus_operation.md b/site/en/guides/milvus_operation.md index bbbcd9300..d28eb114e 100644 --- a/site/en/guides/milvus_operation.md +++ b/site/en/guides/milvus_operation.md @@ -140,7 +140,7 @@ Currently, a collection only supports one index type, and switching the index ty ```python >>> import random # Generate 20 vectors of 256 dimension - >>> vectors = [[random.random() for _ in range(dim)] for _ in range(20)] + >>> vectors = [[random.random() for _ in range(256)] for _ in range(20)] ``` 2. Insert the list of vectors. If you do not specify vector ids, Milvus automatically generates IDs for the vectors. @@ -224,8 +224,8 @@ A segment is a data file that Milvus automatically creates by merging inserted v 2. Search vectors. ```python - # create 5 vectors of 32-dimension - >>> q_records = [[random.random() for _ in range(dim)] for _ in range(5)] + # create 5 vectors of 256-dimension + >>> q_records = [[random.random() for _ in range(256)] for _ in range(5)] # search vectors >>> milvus.search(collection_name='test01', query_records=q_records, top_k=2, params=search_param) ``` @@ -233,8 +233,8 @@ A segment is a data file that Milvus automatically creates by merging inserted v #### Search vectors in a partition ```python -# create 5 vectors of 32-dimension ->>> q_records = [[random.random() for _ in range(dim)] for _ in range(5)] +# create 5 vectors of 256-dimension +>>> q_records = [[random.random() for _ in range(256)] for _ in range(5)] >>> milvus.search(collection_name='test01', query_records=q_records, top_k=1, partition_tags=['tag01'], params=search_param) ``` diff --git a/site/en/menuStructure/en.json b/site/en/menuStructure/en.json index 71e1ff0e1..c069b7477 100644 --- a/site/en/menuStructure/en.json +++ b/site/en/menuStructure/en.json @@ -1,7 +1,7 @@ { "menuList": [ { - "id": "about_milvus", + "id": "aboutmilvus", "title": "About Milvus", "lang": "en", "label1": "", @@ -14,7 +14,7 @@ "id": "overview.md", "title": "Milvus Overview", "lang": "en", - "label1": "about_milvus", + "label1": "aboutmilvus", "label2": null, "label3": null, "order": 0 @@ -23,7 +23,7 @@ "id": "vector.md", "title": "Feature Vector", "lang": "en", - "label1": "about_milvus", + "label1": "aboutmilvus", "label2": null, "label3": null, "order": 1 @@ -32,7 +32,7 @@ "id": "traditional_db.md", "title": "Traditional Databases", "lang": "en", - "label1": "about_milvus", + "label1": "aboutmilvus", "label2": null, "label3": null, "order": 2 @@ -41,7 +41,7 @@ "id": "index_method.md", "title": "Vector Search Methods", "lang": "en", - "label1": "about_milvus", + "label1": "aboutmilvus", "label2": null, "label3": null, "order": 3 @@ -50,7 +50,7 @@ "id": "vector_db.md", "title": "Other Feature Vector Search Tools", "lang": "en", - "label1": "about_milvus", + "label1": "aboutmilvus", "label2": null, "label3": null, "order": 4 diff --git a/site/zh-CN/guides/milvus_operation.md b/site/zh-CN/guides/milvus_operation.md index 82b29d750..d76f3a134 100644 --- a/site/zh-CN/guides/milvus_operation.md +++ b/site/zh-CN/guides/milvus_operation.md @@ -133,7 +133,7 @@ sidebar_label: Learn Milvus Operations ```python >>> import random # Generate 20 vectors of 256 dimension - >>> vectors = [[random.random() for _ in range(dim)] for _ in range(20)] + >>> vectors = [[random.random() for _ in range(256)] for _ in range(20)] ``` 2. 插入向量列表。如果你不指定向量 ID,Milvus 自动为向量分配 ID。 @@ -227,16 +227,16 @@ Segment 是 Milvus 自动将插入的向量数据合并所获得的数据文件 2. 创建随机向量作为 `query_records` 进行搜索。 ```python - # create 5 vectors of 32-dimension - >>> q_records = [[random.random() for _ in range(dim)] for _ in range(5)] + # create 5 vectors of 256-dimension + >>> q_records = [[random.random() for _ in range(256)] for _ in range(5)] >>> milvus.search(collection_name='test01', query_records=q_records, top_k=2, params=search_param) ``` #### 在分区中搜索向量 ```python -# create 5 vectors of 32-dimension ->>> q_records = [[random.random() for _ in range(dim)] for _ in range(5)] +# create 5 vectors of 256-dimension +>>> q_records = [[random.random() for _ in range(256)] for _ in range(5)] >>> milvus.search(collection_name='test01', query_records=q_records, top_k=1, partition_tags=['tag01'], params=search_param) ```