From c6ab37a3bdfec317a1a04e9a8321bbe46555e8fc Mon Sep 17 00:00:00 2001 From: Milvus-doc-bot Date: Mon, 23 Dec 2024 13:01:34 +0000 Subject: [PATCH] Generate en docs --- .../de/adminGuide/config_jaeger_tracing.md | 4 +- .../v2.4.x/site/de/menuStructure/de.json | 4 +- .../en/adminGuide/config_jaeger_tracing.md | 2 +- .../es/adminGuide/config_jaeger_tracing.md | 4 +- .../v2.4.x/site/es/menuStructure/es.json | 4 +- .../fr/adminGuide/config_jaeger_tracing.md | 2 +- .../v2.4.x/site/fr/menuStructure/fr.json | 2 +- .../it/adminGuide/config_jaeger_tracing.md | 10 +- .../v2.4.x/site/it/menuStructure/it.json | 2 +- .../ja/adminGuide/config_jaeger_tracing.md | 2 +- .../ko/adminGuide/config_jaeger_tracing.md | 2 +- .../pt/adminGuide/config_jaeger_tracing.md | 4 +- .../zh/adminGuide/config_jaeger_tracing.md | 8 +- .../de/adminGuide/config_jaeger_tracing.md | 2 +- .../site/de/adminGuide/configure-docker.json | 2 +- .../site/de/adminGuide/configure-docker.md | 10 +- .../site/de/adminGuide/drop_users_roles.json | 1 + .../site/de/adminGuide/drop_users_roles.md | 205 +++++++ .../site/de/adminGuide/grant_privileges.json | 1 + .../site/de/adminGuide/grant_privileges.md | 543 +++++++++++++++++ .../site/de/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/de/adminGuide/grant_roles.md | 205 +++++++ .../site/de/adminGuide/privilege_group.json | 1 + .../site/de/adminGuide/privilege_group.md | 491 ++++++++++++++++ .../v2.5.x/site/de/adminGuide/rbac.json | 2 +- .../v2.5.x/site/de/adminGuide/rbac.md | 247 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 20 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 10 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 26 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 6 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 30 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 24 +- .../site/de/adminGuide/users_and_roles.json | 1 + .../site/de/adminGuide/users_and_roles.md | 261 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 2 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 8 +- .../v2.5.x/site/de/menuStructure/de.json | 108 +++- .../v2.5.x/site/de/release_notes.json | 2 +- localization/v2.5.x/site/de/release_notes.md | 29 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/de/userGuide/schema/string.md | 8 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 137 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 237 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 147 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 155 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 123 ++++ .../site/de/userGuide/tools/milvus-webui.json | 1 + .../site/de/userGuide/tools/milvus-webui.md | 280 +++++++++ .../en/adminGuide/config_jaeger_tracing.md | 2 +- .../site/en/adminGuide/configure-docker.json | 2 +- .../site/en/adminGuide/configure-docker.md | 8 +- .../site/en/adminGuide/drop_users_roles.json | 1 + .../site/en/adminGuide/drop_users_roles.md | 220 +++++++ .../site/en/adminGuide/grant_privileges.json | 1 + .../site/en/adminGuide/grant_privileges.md | 556 ++++++++++++++++++ .../site/en/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/en/adminGuide/grant_roles.md | 215 +++++++ .../site/en/adminGuide/privilege_group.json | 1 + .../site/en/adminGuide/privilege_group.md | 513 ++++++++++++++++ .../v2.5.x/site/en/adminGuide/rbac.json | 2 +- .../v2.5.x/site/en/adminGuide/rbac.md | 248 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 20 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 10 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 20 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 6 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 26 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 20 +- .../site/en/adminGuide/users_and_roles.json | 1 + .../site/en/adminGuide/users_and_roles.md | 280 +++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 2 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 4 +- .../v2.5.x/site/en/menuStructure/en.json | 108 +++- .../v2.5.x/site/en/release_notes.json | 2 +- localization/v2.5.x/site/en/release_notes.md | 11 +- .../v2.5.x/site/en/userGuide/schema/string.md | 4 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 136 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 236 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 146 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 154 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 121 ++++ .../site/en/userGuide/tools/milvus-webui.json | 1 + .../site/en/userGuide/tools/milvus-webui.md | 295 ++++++++++ .../es/adminGuide/config_jaeger_tracing.md | 4 +- .../site/es/adminGuide/configure-docker.json | 2 +- .../site/es/adminGuide/configure-docker.md | 8 +- .../site/es/adminGuide/drop_users_roles.json | 1 + .../site/es/adminGuide/drop_users_roles.md | 205 +++++++ .../site/es/adminGuide/grant_privileges.json | 1 + .../site/es/adminGuide/grant_privileges.md | 542 +++++++++++++++++ .../site/es/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/es/adminGuide/grant_roles.md | 204 +++++++ .../site/es/adminGuide/privilege_group.json | 1 + .../site/es/adminGuide/privilege_group.md | 491 ++++++++++++++++ .../v2.5.x/site/es/adminGuide/rbac.json | 2 +- .../v2.5.x/site/es/adminGuide/rbac.md | 247 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 20 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 16 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 22 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 8 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 28 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 24 +- .../site/es/adminGuide/users_and_roles.json | 1 + .../site/es/adminGuide/users_and_roles.md | 261 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 2 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 6 +- .../v2.5.x/site/es/menuStructure/es.json | 112 +++- .../v2.5.x/site/es/release_notes.json | 2 +- localization/v2.5.x/site/es/release_notes.md | 13 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/es/userGuide/schema/string.md | 4 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 137 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 237 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 147 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 156 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 122 ++++ .../site/es/userGuide/tools/milvus-webui.json | 1 + .../site/es/userGuide/tools/milvus-webui.md | 279 +++++++++ .../fr/adminGuide/config_jaeger_tracing.md | 2 +- .../site/fr/adminGuide/configure-docker.json | 2 +- .../site/fr/adminGuide/configure-docker.md | 8 +- .../site/fr/adminGuide/drop_users_roles.json | 1 + .../site/fr/adminGuide/drop_users_roles.md | 205 +++++++ .../site/fr/adminGuide/grant_privileges.json | 1 + .../site/fr/adminGuide/grant_privileges.md | 543 +++++++++++++++++ .../site/fr/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/fr/adminGuide/grant_roles.md | 204 +++++++ .../site/fr/adminGuide/privilege_group.json | 1 + .../site/fr/adminGuide/privilege_group.md | 491 ++++++++++++++++ .../v2.5.x/site/fr/adminGuide/rbac.json | 2 +- .../v2.5.x/site/fr/adminGuide/rbac.md | 247 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 20 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 12 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 22 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 8 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 30 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 24 +- .../site/fr/adminGuide/users_and_roles.json | 1 + .../site/fr/adminGuide/users_and_roles.md | 261 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 4 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 6 +- .../v2.5.x/site/fr/menuStructure/fr.json | 110 +++- .../v2.5.x/site/fr/release_notes.json | 2 +- localization/v2.5.x/site/fr/release_notes.md | 11 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/fr/userGuide/schema/string.md | 4 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 137 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 237 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 148 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 156 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 123 ++++ .../site/fr/userGuide/tools/milvus-webui.json | 1 + .../site/fr/userGuide/tools/milvus-webui.md | 280 +++++++++ .../it/adminGuide/config_jaeger_tracing.md | 8 +- .../site/it/adminGuide/configure-docker.json | 2 +- .../site/it/adminGuide/configure-docker.md | 14 +- .../site/it/adminGuide/drop_users_roles.json | 1 + .../site/it/adminGuide/drop_users_roles.md | 205 +++++++ .../site/it/adminGuide/grant_privileges.json | 1 + .../site/it/adminGuide/grant_privileges.md | 542 +++++++++++++++++ .../site/it/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/it/adminGuide/grant_roles.md | 204 +++++++ .../site/it/adminGuide/privilege_group.json | 1 + .../site/it/adminGuide/privilege_group.md | 491 ++++++++++++++++ .../v2.5.x/site/it/adminGuide/rbac.json | 2 +- .../v2.5.x/site/it/adminGuide/rbac.md | 247 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 20 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 18 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 22 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 10 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 38 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 22 +- .../site/it/adminGuide/users_and_roles.json | 1 + .../site/it/adminGuide/users_and_roles.md | 261 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 2 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 8 +- .../v2.5.x/site/it/menuStructure/it.json | 112 +++- .../v2.5.x/site/it/release_notes.json | 2 +- localization/v2.5.x/site/it/release_notes.md | 19 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/it/userGuide/schema/string.md | 8 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 136 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 236 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 147 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 156 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 122 ++++ .../site/it/userGuide/tools/milvus-webui.json | 1 + .../site/it/userGuide/tools/milvus-webui.md | 280 +++++++++ .../ja/adminGuide/config_jaeger_tracing.md | 2 +- .../site/ja/adminGuide/configure-docker.json | 2 +- .../site/ja/adminGuide/configure-docker.md | 8 +- .../site/ja/adminGuide/drop_users_roles.json | 1 + .../site/ja/adminGuide/drop_users_roles.md | 202 +++++++ .../site/ja/adminGuide/grant_privileges.json | 1 + .../site/ja/adminGuide/grant_privileges.md | 540 +++++++++++++++++ .../site/ja/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/ja/adminGuide/grant_roles.md | 200 +++++++ .../site/ja/adminGuide/privilege_group.json | 1 + .../site/ja/adminGuide/privilege_group.md | 489 +++++++++++++++ .../v2.5.x/site/ja/adminGuide/rbac.json | 2 +- .../v2.5.x/site/ja/adminGuide/rbac.md | 245 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 22 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 20 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 20 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 8 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 36 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 20 +- .../site/ja/adminGuide/users_and_roles.json | 1 + .../site/ja/adminGuide/users_and_roles.md | 256 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 4 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 6 +- .../v2.5.x/site/ja/menuStructure/ja.json | 114 +++- .../v2.5.x/site/ja/release_notes.json | 2 +- localization/v2.5.x/site/ja/release_notes.md | 13 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 10 +- .../v2.5.x/site/ja/userGuide/schema/string.md | 4 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 134 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 232 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 142 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 149 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 118 ++++ .../site/ja/userGuide/tools/milvus-webui.json | 1 + .../site/ja/userGuide/tools/milvus-webui.md | 279 +++++++++ .../ko/adminGuide/config_jaeger_tracing.md | 2 +- .../site/ko/adminGuide/configure-docker.json | 2 +- .../site/ko/adminGuide/configure-docker.md | 8 +- .../site/ko/adminGuide/drop_users_roles.json | 1 + .../site/ko/adminGuide/drop_users_roles.md | 204 +++++++ .../site/ko/adminGuide/grant_privileges.json | 1 + .../site/ko/adminGuide/grant_privileges.md | 540 +++++++++++++++++ .../site/ko/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/ko/adminGuide/grant_roles.md | 202 +++++++ .../site/ko/adminGuide/privilege_group.json | 1 + .../site/ko/adminGuide/privilege_group.md | 489 +++++++++++++++ .../v2.5.x/site/ko/adminGuide/rbac.json | 2 +- .../v2.5.x/site/ko/adminGuide/rbac.md | 245 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 24 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 14 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 20 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 6 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 32 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 20 +- .../site/ko/adminGuide/users_and_roles.json | 1 + .../site/ko/adminGuide/users_and_roles.md | 258 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 4 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 10 +- .../v2.5.x/site/ko/menuStructure/ko.json | 112 +++- .../v2.5.x/site/ko/release_notes.json | 2 +- localization/v2.5.x/site/ko/release_notes.md | 19 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/ko/userGuide/schema/string.md | 8 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 134 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 234 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 144 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 152 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 119 ++++ .../site/ko/userGuide/tools/milvus-webui.json | 1 + .../site/ko/userGuide/tools/milvus-webui.md | 279 +++++++++ .../pt/adminGuide/config_jaeger_tracing.md | 2 +- .../site/pt/adminGuide/configure-docker.json | 2 +- .../site/pt/adminGuide/configure-docker.md | 12 +- .../site/pt/adminGuide/drop_users_roles.json | 1 + .../site/pt/adminGuide/drop_users_roles.md | 205 +++++++ .../site/pt/adminGuide/grant_privileges.json | 1 + .../site/pt/adminGuide/grant_privileges.md | 543 +++++++++++++++++ .../site/pt/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/pt/adminGuide/grant_roles.md | 204 +++++++ .../site/pt/adminGuide/privilege_group.json | 1 + .../site/pt/adminGuide/privilege_group.md | 491 ++++++++++++++++ .../v2.5.x/site/pt/adminGuide/rbac.json | 2 +- .../v2.5.x/site/pt/adminGuide/rbac.md | 247 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 26 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 16 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 32 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 14 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 42 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 26 +- .../site/pt/adminGuide/users_and_roles.json | 1 + .../site/pt/adminGuide/users_and_roles.md | 261 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 4 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 12 +- .../v2.5.x/site/pt/menuStructure/pt.json | 108 +++- .../v2.5.x/site/pt/release_notes.json | 2 +- localization/v2.5.x/site/pt/release_notes.md | 21 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/pt/userGuide/schema/string.md | 6 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 137 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 237 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 147 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 155 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 122 ++++ .../site/pt/userGuide/tools/milvus-webui.json | 1 + .../site/pt/userGuide/tools/milvus-webui.md | 279 +++++++++ .../zh/adminGuide/config_jaeger_tracing.md | 4 +- .../site/zh/adminGuide/configure-docker.json | 2 +- .../site/zh/adminGuide/configure-docker.md | 8 +- .../site/zh/adminGuide/drop_users_roles.json | 1 + .../site/zh/adminGuide/drop_users_roles.md | 202 +++++++ .../site/zh/adminGuide/grant_privileges.json | 1 + .../site/zh/adminGuide/grant_privileges.md | 540 +++++++++++++++++ .../site/zh/adminGuide/grant_roles.json | 1 + .../v2.5.x/site/zh/adminGuide/grant_roles.md | 200 +++++++ .../site/zh/adminGuide/privilege_group.json | 1 + .../site/zh/adminGuide/privilege_group.md | 489 +++++++++++++++ .../v2.5.x/site/zh/adminGuide/rbac.json | 2 +- .../v2.5.x/site/zh/adminGuide/rbac.md | 245 +------- .../upgrade_milvus_cluster-docker.json | 2 +- .../upgrade_milvus_cluster-docker.md | 22 +- .../upgrade_milvus_cluster-helm.json | 2 +- .../adminGuide/upgrade_milvus_cluster-helm.md | 14 +- .../upgrade_milvus_cluster-operator.json | 2 +- .../upgrade_milvus_cluster-operator.md | 24 +- .../upgrade_milvus_standalone-docker.json | 2 +- .../upgrade_milvus_standalone-docker.md | 6 +- .../upgrade_milvus_standalone-helm.json | 2 +- .../upgrade_milvus_standalone-helm.md | 36 +- .../upgrade_milvus_standalone-operator.json | 2 +- .../upgrade_milvus_standalone-operator.md | 26 +- .../site/zh/adminGuide/users_and_roles.json | 1 + .../site/zh/adminGuide/users_and_roles.md | 258 ++++++++ .../install_standalone-docker-compose.json | 2 +- .../install_standalone-docker-compose.md | 2 +- ...install_standalone-docker-compose-gpu.json | 2 +- .../install_standalone-docker-compose-gpu.md | 4 +- .../v2.5.x/site/zh/menuStructure/zh.json | 108 +++- .../v2.5.x/site/zh/release_notes.json | 2 +- localization/v2.5.x/site/zh/release_notes.md | 27 +- .../collections/modify-collection.json | 2 +- .../collections/modify-collection.md | 8 +- .../v2.5.x/site/zh/userGuide/schema/string.md | 4 +- .../boolean/array-operators.json | 1 + .../boolean/array-operators.md | 134 +++++ .../boolean/basic-operators.json | 1 + .../boolean/basic-operators.md | 233 ++++++++ .../search-query-get/boolean/boolean.json | 1 + .../search-query-get/boolean/boolean.md | 143 +++++ .../boolean/filtering-templating.json | 1 + .../boolean/filtering-templating.md | 150 +++++ .../boolean/json-operators.json | 1 + .../boolean/json-operators.md | 117 ++++ .../site/zh/userGuide/tools/milvus-webui.json | 1 + .../site/zh/userGuide/tools/milvus-webui.md | 277 +++++++++ tools/cache.json | 47 +- 453 files changed, 27173 insertions(+), 3058 deletions(-) create mode 100644 localization/v2.5.x/site/de/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/de/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/de/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/de/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/de/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/de/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/de/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/de/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/de/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/de/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/de/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/de/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/en/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/en/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/en/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/en/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/en/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/en/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/en/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/en/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/en/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/en/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/en/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/en/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/es/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/es/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/es/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/es/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/es/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/es/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/es/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/es/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/es/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/es/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/es/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/es/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/fr/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/fr/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/fr/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/fr/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/fr/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/fr/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/fr/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/fr/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/fr/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/fr/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/it/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/it/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/it/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/it/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/it/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/it/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/it/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/it/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/it/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/it/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/it/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/it/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/ja/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/ja/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/ja/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/ja/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/ja/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/ja/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/ja/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/ja/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/ja/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/ja/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/ko/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/ko/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/ko/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/ko/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/ko/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/ko/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/ko/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/ko/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/ko/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/ko/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/pt/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/pt/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/pt/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/pt/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/pt/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/pt/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/pt/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/pt/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/pt/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/pt/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.md create mode 100644 localization/v2.5.x/site/zh/adminGuide/drop_users_roles.json create mode 100644 localization/v2.5.x/site/zh/adminGuide/drop_users_roles.md create mode 100644 localization/v2.5.x/site/zh/adminGuide/grant_privileges.json create mode 100644 localization/v2.5.x/site/zh/adminGuide/grant_privileges.md create mode 100644 localization/v2.5.x/site/zh/adminGuide/grant_roles.json create mode 100644 localization/v2.5.x/site/zh/adminGuide/grant_roles.md create mode 100644 localization/v2.5.x/site/zh/adminGuide/privilege_group.json create mode 100644 localization/v2.5.x/site/zh/adminGuide/privilege_group.md create mode 100644 localization/v2.5.x/site/zh/adminGuide/users_and_roles.json create mode 100644 localization/v2.5.x/site/zh/adminGuide/users_and_roles.md create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/array-operators.json create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/array-operators.md create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.json create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.md create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.json create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.md create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.json create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.md create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.json create mode 100644 localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.md create mode 100644 localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.json create mode 100644 localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.md diff --git a/localization/v2.4.x/site/de/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/de/adminGuide/config_jaeger_tracing.md index 06b499365..24243813c 100644 --- a/localization/v2.4.x/site/de/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.4.x/site/de/adminGuide/config_jaeger_tracing.md @@ -61,13 +61,13 @@ summary: >-
$ kubectl create namespace observability
 $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.62.0/jaeger-operator.yaml -n observability
 
-

Zu diesem Zeitpunkt sollte eine jaeger-operator Bereitstellung verfügbar sein. Sie können es mit folgendem Befehl anzeigen:

+

Zu diesem Zeitpunkt sollte eine jaeger-operator Bereitstellung verfügbar sein. Sie können es mit dem folgenden Befehl anzeigen:

$ kubectl get deployment jaeger-operator -n observability
 
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. Jager bereitstellen

Der einfachste Weg, eine Jaeger-Instanz zu erstellen, ist die Erstellung einer YAML-Datei wie im folgenden Beispiel. Dadurch wird die standardmäßige AllInOne-Strategie installiert, die das All-In-One-Image (eine Kombination aus Jaeger-Agent, Jaeger-Collector, Jaeger-Query und Jaeger-UI) in einem einzigen Pod bereitstellt und standardmäßig In-Memory-Speicher verwendet.

+

2. Jaeger bereitstellen

Der einfachste Weg, eine Jaeger-Instanz zu erstellen, ist die Erstellung einer YAML-Datei wie im folgenden Beispiel. Dadurch wird die standardmäßige AllInOne-Strategie installiert, die das All-In-One-Image (eine Kombination aus Jaeger-Agent, Jaeger-Collector, Jaeger-Query und Jaeger-UI) in einem einzigen Pod bereitstellt und standardmäßig In-Memory-Speicher verwendet.

Wenn Sie Traces über einen längeren Zeitraum speichern möchten, lesen Sie bitte production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
diff --git a/localization/v2.4.x/site/de/menuStructure/de.json b/localization/v2.4.x/site/de/menuStructure/de.json
index 163976596..e82bf12ab 100644
--- a/localization/v2.4.x/site/de/menuStructure/de.json
+++ b/localization/v2.4.x/site/de/menuStructure/de.json
@@ -527,7 +527,7 @@
             "children": []
           },
           {
-            "label": "Satz-Transformatoren",
+            "label": "Satzumwandler",
             "id": "embed-with-sentence-transform.md",
             "order": 2,
             "children": []
@@ -1064,7 +1064,7 @@
             "children": []
           },
           {
-            "label": "RBAC aktivieren",
+            "label": "RBAC einschalten",
             "id": "rbac.md",
             "order": 1,
             "isMenu": true,
diff --git a/localization/v2.4.x/site/en/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/en/adminGuide/config_jaeger_tracing.md
index 4af7a0f22..7145dd88f 100644
--- a/localization/v2.4.x/site/en/adminGuide/config_jaeger_tracing.md
+++ b/localization/v2.4.x/site/en/adminGuide/config_jaeger_tracing.md
@@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. Deploy Jager

The simplest possible way to create a Jaeger instance is by creating a YAML file like the following example. This will install the default AllInOne strategy, which deploys the all-in-one image (combining jaeger-agent, jaeger-collector, jaeger-query, and Jaeger UI) in a single pod, using in-memory storage by default.

+

2. Deploy Jaeger

The simplest possible way to create a Jaeger instance is by creating a YAML file like the following example. This will install the default AllInOne strategy, which deploys the all-in-one image (combining jaeger-agent, jaeger-collector, jaeger-query, and Jaeger UI) in a single pod, using in-memory storage by default.

If you want to store traces for a long time, please refer to production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
diff --git a/localization/v2.4.x/site/es/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/es/adminGuide/config_jaeger_tracing.md
index a83053db4..09921628b 100644
--- a/localization/v2.4.x/site/es/adminGuide/config_jaeger_tracing.md
+++ b/localization/v2.4.x/site/es/adminGuide/config_jaeger_tracing.md
@@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. Despliegue de Jager

La forma más sencilla de crear una instancia de Jaeger es crear un archivo YAML como el siguiente ejemplo. Esto instalará la estrategia AllInOne predeterminada, que despliega la imagen todo en uno (que combina jaeger-agent, jaeger-collector, jaeger-query y Jaeger UI) en un único pod, utilizando almacenamiento en memoria de forma predeterminada.

+

2. Despliegue de Jaeger

La forma más sencilla de crear una instancia de Jaeger es crear un archivo YAML como el siguiente ejemplo. Esto instalará la estrategia AllInOne predeterminada, que despliega la imagen todo en uno (que combina jaeger-agent, jaeger-collector, jaeger-query y Jaeger UI) en un único pod, utilizando almacenamiento en memoria de forma predeterminada.

Si desea almacenar trazas durante mucho tiempo, consulte production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
@@ -136,7 +136,7 @@ $ helm upgrade --install -f values.yaml my-release milvus/milvus
 NAME           CLASS    HOSTS   ADDRESS         PORTS   AGE
 jaeger-query   <none>   *       192.168.122.34  80      14m
 
-

Una vez que el ingress está disponible, puede acceder a la UI de Jaeger navegando a http://${ADDRESS}. Reemplace ${ADDRESS} con la dirección IP real del ingress.

+

Una vez que el ingress está disponible, puede acceder a la UI de Jaeger navegando a http://${ADDRESS}. Sustituya ${ADDRESS} por la dirección IP real de la entrada.

La siguiente captura de pantalla muestra la UI de Jaeger con las trazas de Milvus durante una operación de búsqueda y una operación de recogida de carga:

diff --git a/localization/v2.4.x/site/es/menuStructure/es.json b/localization/v2.4.x/site/es/menuStructure/es.json index d58607a84..5111e4bfd 100644 --- a/localization/v2.4.x/site/es/menuStructure/es.json +++ b/localization/v2.4.x/site/es/menuStructure/es.json @@ -1124,7 +1124,7 @@ "order": 1, "children": [ { - "label": "Overview", + "label": "Visión general", "id": "milvus_backup_overview.md", "order": 0, "children": [] @@ -1136,7 +1136,7 @@ "children": [] }, { - "label": "RESTful API", + "label": "API RESTful", "id": "milvus_backup_api.md", "order": 2, "children": [] diff --git a/localization/v2.4.x/site/fr/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/fr/adminGuide/config_jaeger_tracing.md index 6a102d4a9..8344bbae0 100644 --- a/localization/v2.4.x/site/fr/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.4.x/site/fr/adminGuide/config_jaeger_tracing.md @@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s -

2. Déployer Jager

La manière la plus simple de créer une instance de Jaeger est de créer un fichier YAML comme dans l'exemple suivant. Cela installera la stratégie AllInOne par défaut, qui déploie l'image tout-en-un (combinant jaeger-agent, jaeger-collector, jaeger-query, et Jaeger UI) dans un seul pod, en utilisant le stockage en mémoire par défaut.

+

2. Déployer Jaeger

La manière la plus simple de créer une instance de Jaeger est de créer un fichier YAML comme dans l'exemple suivant. Cela installera la stratégie AllInOne par défaut, qui déploie l'image tout-en-un (combinant jaeger-agent, jaeger-collector, jaeger-query, et Jaeger UI) dans un seul pod, en utilisant le stockage en mémoire par défaut.

Si vous souhaitez stocker des traces pendant une longue période, veuillez vous référer à production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
diff --git a/localization/v2.4.x/site/fr/menuStructure/fr.json b/localization/v2.4.x/site/fr/menuStructure/fr.json
index 5f3c32621..a32369323 100644
--- a/localization/v2.4.x/site/fr/menuStructure/fr.json
+++ b/localization/v2.4.x/site/fr/menuStructure/fr.json
@@ -1451,7 +1451,7 @@
             "children": []
           },
           {
-            "label": "PrivateGPT",
+            "label": "PrivéGPT",
             "id": "use_milvus_in_private_gpt.md",
             "order": 10,
             "children": []
diff --git a/localization/v2.4.x/site/it/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/it/adminGuide/config_jaeger_tracing.md
index 54386c1f7..37931b44c 100644
--- a/localization/v2.4.x/site/it/adminGuide/config_jaeger_tracing.md
+++ b/localization/v2.4.x/site/it/adminGuide/config_jaeger_tracing.md
@@ -21,7 +21,7 @@ summary: >-
           d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
         >
       
-    

Questa guida fornisce istruzioni su come configurare Jaeger per raccogliere le tracce per Milvus.

+

Questa guida fornisce istruzioni su come configurare Jaeger per raccogliere tracce per Milvus.

Prerequisiti

-

A questo punto, dovrebbe essere disponibile una distribuzione jaeger-operator. È possibile visualizzarlo eseguendo il seguente comando:

+

A questo punto, dovrebbe essere disponibile un deployment jaeger-operator. È possibile visualizzarlo eseguendo il seguente comando:

$ kubectl get deployment jaeger-operator -n observability
 
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. Distribuire Jager

Il modo più semplice per creare un'istanza di Jaeger è creare un file YAML come nell'esempio seguente. Questo installerà la strategia AllInOne predefinita, che distribuisce l'immagine all-in-one (che combina jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) in un singolo pod, utilizzando per impostazione predefinita lo storage in-memory.

+

2. Distribuire Jaeger

Il modo più semplice per creare un'istanza di Jaeger è creare un file YAML come nell'esempio seguente. Questo installerà la strategia AllInOne predefinita, che distribuisce l'immagine all-in-one (che combina jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) in un singolo pod, utilizzando per impostazione predefinita lo storage in-memory.

Se si desidera memorizzare le tracce per un lungo periodo, fare riferimento a production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
@@ -136,7 +136,7 @@ $ helm upgrade --install -f values.yaml my-release milvus/milvus
 NAME           CLASS    HOSTS   ADDRESS         PORTS   AGE
 jaeger-query   <none>   *       192.168.122.34  80      14m
 
-

Una volta che l'ingress è disponibile, è possibile accedere all'interfaccia utente di Jaeger navigando su http://${ADDRESS}. Sostituire ${ADDRESS} con l'indirizzo IP effettivo dell'ingress.

+

Una volta che l'ingress è disponibile, si può accedere all'interfaccia utente di Jaeger navigando su http://${ADDRESS}. Sostituire ${ADDRESS} con l'indirizzo IP effettivo dell'ingress.

La seguente schermata mostra l'interfaccia Jaeger con le tracce di Milvus durante un'operazione di ricerca e un'operazione di raccolta del carico:

@@ -145,4 +145,4 @@ jaeger-query <none> * 192.168 Trace Load Collection Request - Richiesta di raccolta del carico

+ Traccia della richiesta di raccolta del carico

diff --git a/localization/v2.4.x/site/it/menuStructure/it.json b/localization/v2.4.x/site/it/menuStructure/it.json index a2b4831eb..690adea8e 100644 --- a/localization/v2.4.x/site/it/menuStructure/it.json +++ b/localization/v2.4.x/site/it/menuStructure/it.json @@ -1717,7 +1717,7 @@ "children": [] }, { - "label": "Ricerca di somiglianza audio", + "label": "Ricerca della somiglianza audio", "id": "audio_similarity_search.md", "order": 8, "children": [] diff --git a/localization/v2.4.x/site/ja/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/ja/adminGuide/config_jaeger_tracing.md index c97e40ab3..f6c47b1aa 100644 --- a/localization/v2.4.x/site/ja/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.4.x/site/ja/adminGuide/config_jaeger_tracing.md @@ -65,7 +65,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
-

2.Jagerのデプロイ

Jagerインスタンスを作成する最も簡単な方法は、次の例のようなYAMLファイルを作成することです。これはデフォルトのAllInOneストラテジーをインストールし、オールインワンイメージ(jaeger-agentjaeger-collectorjaeger-query、Jaeger UIを組み合わせたもの)を単一のポッドにデプロイします。

+

2.Jaegerのデプロイ

Jaegerインスタンスを作成する最もシンプルな方法は、次の例のようなYAMLファイルを作成することです。これはデフォルトのAllInOneストラテジーをインストールし、オールインワンイメージ(jaeger-agentjaeger-collectorjaeger-query、Jaeger UIを組み合わせたもの)を単一のポッドにデプロイします。

トレースを長期間保存したい場合は、production-strategyを参照してください。

apiVersion: jaegertracing.io/v1
 kind: Jaeger
diff --git a/localization/v2.4.x/site/ko/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/ko/adminGuide/config_jaeger_tracing.md
index e7d4d89f0..a2bf6d061 100644
--- a/localization/v2.4.x/site/ko/adminGuide/config_jaeger_tracing.md
+++ b/localization/v2.4.x/site/ko/adminGuide/config_jaeger_tracing.md
@@ -65,7 +65,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. 예거 배포

예거 인스턴스를 만드는 가장 간단한 방법은 다음 예제와 같이 YAML 파일을 만드는 것입니다. 이렇게 하면 기본적으로 인메모리 스토리지를 사용하여 단일 포드에 올인원 이미지(예거 에이전트, 예거 수집기, 예거 쿼리 및 예거 UI를 결합)를 배포하는 기본 올인원 전략이 설치됩니다.

+

2. 예거 배포

예거 인스턴스를 만드는 가장 간단한 방법은 다음 예제와 같이 YAML 파일을 만드는 것입니다. 이렇게 하면 기본적으로 인메모리 스토리지를 사용하여 단일 포드에 올인원 이미지(예거 에이전트, 예거 수집기, 예거 쿼리 및 예거 UI를 결합)를 배포하는 기본 AllInOne 전략이 설치됩니다.

추적을 장기간 저장하려면 프로덕션 전략을 참조하세요.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
diff --git a/localization/v2.4.x/site/pt/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/pt/adminGuide/config_jaeger_tracing.md
index c13e1a5ff..75d695cda 100644
--- a/localization/v2.4.x/site/pt/adminGuide/config_jaeger_tracing.md
+++ b/localization/v2.4.x/site/pt/adminGuide/config_jaeger_tracing.md
@@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. Implantar o Jager

A maneira mais simples possível de criar uma instância do Jaeger é criando um arquivo YAML como o exemplo a seguir. Isso instalará a estratégia AllInOne padrão, que implanta a imagem all-in-one (combinando jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) em um único pod, usando o armazenamento na memória por padrão.

+

2. Implantar o Jaeger

A maneira mais simples possível de criar uma instância do Jaeger é criando um arquivo YAML como o exemplo a seguir. Isso instalará a estratégia AllInOne padrão, que implanta a imagem all-in-one (combinando jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) em um único pod, usando o armazenamento na memória por padrão.

Se você quiser armazenar traços por um longo tempo, consulte production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
@@ -137,7 +137,7 @@ NAME           CLASS    HOSTS   ADDRESS         PORTS   AGE
 jaeger-query   <none>   *       192.168.122.34  80      14m
 

Quando o ingresso estiver disponível, você poderá acessar a interface do usuário do Jaeger navegando até http://${ADDRESS}. Substitua ${ADDRESS} pelo endereço IP real do ingress.

-

A seguinte captura de ecrã mostra a interface do utilizador do Jaeger com os vestígios do Milvus durante uma operação de pesquisa e uma operação de recolha de carga:

+

A seguinte captura de ecrã mostra a interface do utilizador do Jaeger com os traços do Milvus durante uma operação de pesquisa e uma operação de recolha de carga:

Trace Search Request diff --git a/localization/v2.4.x/site/zh/adminGuide/config_jaeger_tracing.md b/localization/v2.4.x/site/zh/adminGuide/config_jaeger_tracing.md index 8cc6c76a0..302d0f7d8 100644 --- a/localization/v2.4.x/site/zh/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.4.x/site/zh/adminGuide/config_jaeger_tracing.md @@ -2,7 +2,7 @@ id: config_jaeger_tracing.md title: 配置跟踪 related_key: 'Jaeger, Milvus, Trace' -summary: 本指南提供了如何配置 Jaeger 以收集 Milvus 跟踪信息的说明。 +summary: 本指南介绍了如何配置 Jaeger 为 Milvus 收集跟踪信息。 ---

配置跟踪

部署 Jaeger -

2.部署 Jager

创建 Jaeger 实例的最简单方法是创建一个 YAML 文件,如下所示。这将安装默认的 AllInOne 策略,在单个 pod 中部署一体化镜像(结合了jaeger-agentsjaeger-collectorjaeger -query 和 Jaeger UI),默认使用内存存储

-

如果想长期存储跟踪信息,请参考生产策略

+

2.部署 Jaeger

创建 Jaeger 实例的最简单方法是创建类似下面示例的 YAML 文件。这将安装默认的 AllInOne 策略,在单个 pod 中部署一体化镜像(结合了jaeger-agentsjaeger-collectorjaeger -query 和 Jaeger UI),默认使用内存存储

+

如果你想长期存储跟踪信息,请参考生产策略

apiVersion: jaegertracing.io/v1
 kind: Jaeger
 metadata:
diff --git a/localization/v2.5.x/site/de/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/de/adminGuide/config_jaeger_tracing.md
index aee102e2c..d00a7c55d 100644
--- a/localization/v2.5.x/site/de/adminGuide/config_jaeger_tracing.md
+++ b/localization/v2.5.x/site/de/adminGuide/config_jaeger_tracing.md
@@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do
 NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
 jaeger-operator   1         1         1            1           48s
 
-

2. Jager bereitstellen

Der einfachste Weg, eine Jaeger-Instanz zu erstellen, ist die Erstellung einer YAML-Datei wie im folgenden Beispiel. Dadurch wird die standardmäßige AllInOne-Strategie installiert, die das All-In-One-Image (eine Kombination aus Jaeger-Agent, Jaeger-Collector, Jaeger-Query und Jaeger-UI) in einem einzigen Pod bereitstellt und standardmäßig In-Memory-Speicher verwendet.

+

2. Jaeger bereitstellen

Der einfachste Weg, eine Jaeger-Instanz zu erstellen, ist die Erstellung einer YAML-Datei wie im folgenden Beispiel. Dadurch wird die standardmäßige AllInOne-Strategie installiert, die das All-In-One-Image (eine Kombination aus Jaeger-Agent, Jaeger-Collector, Jaeger-Query und Jaeger-UI) in einem einzigen Pod bereitstellt und standardmäßig In-Memory-Speicher verwendet.

Wenn Sie Traces über einen längeren Zeitraum speichern möchten, lesen Sie bitte production-strategy.

apiVersion: jaegertracing.io/v1
 kind: Jaeger
diff --git a/localization/v2.5.x/site/de/adminGuide/configure-docker.json b/localization/v2.5.x/site/de/adminGuide/configure-docker.json
index b78d7d357..76358c105 100644
--- a/localization/v2.5.x/site/de/adminGuide/configure-docker.json
+++ b/localization/v2.5.x/site/de/adminGuide/configure-docker.json
@@ -1 +1 @@
-{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Konfigurieren von Milvus mit Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Herunterladen einer Konfigurationsdatei","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Ändern Sie die Konfigurationsdatei","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Download einer Installationsdatei","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Ändern Sie die Installationsdatei","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Starten Sie Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]}
\ No newline at end of file
+{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Konfigurieren von Milvus mit Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Herunterladen einer Konfigurationsdatei","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Ändern Sie die Konfigurationsdatei","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Download einer Installationsdatei","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Ändern Sie die Installationsdatei","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Starten Sie Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]}
\ No newline at end of file
diff --git a/localization/v2.5.x/site/de/adminGuide/configure-docker.md b/localization/v2.5.x/site/de/adminGuide/configure-docker.md
index b5b10da83..10b0ff3ac 100644
--- a/localization/v2.5.x/site/de/adminGuide/configure-docker.md
+++ b/localization/v2.5.x/site/de/adminGuide/configure-docker.md
@@ -20,7 +20,7 @@ title: Konfigurieren von Milvus mit Docker Compose
           d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
         >
       
-    

In diesem Thema wird beschrieben, wie Sie Milvus-Komponenten und die Abhängigkeiten von Drittanbietern mit Docker Compose konfigurieren.

+

In diesem Thema wird beschrieben, wie Sie Milvus-Komponenten und deren Abhängigkeiten von Drittanbietern mit Docker Compose konfigurieren.

In der aktuellen Version werden alle Parameter erst nach einem Neustart von Milvus wirksam.

Herunterladen einer Konfigurationsdatei

Laden Sie milvus.yaml direkt oder mit dem folgenden Befehlherunter.

-
$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
+    

Laden Sie milvus.yaml direkt oder mit dem folgenden Befehlherunter.

+
$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
 

Ändern Sie die Konfigurationsdatei

Laden Sie die Installationsdatei für Milvus standalone herunter und speichern Sie sie als docker-compose.yml.

+

Laden Sie die Installationsdatei für Milvus standalone herunter und speichern Sie sie als docker-compose.yml.

Sie können auch einfach den folgenden Befehl ausführen.

# For Milvus standalone
-$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
+$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
 

Ändern Sie die Installationsdatei

Um die Datensicherheit zu gewährleisten, empfiehlt es sich, nicht mehr benötigte Benutzer und Rollen zu löschen. In dieser Anleitung erfahren Sie, wie Sie Benutzer und Rollen löschen können.

+

Löschen eines Benutzers

Das folgende Beispiel zeigt, wie Sie den Benutzer user_1 löschen können.

+
+

Der Benutzer root kann nicht gelöscht werden.

+
+ +
from pymilvus import MilvusClient​
+​
+client = MilvusClient(​
+    uri="http://localhost:19530",​
+    token="root:Milvus"​
+)​
+​
+# create a user​
+client.drop_user(user_name="user_1")​
+
+
+
import io.milvus.v2.client.ConnectConfig​
+import io.milvus.v2.client.MilvusClientV2​
+import io.milvus.v2.service.rbac.request.DropUserReq​
+​
+ConnectConfig connectConfig = ConnectConfig.builder()​
+        .uri("http://localhost:19530")​
+        .token("root:Milvus")​
+        .build();​
+        ​
+MilvusClientV2 client = new MilvusClientV2(connectConfig);​
+​
+DropUserReq dropUserReq = DropUserReq.builder()​
+        .userName("user_1")​
+        .build();​
+client.dropUser(dropUserReq);​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+const address = "http://localhost:19530";​
+const token = "root:Milvus";​
+const client = new MilvusClient({address, token});​
+​
+milvusClient.deleteUser({​
+    username: 'user_1'​
+})​
+
+
+
export CLUSTER_ENDPOINT="http://localhost:19530"​
+export TOKEN="root:Milvus"​
+​
+curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "userName": "user_1"​
+}'​
+
+
+

Sobald der Benutzer gelöscht wurde, können Sie alle vorhandenen Benutzer auflisten, um zu überprüfen, ob der Löschvorgang erfolgreich war.

+ +
from pymilvus import MilvusClient​
+​
+client.list_users()​
+
+
+
import io.milvus.v2.service.rbac.request.listUsersReq​
+​
+List<String> resp = client.listUsers();​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+milvusClient.listUsers()​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{}'​
+
+
+

Unten sehen Sie eine Beispielausgabe. Es gibt keine user_1 in der Liste. Der Löschvorgang ist erfolgreich.

+
['root']​
+
+
+

Eine Rolle löschen

Das folgende Beispiel zeigt, wie die Rolle role_a gelöscht werden kann.

+
+

Die integrierte Rolle admin kann nicht gelöscht werden.

+
+ +
from pymilvus import MilvusClient​
+​
+client.drop_role(role_name="role_a")​
+
+
+
import io.milvus.v2.service.rbac.request.DropRoleReq​
+​
+DropRoleReq dropRoleReq = DropRoleReq.builder()​
+        .roleName("role_a")​
+        .build();​
+client.dropRole(dropRoleReq);​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+milvusClient.dropRole({​
+   roleName: 'role_a',​
+ })​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "roleName": "role_a"​
+}'​
+
+
+

Sobald die Rolle gelöscht wurde, können Sie alle vorhandenen Rollen auflisten, um zu überprüfen, ob der Löschvorgang erfolgreich war.

+ +
from pymilvus import MilvusClient​
+​
+client.list_roles()​
+
+
+
List<String> resp = client.listRoles();​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+milvusClient.listRoles(​
+    includeUserInfo: True​
+)​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{}'​
+
+
+

Nachfolgend sehen Sie eine Beispielausgabe. Es gibt keine role_a in der Liste. Der Löschvorgang ist erfolgreich.

+
['admin']​
+
+
diff --git a/localization/v2.5.x/site/de/adminGuide/grant_privileges.json b/localization/v2.5.x/site/de/adminGuide/grant_privileges.json new file mode 100644 index 000000000..843773f08 --- /dev/null +++ b/localization/v2.5.x/site/de/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"Rechte oder Rechtegruppen für Rollen erteilen","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"Gewähren Sie einer Rolle ein Recht oder eine Gruppe von Rechten","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"Beschreiben einer Rolle","href":"Describe-a-role","type":2,"isActive":false},{"label":"Entzug eines Privilegs oder einer Privilegiengruppe von einer Rolle","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/grant_privileges.md b/localization/v2.5.x/site/de/adminGuide/grant_privileges.md new file mode 100644 index 000000000..8f069b21f --- /dev/null +++ b/localization/v2.5.x/site/de/adminGuide/grant_privileges.md @@ -0,0 +1,543 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: >- + Sobald eine Rolle erstellt ist, können Sie der Rolle Berechtigungen erteilen. + In diesem Handbuch wird erläutert, wie Sie einer Rolle Rechte oder + Rechtegruppen gewähren. +title: Rechte oder Rechtegruppen für Rollen erteilen +--- +

Rechte oder Rechtegruppen für Rollen erteilen

Sobald eine Rolle erstellt ist, können Sie dieser Rolle Rechte gewähren. In diesem Handbuch wird erläutert, wie Sie einer Rolle Rechte oder Rechtegruppen gewähren.

+

Gewähren Sie einer Rolle ein Recht oder eine Gruppe von Rechten

Milvus 2.5 führt eine neue Version der API ein, die die Erteilungsoperation rationalisiert. Sie müssen nicht mehr den Objekttyp nachschlagen, wenn Sie einer Rolle ein Recht gewähren. Im Folgenden sind die Parameter und die entsprechenden Erklärungen aufgeführt.

+
    +
  • role_name: Der Name der Zielrolle, für die ein oder mehrere Privileg(e) oder eine oder mehrere Privileggruppen gewährt werden sollen.

  • +
  • Ressource: Die Zielressource eines Zugriffsrechts, die eine bestimmte Instanz, Datenbank oder Sammlung sein kann. In der folgenden Tabelle wird erläutert, wie die Ressource in der Methode client.grantV2() anzugeben ist.

  • +
+

Ebene

+

Ressource

+

Gewährung Methode

+

Hinweise

+

Sammlung

+

+

Eine spezifische Sammlung

+

+

client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

+

Geben Sie den Namen Ihrer Zielsammlung und den Namen der Datenbank ein, zu der die Zielsammlung gehört.

+

+

Alle Sammlungen unter einer bestimmten Datenbank

+

client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

+

Geben Sie den Namen Ihrer Zieldatenbank und einen Platzhalter `*` als Sammlungsnamen ein.

+

**Datenbank**

+

Eine bestimmte Datenbank

+

client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

+

Geben Sie den Namen Ihrer Zieldatenbank und einen Platzhalter `*` als Sammlungsnamen ein.

+

+

Alle Datenbanken unter der aktuellen Instanz

+

client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

+

Geben Sie `*` als Datenbanknamen und `*` als Sammlungsnamen ein.

+

**Instanz**

+

Die aktuelle Instanz

+

client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

+

Geben Sie `*` als Namen der Datenbank und `*` als Namen der Sammlung ein.

+
+
    +
  • Privileg: Die spezifische Berechtigung oder Berechtigungsgruppe, die Sie einer Rolle gewähren müssen. Derzeit bietet Milvus 56 Arten von Privilegien, die Sie gewähren können. In der folgenden Tabelle sind die Privilegien in Milvus aufgeführt.

    +

    +

    Die Spalte "Typ" in der Tabelle dient dazu, Ihnen die schnelle Suche nach Privilegien zu erleichtern und wird nur zu Klassifizierungszwecken verwendet. Bei der Erteilung von Privilegien müssen Sie die Typen nicht verstehen. Sie müssen nur die entsprechenden Berechtigungen eingeben.

    +

  • +
+

**Typ **

+

**Privileg**

+

**Beschreibung**

+

**Relevante API-Beschreibung auf der Client-Seite**

+

Datenbank-Privilegien

+

ListDatabases

+

Alle Datenbanken in der aktuellen Instanz anzeigen

+

[ListDatabases](https://milvus.io/docs/manage_databases.md)

+

DescribeDatabase

+

Zeigt die Details einer Datenbank an

+

[DescribeDatabase](https://milvus.io/docs/manage_databases.md)

+

CreateDatabase

+

Erstellen einer Datenbank

+

[CreateDatabase](https://milvus.io/docs/manage_databases.md)

+

DropDatabase

+

Eine Datenbank löschen

+

[DropDatabase](https://milvus.io/docs/manage_databases.md)

+

AlterDatabase

+

Ändern der Eigenschaften einer Datenbank

+

[AlterDatabase](https://milvus.io/docs/manage_databases.md)

+

Sammlungsprivilegien

+

+

GetFlushState

+

Überprüfen des Status des Flush-Vorgangs der Sammlung

+

[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

+

GetLoadState

+

Überprüfung des Ladestatus einer Sammlung

+

[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

+

GetLoadingProgress

+

Überprüfung des Ladefortschritts einer Sammlung

+

[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

+

ShowCollections

+

Alle Sammlungen mit Sammlungsprivilegien anzeigen

+

[ShowCollections](https://milvus.io/docs/view-collections.md)

+

ListAliases

+

Alle Aliasnamen einer Sammlung anzeigen

+

[ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

+

DescribeCollection

+

Anzeigen der Details einer Sammlung

+

[DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

+

DescribeAlias

+

Anzeige der Details eines Alias

+

[DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

+

GetStatistics

+

Abrufen der Statistiken einer Sammlung (z. B. die Anzahl der Entitäten in einer Sammlung)

+

[GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

+

CreateCollection

+

Erstellen einer Sammlung

+

[CreateCollection](https://milvus.io/docs/create-collection.md)

+

DropCollection

+

Verwerfen einer Sammlung

+

[DropCollection](https://milvus.io/docs/drop-collection.md)

+

Laden

+

Laden einer Sammlung

+

[LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

+

Freigeben

+

Eine Sammlung freigeben

+

[ReleaseCollection](https://milvus.io/docs/load-and-release.md)

+

Flush

+

+

Persistiert alle Entitäten in einer Sammlung in einem versiegelten Segment. Jede Entität, die nach der Flush-Operation eingefügt wird, wird in einem neuen Segment gespeichert.

+

[Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

+

Verdichtung

+

Manuelles Auslösen der Verdichtung

+

[Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

+

RenameCollection

+

Umbenennen einer Sammlung

+

[RenameCollection](https://milvus.io/docs/modify-collection.md)

+

CreateAlias

+

Erzeugen eines Alias für eine Sammlung

+

[CreateAlias](https://milvus.io/docs/manage-aliases.md)

+

DropAlias

+

Den Alias einer Sammlung löschen

+

[DropAlias](https://milvus.io/docs/manage-aliases.md)

+

FlushAll

+

Alle Sammlungen in einer Datenbank leeren

+

[FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

+

Partitionieren von Privilegien

+

HasPartition

+

Prüfen, ob eine Partition existiert

+

[HasPartition](https://milvus.io/docs/manage-partitions.md)

+

ShowPartitions

+

Alle Partitionen in einer Sammlung anzeigen

+

[ShowPartitions](https://milvus.io/docs/manage-partitions.md)

+

CreatePartition

+

Eine Partition erstellen

+

[CreatePartition](https://milvus.io/docs/manage-partitions.md)

+

DropPartition

+

Verwerfen einer Partition

+

[DropPartition](https://milvus.io/docs/manage-partitions.md)

+

Index Privilegien

+

IndexDetail

+

Anzeige der Details eines Indexes

+

+

[DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

+

CreateIndex

+

Erstellen eines Indexes

+

[CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

+

DropIndex

+

Verwerfen eines Index

+

[DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

+

Privilegien für die Ressourcenverwaltung

+

+

LoadBalance

+

Lastausgleich erreichen

+

[LoadBalance](https://milvus.io/docs/resource_group.md)

+

CreateResourceGroup

+

Erstellen einer Ressourcengruppe

+

[CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

+

DropResourceGroup

+

Verwerfen einer Ressourcengruppe

+

[DropResourceGroup](https://milvus.io/docs/resource_group.md)

+

UpdateResourceGroups

+

Aktualisieren einer Ressourcengruppe

+

[UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

+

DescribeResourceGroup

+

Anzeigen der Details einer Ressourcengruppe

+

[DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

+

ListResourceGroups

+

Zeigt alle Ressourcengruppen der aktuellen Instanz an

+

[ListResourceGroups](https://milvus.io/docs/resource_group.md)

+

TransferKnoten

+

Übertragen von Knoten zwischen Ressourcengruppen

+

[TransferNode](https://milvus.io/docs/resource_group.md)

+

Replikate übertragen

+

Replikate zwischen Ressourcengruppen übertragen

+

[TransferReplica](https://milvus.io/docs/resource_group.md)

+

BackupRBAC

+

Erstellt ein Backup für alle RBAC-bezogenen Operationen in der aktuellen Instanz

+

BackupRBAC

+

WiederherstellenRBAC

+

Wiederherstellen eines Backups aller RBAC-bezogenen Operationen in der aktuellen Instanz

+

WiederherstellenRBAC

+

Entität Privilegien

+

+

Abfrage

+

Durchführen einer Abfrage

+

[Abfrage](https://milvus.io/docs/get-and-scalar-query.md)

+

Suche

+

Durchführen einer Suche

+

[Suchen](https://milvus.io/docs/single-vector-search.md)

+

Einfügen

+

Entitäten einfügen

+

[Einfügen](https://milvus.io/docs/insert-update-delete.md)

+

Löschen

+

Entitäten löschen

+

[Löschen](https://milvus.io/docs/delete-entities.md)

+

Upsertieren

+

Upsert Entitäten

+

[Einfügen](https://milvus.io/docs/upsert-entities.md)

+

Importieren

+

Masseneinfügung oder -import von Entitäten

+

[Masseneinfügung/Import](https://milvus.io/docs/import-data.md)

+

RBAC-Berechtigungen

+

CreateOwnership

+

Erstellen eines Benutzers oder einer Rolle

+

[CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

+

UpdateUser

+

Aktualisieren des Passworts eines Benutzers

+

[UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

+

DropOwnership

+

Löschen eines Benutzerpassworts oder einer Rolle

+

[DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

+

SelectOwnership

+

Alle Benutzer anzeigen, denen eine bestimmte Rolle gewährt wird

+

[SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

+

ManageOwnership

+

Verwalten eines Benutzers oder einer Rolle oder Erteilen einer Rolle an einen Benutzer

+

[OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

+

SelectUser

+

Alle einem Benutzer gewährten Rollen anzeigen

+

[SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

+

CreatePrivilegeGroup

+

Erstellen einer Privilegiengruppe

+

[CreatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

+

DropPrivilegeGroup

+

Löschen einer Berechtigungsgruppe

+

[DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

+

ListPrivilegeGroups

+

Alle Berechtigungsgruppen in der aktuellen Instanz anzeigen

+

[ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

+

OperatePrivilegeGroup

+

Hinzufügen von Privilegien zu oder Entfernen von Privilegien aus einer Privilegiengruppe

+

[OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

+
+

Das folgende Beispiel zeigt, wie das Privileg PrivilegeSearch auf collection_01 unter der Standarddatenbank sowie eine Privilegiengruppe namens privilege_group_1 der Rolle role_a gewährt wird.

+ +
from pymilvus import MilvusClient
+
+client = MilvusClient(
+    uri="http://localhost:19530",
+    token="root:Milvus"
+)
+
+client.grant_privilege_v2(
+    role_name="role_a",
+    privilege="Search"
+    collection_name='collection_01'
+    db_name='default',
+)
+    
+client.grant_privilege_v2(
+    role_name="role_a",
+    privilege="privilege_group_1"
+    collection_name='collection_01'
+    db_name='default',
+)
+
+client.grant_privilege_v2(
+    role_name="role_a",
+    privilege="ClusterReadOnly"
+    collection_name='*'
+    db_name='*',
+)
+
+
import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
+
+client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
+        .roleName("role_a")
+        .privilege("Search")
+        .collectionName("collection_01")
+        .dbName("default")
+        .build());
+
+client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
+        .roleName("role_a")
+        .privilege("privilege_group_1")
+        .collectionName("collection_01")
+        .dbName("default")
+        .build());
+
+client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
+        .roleName("role_a")
+        .privilege("ClusterReadOnly")
+        .collectionName("*")
+        .dbName("*")
+        .build());
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"
+
+client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
+
+client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
+
+client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
+
+const address = "http://localhost:19530";
+const token = "root:Milvus";
+const client = new MilvusClient({address, token});
+
+await milvusClient.grantPrivilege({
+   roleName: 'role_a',
+   object: 'Collection', 
+   objectName: 'collection_01',
+   privilegeName: 'Search'
+ });
+
+
curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a",
+    "privilege": "Search",
+    "collectionName": "collection_01",
+    "dbName":"default"
+}'
+
+curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a",
+    "privilege": "privilege_group_1",
+    "collectionName": "collection_01",
+    "dbName":"default"
+}'
+
+curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a",
+    "privilege": "ClusterReadOnly",
+    "collectionName": "*",
+    "dbName":"*"
+}'
+
+

Beschreiben einer Rolle

Das folgende Beispiel zeigt, wie man die der Rolle role_a gewährten Privilegien mit der Methode describe_role anzeigen kann.

+ +
from pymilvus import MilvusClient
+
+client.describe_role(role_name="role_a")
+
+
import io.milvus.v2.service.rbac.response.DescribeRoleResp;
+import io.milvus.v2.service.rbac.request.DescribeRoleReq
+
+DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
+        .roleName("role_a")
+        .build();
+DescribeRoleResp resp = client.describeRole(describeRoleReq);
+List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"
+
+client.ListRoles(context.Background())
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
+
+await milvusClient.describeRole({roleName: 'role_a'});
+
+
curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a"
+}'
+
+

Unten sehen Sie eine Beispielausgabe.

+
{
+     "role": "role_a",
+     "privileges": [
+         {
+             "collection_name": "collection_01",
+             "db_name": "default",
+             "role_name": "role_a",
+             "privilege": "Search",
+             "grantor_name": "root"
+         },
+         "privilege_group_1"
+     ]
+}
+
+

Entzug eines Privilegs oder einer Privilegiengruppe von einer Rolle

Das folgende Beispiel zeigt, wie das Privileg PrivilegeSearch auf collection_01 unter der Standarddatenbank sowie die Privilegiengruppe privilege_group_1, die der Rolle role_a gewährt wurden, entzogen werden können.

+ +
from pymilvus import MilvusClient
+
+client = MilvusClient(
+    uri="http://localhost:19530",
+    token="root:Milvus"
+)
+
+client.revoke_privilege_v2(
+    role_name="role_a",
+    privilege="Search"
+    collection_name='collection_01'
+    db_name='default',
+)
+    
+client.revoke_privilege_v2(
+    role_name="role_a",
+    privilege="privilege_group_1"
+    collection_name='collection_01'
+    db_name='default',
+)
+
+client.revoke_privilege_v2(
+    role_name="role_a",
+    privilege="ClusterReadOnly"
+    collection_name='*'
+    db_name='*',
+)
+
+
import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
+
+client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
+        .roleName("role_a")
+        .privilege("Search")
+        .collectionName("collection_01")
+        .dbName("default")
+        .build());
+
+client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
+        .roleName("role_a")
+        .privilege("privilege_group_1")
+        .collectionName("collection_01")
+        .dbName("default")
+        .build());
+
+client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
+        .roleName("role_a")
+        .privilege("ClusterReadOnly")
+        .collectionName("*")
+        .dbName("*")
+        .build());
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"
+
+client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
+
+client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
+
+client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
+
+
curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a",
+    "privilege": "Search",
+    "collectionName": "collection_01",
+    "dbName":"default"
+}'
+
+curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a",
+    "privilege": "Search",
+    "collectionName": "collection_01",
+    "dbName":"default"
+}'
+
+curl --request POST \
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
+--header "Authorization: Bearer ${TOKEN}" \
+--header "Content-Type: application/json" \
+-d '{
+    "roleName": "role_a",
+    "privilege": "ClusterReadOnly",
+    "collectionName": "*",
+    "dbName":"*"
+}'
+
diff --git a/localization/v2.5.x/site/de/adminGuide/grant_roles.json b/localization/v2.5.x/site/de/adminGuide/grant_roles.json new file mode 100644 index 000000000..f723dec73 --- /dev/null +++ b/localization/v2.5.x/site/de/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"Rollen an Benutzer vergeben","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"Einem Benutzer eine Rolle zuweisen","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"Beschreiben Sie den Benutzer","href":"Describe-user​","type":2,"isActive":false},{"label":"Eine Rolle widerrufen","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/grant_roles.md b/localization/v2.5.x/site/de/adminGuide/grant_roles.md new file mode 100644 index 000000000..9e661ae0a --- /dev/null +++ b/localization/v2.5.x/site/de/adminGuide/grant_roles.md @@ -0,0 +1,205 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + Nachdem Sie eine Rolle erstellt und der Rolle Rechte zugewiesen haben, können + Sie die Rolle an Benutzer vergeben, damit diese auf Ressourcen zugreifen und + Aktionen ausführen können, die durch die Rolle definiert sind. Sie können + einem Benutzer mehrere Rollen zuweisen oder eine Rolle an mehrere Benutzer + vergeben. In diesem Handbuch wird beschrieben, wie Sie Benutzern Rollen + zuweisen. +title: Rollen an Benutzer vergeben +--- +

Rollen an Benutzer vergeben

Nachdem Sie eine Rolle erstellt und der Rolle Rechte zugewiesen haben, können Sie die Rolle an Benutzer vergeben, damit diese auf Ressourcen zugreifen und Aktionen durchführen können, die durch die Rolle definiert sind. Sie können einem Benutzer mehrere Rollen zuweisen oder eine Rolle an mehrere Benutzer vergeben. In diesem Handbuch wird beschrieben, wie Sie Benutzern Rollen zuweisen können.

+

Dem eingebauten Benutzer root in Milvus wurde bereits die Rolle admin zugewiesen, die über alle Berechtigungen verfügt. Sie brauchen ihm keine weiteren Rollen zuzuweisen.

+

Einem Benutzer eine Rolle zuweisen

Das folgende Beispiel zeigt, wie Sie dem Benutzer user_1 die Rolle role_a zuweisen.

+ +
from pymilvus import MilvusClient​
+​
+client = MilvusClient(​
+    uri="http://localhost:19530",​
+    token="root:Milvus"​
+)​
+​
+client.grant_role(user_name="user_1", role_name="role_a")​
+
+
+
import io.milvus.v2.client.ConnectConfig;​
+import io.milvus.v2.client.MilvusClientV2;​
+import io.milvus.v2.service.rbac.request.GrantRoleReq;​
+​
+String CLUSTER_ENDPOINT = "http://localhost:19530";​
+String TOKEN = "root:Milvus";​
+​
+​
+ConnectConfig connectConfig = ConnectConfig.builder()​
+    .uri(CLUSTER_ENDPOINT)​
+    .token(TOKEN)​
+    .build();​
+    ​
+MilvusClientV2 client = new MilvusClientV2(connectConfig);​
+​
+GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
+        .roleName("role_a")​
+        .userName("user_1")​
+        .build();​
+client.grantRole(grantRoleReq);​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+const address = "http://localhost:19530";​
+const token = "root:Milvus";​
+const client = new MilvusClient({address, token});​
+​
+milvusClient.grantRole({​
+   username: 'user_1',​
+   roleName: 'role_a'​
+ })​
+
+
+
export CLUSTER_ENDPOINT="http://localhost:19530"​
+export TOKEN="root:Milvus"​
+​
+curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "roleName": "role_a",​
+    "userName": "user_1"​
+}'​
+
+
+

Beschreiben Sie den Benutzer

Sobald Sie einem Benutzer eine Rolle zugewiesen haben, können Sie mit der Methode describe_user() überprüfen, ob die Zuweisung erfolgreich war.

+

Das folgende Beispiel zeigt, wie Sie die Rolle(n) des Benutzers user_1 überprüfen können.

+ +
from pymilvus import MilvusClient​
+​
+client.describe_user(user_name="user_1")​
+
+
+
import io.milvus.v2.service.rbac.request.DescribeUserReq;​
+import io.milvus.v2.service.rbac.response.DescribeUserResp;​
+​
+DescribeUserReq describeUserReq = DescribeUserReq.builder()​
+        .userName("user_1")​
+        .build();​
+DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+milvusClient.describeUser({username: 'user_1'})​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "userName": "user_1"​
+}'​
+
+
+

Nachfolgend finden Sie ein Beispiel für die Ausgabe.

+
{'user_name': 'user_1', 'roles': 'role_a'}​
+
+
+

Eine Rolle widerrufen

Sie können auch eine Rolle widerrufen, die einem Benutzer zugewiesen wurde.

+

Das folgende Beispiel zeigt, wie Sie die dem Benutzer user_1 zugewiesene Rolle role_a widerrufen können.

+ +
from pymilvus import MilvusClient​
+​
+client.revoke_role(​
+    user_name='user_1',​
+    role_name='role_a'​
+)​
+
+
+
import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
+​
+client.revokeRole(RevokeRoleReq.builder()​
+        .userName("user_1")​
+        .roleName("role_a")​
+        .build());​
+
+
+
const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
+​
+​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "userName": "user_1",​
+    "roleName": "role_a"​
+}'​
+
+
diff --git a/localization/v2.5.x/site/de/adminGuide/privilege_group.json b/localization/v2.5.x/site/de/adminGuide/privilege_group.json new file mode 100644 index 000000000..e293edbed --- /dev/null +++ b/localization/v2.5.x/site/de/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"Privilegiengruppe erstellen","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"Privilegiengruppe vs. Privilegien","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"Eingebaute Berechtigungsgruppen","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"Prozeduren","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/privilege_group.md b/localization/v2.5.x/site/de/adminGuide/privilege_group.md new file mode 100644 index 000000000..ab5902be1 --- /dev/null +++ b/localization/v2.5.x/site/de/adminGuide/privilege_group.md @@ -0,0 +1,491 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: >- + Um den Prozess der Rechtevergabe zu rationalisieren, empfiehlt es sich, + mehrere Rechte in einer Rechtegruppe zusammenzufassen. +title: Privilegiengruppe erstellen +--- +

Privilegiengruppe erstellen

Um den Prozess der Vergabe von Privilegien zu rationalisieren, wird empfohlen, mehrere Privilegien in einer Privilegiengruppe zusammenzufassen.

+

Privilegiengruppe vs. Privilegien

Eine Berechtigungsgruppe besteht aus mehreren Privilegien.

+

+ + Privilege group illustrated + Privilegiengruppe illustriert

+

Wie in der obigen Abbildung dargestellt, nehmen Sie an, dass Sie einer Rolle drei verschiedene Berechtigungen gewähren müssen.

+
    +
  • Wenn Sie keine Berechtigungsgruppe verwenden, müssen Sie die Berechtigungen dreimal erteilen.

  • +
  • Wenn Sie eine Berechtigungsgruppe verwenden, brauchen Sie nur eine Berechtigungsgruppe zu erstellen, die drei Berechtigungen zu dieser Berechtigungsgruppe hinzuzufügen und die Berechtigungsgruppe der Rolle A zu gewähren.

  • +
+

Durch die Verwendung einer Berechtigungsgruppe können Sie einer Rolle mehrere Privilegien im Ganzen gewähren.

+

Eingebaute Berechtigungsgruppen

Um die Benutzung zu erleichtern, bietet Milvus insgesamt 9 eingebaute Berechtigungen auf der Ebene der Sammlung, der Datenbank und der Instanz: COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW und Cluster_Admin.

+
+

Die drei Ebenen der eingebauten Berechtigungsgruppen stehen nicht in einer kaskadierenden Beziehung. Wenn Sie eine Berechtigungsgruppe auf Instanzebene festlegen, werden nicht automatisch Berechtigungen für alle Datenbanken und Sammlungen unter dieser Instanz festgelegt. Berechtigungen auf Datenbank- und Sammlungsebene müssen manuell festgelegt werden.

+
+

In den folgenden Tabellen werden die in jeder der integrierten Berechtigungsgruppen enthaltenen Berechtigungen erläutert.

+

Sammlungsebene

    +
  • COLL_RO: umfasst die Berechtigung zum Lesen von Sammlungsdaten

  • +
  • COLL_RW: umfasst die Berechtigung zum Lesen und Schreiben von Sammlungsdaten

  • +
  • COLL_ADMIN: beinhaltet die Berechtigung zum Lesen und Schreiben von Sammlungsdaten und zur Verwaltung von Sammlungen.

  • +
+

In der folgenden Tabelle sind die spezifischen Berechtigungen aufgeführt, die in den drei integrierten Berechtigungsgruppen auf der Sammlungsebene enthalten sind.

+

**Privileg**

+

**KollektionNurLesen**

+

**SammlungLesenSchreiben**

+

**SammlungsAdmin**

+

Abfrage

+

✔️

+

✔️

+

✔️

+

Suche

+

✔️

+

✔️

+

✔️

+

IndexDetail

+

✔️

+

✔️

+

✔️

+

GetFlushState

+

✔️

+

✔️

+

✔️

+

GetLoadState

+

✔️

+

✔️

+

✔️

+

GetLoadingProgress

+

✔️

+

✔️

+

✔️

+

HasPartition

+

✔️

+

✔️

+

✔️

+

ShowPartitions

+

✔️

+

✔️

+

✔️

+

ListAliases

+

✔️

+

✔️

+

✔️

+

DescribeCollection

+

✔️

+

✔️

+

✔️

+

DescribeAlias

+

✔️

+

✔️

+

✔️

+

GetStatistiken

+

✔️

+

✔️

+

✔️

+

CreateIndex

+

+

✔️

+

✔️

+

DropIndex

+

+

✔️

+

✔️

+

CreatePartition

+

+

✔️

+

✔️

+

DropPartition

+

+

✔️

+

✔️

+

Laden

+

+

✔️

+

✔️

+

Freigeben

+

+

✔️

+

✔️

+

Einfügen

+

+

✔️

+

✔️

+

Löschen

+

+

✔️

+

✔️

+

Upsertieren

+

+

✔️

+

✔️

+

Importieren

+

+

✔️

+

✔️

+

Spülen

+

+

✔️

+

✔️

+

Verdichtung

+

+

✔️

+

✔️

+

LoadBalance

+

+

✔️

+

✔️

+

CreateAlias

+

+

+

✔️

+

DropAlias

+

+

+

✔️

+
+

Datenbank-Ebene

    +
  • DB_RO: umfasst die Berechtigung zum Lesen von Datenbankdaten

  • +
  • DB_RW: umfasst die Berechtigung zum Lesen und Schreiben von Datenbankdaten

  • +
  • DB_Admin: umfasst die Berechtigung zum Lesen und Schreiben von Datenbankdaten und zur Verwaltung von Datenbanken.

  • +
+

In der folgenden Tabelle sind die spezifischen Berechtigungen aufgeführt, die in den drei integrierten Berechtigungsgruppen auf Datenbankebene enthalten sind.

+

**Privileg**

+

**DatenbankNurLesen**

+

**DatenbankLesenSchreiben**

+

**DatenbankAdmin**

+

Sammlungen anzeigen

+

✔️

+

✔️

+

✔️

+

DescribeDatabase

+

✔️

+

✔️

+

✔️

+

CreateCollection

+

+

+

✔️

+

DropCollection

+

+

+

✔️

+

AlterDatabase

+

+

✔️

+

✔️

+
+

Cluster-Ebene

    +
  • Cluster_RO: umfasst die Berechtigung zum Lesen von Instanzdaten

  • +
  • Cluster_RW: umfasst die Berechtigung zum Lesen und Schreiben von Instanzdaten

  • +
  • Cluster_Admin: umfasst die Berechtigung zum Lesen und Schreiben von Instanzdaten und zur Verwaltung von Instanzen.

  • +
+

In der folgenden Tabelle sind die spezifischen Berechtigungen aufgeführt, die in den drei integrierten Berechtigungsgruppen auf Instanzebene enthalten sind.

+

**Privileg**

+

**ClusterReadOnly**

+

**ClusterReadWrite**

+

**ClusterAdmin**

+

ListDatabases

+

✔️

+

✔️

+

✔️

+

RenameCollection

+

+

+

✔️

+

CreateOwnership

+

+

+

✔️

+

UpdateUser

+

+

+

✔️

+

DropOwnership

+

+

+

✔️

+

SelectOwnership

+

✔️

+

✔️

+

✔️

+

ManageOwnership

+

+

+

✔️

+

SelectUser

+

✔️

+

✔️

+

✔️

+

BackupRBAC

+

+

+

✔️

+

WiederherstellenRBAC

+

+

+

✔️

+

CreateResourceGroup

+

+

+

✔️

+

DropResourceGroup

+

+

+

✔️

+

UpdateResourceGroups

+

+

✔️

+

✔️

+

DescribeResourceGroup

+

✔️

+

✔️

+

✔️

+

ListResourceGroups

+

✔️

+

✔️

+

✔️

+

TransferNode

+

+

✔️

+

✔️

+

TransferReplica

+

+

✔️

+

✔️

+

CreateDatabase

+

+

+

✔️

+

DropDatabase

+

+

+

✔️

+

FlushAll

+

+

✔️

+

✔️

+

CreatePrivilegeGroup

+

+

+

✔️

+

DropPrivilegeGroup

+

+

+

✔️

+

ListPrivilegeGroups

+

+

+

✔️

+

OperatePrivilegeGroup

+

+

+

✔️

+
+

Prozeduren

Sie können eine Berechtigungsgruppe erstellen und dann der Berechtigungsgruppe Berechtigungen hinzufügen.

+

Erstellen einer Berechtigungsgruppe

Das folgende Beispiel zeigt, wie Sie eine Berechtigungsgruppe namens privilege_group_1 erstellen.

+ +
from pymilvus import MilvusClient​
+client.create_privileg_group(group_name='privilege_group_1')​
+
+
+
import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
+​
+client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
+        .groupName("privilege_group_1")​
+        .build());​
+
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"​
+​
+client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "privilegeGroupName":"privilege_group_1"​
+}'​
+
+
+

Hinzufügen von Berechtigungen zu einer Berechtigungsgruppe

Das folgende Beispiel zeigt, wie die Privilegien PrivilegeBackupRBAC und PrivilegeRestoreRBAC zu der gerade erstellten Privilegiengruppe privilege_group_1 hinzugefügt werden.

+ +
from pymilvus import MilvusClient​
+client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
+
+
+
import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
+​
+client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
+        .groupName("privilege_group_1")​
+        .privileges(Arrays.asList("Query", "Search"))​
+        .build());​
+
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"​
+​
+client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "privilegeGroupName":"privilege_group_1",​
+    "privileges":["Query", "Search"]​
+}'​
+
+
+

Privilegien aus einer Privilegiengruppe entfernen

Das folgende Beispiel zeigt, wie man das Privileg PrivilegeRestoreRBAC aus der Privilegiengruppe privilege_group_1 entfernt.

+ +
from pymilvus import MilvusClient​
+client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
+
+
+
import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
+​
+client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
+        .groupName("privilege_group_1")​
+        .privileges(Collections.singletonList("Search"))​
+        .build());​
+
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"​
+​
+client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "privilegeGroupName":"privilege_group_1",​
+    "privileges":["Search"]​
+}'​
+
+
+

Privilegiengruppen auflisten

Das folgende Beispiel zeigt, wie man alle vorhandenen Berechtigungsgruppen auflistet.

+ +
from pymilvus import MilvusClient​
+client.list_privilege_groups()​
+
+
+
import io.milvus.v2.service.rbac.PrivilegeGroup;​
+import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
+import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
+​
+ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
+        .build());​
+List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
+
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"​
+​
+client.ListPrivilegeGroups(context.Background())​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{}'​
+
+
+

Unten sehen Sie ein Beispiel für die Ausgabe.

+
PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
+
+
+

Löschen einer Berechtigungsgruppe

Das folgende Beispiel zeigt, wie die Berechtigungsgruppe privilege_group_1 gelöscht werden kann.

+ +
from pymilvus import MilvusClient​
+client.drop_privilege_group(group_name='privilege_group_1')​
+
+
+
import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
+​
+client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
+        .groupName("privilege_group_1")​
+        .build());​
+
+
+
import "github.com/milvus-io/milvus-sdk-go/v2/client"​
+​
+client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
+
+
+
curl --request POST \​
+--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
+--header "Authorization: Bearer ${TOKEN}" \​
+--header "Content-Type: application/json" \​
+-d '{​
+    "privilegeGroupName":"privilege_group_1"​
+}'​
+
+
diff --git a/localization/v2.5.x/site/de/adminGuide/rbac.json b/localization/v2.5.x/site/de/adminGuide/rbac.json index 7788471ed..4811c8826 100644 --- a/localization/v2.5.x/site/de/adminGuide/rbac.json +++ b/localization/v2.5.x/site/de/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"RBAC aktivieren","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Initiieren Sie einen Milvus-Client, um eine Verbindung herzustellen","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. Erstellen Sie einen Benutzer","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. Erstellen Sie eine Rolle","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. Einer Rolle ein Privileg erteilen","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. Einem Benutzer eine Rolle gewähren","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. Entziehen von Privilegien","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"Was kommt als nächstes?","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBAC Erklärt","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"RBAC-Schlüsselkonzepte","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"Prozeduren","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/rbac.md b/localization/v2.5.x/site/de/adminGuide/rbac.md index 8244ee4c0..4fa8adafe 100644 --- a/localization/v2.5.x/site/de/adminGuide/rbac.md +++ b/localization/v2.5.x/site/de/adminGuide/rbac.md @@ -1,10 +1,14 @@ --- id: rbac.md related_key: enable RBAC -summary: 'Erfahren Sie, wie Sie Benutzer, Rollen und Berechtigungen verwalten können.' -title: RBAC aktivieren +summary: >- + RBAC (Role-Based Access Control) ist eine rollenbasierte + Zugriffskontrollmethode. Mit RBAC können Sie die Operationen, die Benutzer auf + der Ebene der Sammlung, der Datenbank und der Instanz durchführen können, + genau steuern und so die Datensicherheit erhöhen. +title: RBAC Erklärt --- -

RBAC aktivieren

Wenn Sie RBAC aktivieren, können Sie den Zugriff auf bestimmte Milvus-Ressourcen (z. B. eine Sammlung oder eine Partition) oder Berechtigungen auf der Grundlage von Benutzerrollen und Privilegien steuern. Derzeit ist diese Funktion nur in Python und Java verfügbar.

-

Dieses Thema beschreibt, wie man RBAC aktiviert und Benutzer und Rollen verwaltet.

-
-

Die Codeschnipsel auf dieser Seite verwenden den neuen MilvusClient (Python) zur Interaktion mit Milvus. Neue MilvusClient SDKs für andere Sprachen werden in zukünftigen Updates veröffentlicht.

-
-

1. Initiieren Sie einen Milvus-Client, um eine Verbindung herzustellen

RBAC (Role-Based Access Control) ist eine rollenbasierte Zugriffskontrollmethode. Mit RBAC können Sie die Operationen, die Benutzer auf Sammel-, Datenbank- und Instanzebene durchführen können, genau steuern und so die Datensicherheit erhöhen.

+

Im Gegensatz zu herkömmlichen Modellen der Benutzerzugriffskontrolle führt RBAC das Konzept der Rollen ein. Im RBAC-Modell gewähren Sie den Rollen Privilegien und diese Rollen dann den Benutzern. Dann können Benutzer Privilegien erhalten.

+

Das RBAC-Modell kann die Effizienz der Zugriffskontrollverwaltung verbessern. Wenn beispielsweise mehrere Benutzer die gleichen Berechtigungen benötigen, müssen Sie die Berechtigungen nicht für jeden Benutzer manuell festlegen. Stattdessen können Sie eine Rolle erstellen und diese Rolle den Benutzern zuweisen. Wenn Sie die Berechtigungen dieser Benutzer anpassen möchten, können Sie einfach die Rollenberechtigungen anpassen und die Änderung wird auf alle Benutzer mit dieser Rolle angewendet.

+

RBAC-Schlüsselkonzepte

Nachdem Sie die Benutzerauthentifizierung aktiviert haben, verbinden Sie sich mit Ihrer Milvus-Instanz über token, das aus einem Benutzernamen und einem Passwort besteht. Standardmäßig verwendet Milvus den Benutzer root mit dem Passwort Milvus.

-
from pymilvus import MilvusClient
-
-client = MilvusClient(
-    uri='http://localhost:19530', # replace with your own Milvus server address
-    token='root:Milvus' # replace with your own Milvus server token
-)
-
-

2. Erstellen Sie einen Benutzer

Erstellen Sie einen Benutzer mit dem Namen user_1 und dem Passwort P@ssw0rd:

-
client.create_user(
-    user_name='user_1',
-    password='P@ssw0rd'
-)
-
-

Nachdem Sie einen Benutzer angelegt haben, können Sie:

-
    -
  • Ein Benutzerpasswort aktualisieren. Sie müssen sowohl das ursprüngliche als auch das neue Kennwort angeben.
  • -
-
client.update_password(
-    user_name='user_1',
-    old_password='P@ssw0rd',
-    new_password='P@ssw0rd123'
-)
-
-
    -
  • Alle Benutzer auflisten.
  • -
-
client.list_users()
-
-# output:
-# ['root', 'user_1']
-
-
    -
  • Die Rolle eines bestimmten Benutzers überprüfen.
  • -
-
client.describe_user(user_name='user_1')
-
-# output:
-# {'user_name': 'user_1', 'roles': ()}
-
-

3. Erstellen Sie eine Rolle

Im folgenden Beispiel wird eine Rolle mit dem Namen roleA erstellt.

-
client.create_role(
-    role_name="roleA",
-)
-
-

Nachdem Sie eine Rolle erstellt haben, können Sie:

+

+ + Users, roles, and privileges + Benutzer, Rollen und Berechtigungen

+

Es gibt vier Hauptkomponenten im RBAC-Modell.

    -
  • Alle Rollen auflisten.
  • +
  • **Ressource: **Die Ressourceneinheit, auf die zugegriffen werden kann. Es gibt drei Ebenen von Ressourcen in Milvus - Instanz, Datenbank und Sammlung.

  • +
  • **Berechtigung: **Die Erlaubnis, bestimmte Operationen mit Milvus-Ressourcen durchzuführen (z. B. Sammlungen erstellen, Daten einfügen usw.).

  • +
  • **Privilegiengruppe: **Eine Gruppe mit mehreren Privilegien.

  • +
  • **Rolle: **Eine Rolle besteht aus zwei Teilen - Rechte und Ressourcen. Berechtigungen definieren die Art der Operationen, die eine Rolle ausführen kann, während Ressourcen die Zielressourcen definieren, auf denen die Operationen ausgeführt werden können. Die Rolle des Datenbankadministrators kann zum Beispiel Lese-, Schreib- und Verwaltungsvorgänge für bestimmte Datenbanken durchführen.

  • +
  • **Benutzer: **Ein Benutzer ist jemand, der Milvus benutzt. Jeder Benutzer hat eine eindeutige ID und erhält eine Rolle oder mehrere Rollen.

-
client.list_roles()
-
-# output:
-# ['admin', 'public', 'roleA']
-
-

4. Einer Rolle ein Privileg erteilen

Das folgende Beispiel zeigt, wie Sie der Rolle roleA das Recht erteilen, alle Sammlungen zu durchsuchen.

-

Die object_type gibt den Objekttyp an, der auch als Ressourcentyp verstanden werden kann. Gültige Werte sind derzeit Sammlung/Benutzer/Global usw., wobei Global bedeutet, dass es keinen spezifischen Ressourcentyp gibt. Die object_name ist der Name der Ressource. Wenn objecttypeCollection ist, kann sich der Objektname auf einen bestimmten Sammlungsnamen beziehen, oder Sie können * verwenden, um alle Sammlungen anzugeben. Wenn objecttypeGlobal ist, kann der Objektname nur mit * angegeben werden. Unter Benutzer und Rollen finden Sie weitere Arten von Berechtigungen, die Sie vergeben können.

-

Vergewissern Sie sich vor der Verwaltung von Rollenberechtigungen, dass Sie die Benutzerauthentifizierung aktiviert haben. Andernfalls kann ein Fehler auftreten. Informationen zur Aktivierung der Benutzerauthentifizierung finden Sie unter Authentifizierung des Benutzerzugriffs.

-
# grant privilege to a role
-
-client.grant_privilege(
-    role_name='roleA',
-    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
-    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
-    privilege='SelectUser'
-)
-
-

Nachdem Sie einer Rolle eine Berechtigung gewährt haben, können Sie:

-
    -
  • Die einer Rolle gewährten Berechtigungen anzeigen.
  • -
-
client.describe_role(
-    role_name='roleA'
-)
-
-# output:
-# {'role': 'roleA',
-#  'privileges': [{'object_type': 'User',
-#    'object_name': 'user_1',
-#    'db_name': 'default',
-#    'role_name': 'roleA',
-#    'privilege': 'SelectUser',
-#    'grantor_name': 'root'}]}
-
-

5. Einem Benutzer eine Rolle gewähren

Die Rolle einem Benutzer gewähren, so dass dieser Benutzer alle Privilegien der Rolle erben kann.

-
# grant a role to a user
-
-client.grant_role(
-    user_name='user_1',
-    role_name='roleA'
-)
-
-

Überprüfen Sie nach der Vergabe der Rolle, ob sie vergeben wurde:

-
client.describe_user(
-    user_name='user_1'
-)
-
-# output:
-# {'user_name': 'user_1', 'roles': ('roleA')}
-
-

6. Entziehen von Privilegien

-

Seien Sie vorsichtig, wenn Sie die folgenden Operationen durchführen, da diese Operationen nicht rückgängig gemacht werden können.

-
-
    -
  • Entziehen Sie ein Privileg aus einer Rolle. Wenn Sie ein Privileg entziehen, das der Rolle nicht gewährt wurde, tritt ein Fehler auf.
  • -
-
client.revoke_privilege(
-    role_name='roleA',
-    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
-    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
-    privilege='SelectUser'
-)
-
-
    -
  • Entfernen Sie einen Benutzer aus einer Rolle. Wenn Sie eine Rolle widerrufen, die dem Benutzer nicht gewährt wurde, tritt ein Fehler auf.
  • -
-
client.revoke_role(
-    user_name='user_1',
-    role_name='roleA'
-)
-
-
    -
  • Eine Rolle löschen.
  • -
-
client.drop_role(role_name='roleA')
-
-
    -
  • Löschen eines Benutzers.
  • -
-
client.drop_user(user_name='user_1')
-
-

Was kommt als nächstes?

+

Um die Zugriffskontrolle über RBAC zu erreichen, müssen Sie die folgenden Schritte befolgen.

+
    +
  1. Erstellen Sie einen Benutzer: Zusätzlich zu den Standardbenutzern root in Milvus können Sie neue Benutzer erstellen und Passwörter festlegen, um die Datensicherheit zu gewährleisten.

  2. +
  3. Erstellen Sie eine Rolle: Sie können benutzerdefinierte Rollen erstellen, die auf Ihren Bedürfnissen basieren. Die spezifischen Fähigkeiten einer Rolle werden durch ihre Berechtigungen bestimmt.

  4. +
  5. Erstellen Sie eine Berechtigungsgruppe: Kombinieren Sie mehrere Berechtigungen in einer Berechtigungsgruppe, um den Prozess der Gewährung von Berechtigungen für eine Rolle zu rationalisieren.

  6. +
  7. Gewähren Sie einer Rolle Berechtigungen oder Berechtigungsgruppen: Definieren Sie die Fähigkeiten einer Rolle, indem Sie dieser Rolle Berechtigungen oder Berechtigungsgruppen zuweisen.

  8. +
  9. Rollen an Benutzer vergeben: Gewähren Sie Benutzern Rollen mit bestimmten Privilegien, so dass diese über die Privilegien einer Rolle verfügen können. Eine einzelne Rolle kann mehreren Benutzern zugewiesen werden.

  10. +
diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.json index 31ded415c..850fd4c98 100644 --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Upgrade des Milvus-Clusters mit Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade von Milvus durch Ändern des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Upgrade des Milvus-Clusters mit Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade von Milvus durch Ändern des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.md index 243f06cd9..1b47aa784 100644 --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-docker.md @@ -22,7 +22,7 @@ title: Upgrade des Milvus-Clusters mit Docker Compose >

Dieses Thema beschreibt, wie Sie Ihr Milvus mit Docker Compose aktualisieren können.

-

Im Normalfall können Sie Milvus aktualisieren, indem Sie sein Image ändern. Allerdings müssen Sie die Metadaten vor einem Upgrade von v2.1.x auf v2.5.0-beta migrieren.

+

Im Normalfall können Sie Milvus aktualisieren, indem Sie sein Image ändern. Sie müssen jedoch die Metadaten vor einem Upgrade von v2.1.x auf v2.5.0 migrieren.

Upgrade von Milvus durch Ändern des Images

  • Führen Sie die folgenden Befehle aus, um das Upgrade durchzuführen.

    docker compose down
    @@ -107,7 +107,7 @@ cmd:
       runWithBackup: true
     config:
       sourceVersion: 2.1.4   # Specify your milvus version
    -  targetVersion: 2.5.0-beta
    +  targetVersion: 2.5.0
       backupFilePath: /tmp/migration.bak
     metastore:
       type: etcd
    diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.json
    index 8f5ee3b5d..a56f49d11 100644
    --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.json
    +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.json
    @@ -1 +1 @@
    -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Milvus-Cluster mit Helm-Diagramm aufrüsten","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Überprüfen der Milvus Helm-Karte","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus mit Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Milvus-Cluster mit Helm-Diagramm aufrüsten","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Überprüfen der Milvus Helm-Karte","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus mit Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.md
    index c71752945..3020447e7 100644
    --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.md
    +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-helm.md
    @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
     zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
     

    Sie können den Upgrade-Pfad für Ihren Milvus wie folgt wählen:

    -
    - [Führen Sie ein rollendes Upgrade durch](#conduct-a-rolling-upgrade) von Milvus v2.2.3 und späteren Versionen auf v2.5.0-beta.
    +
    - [Führen Sie ein rollendes Upgrade durch](#conduct-a-rolling-upgrade) von Milvus v2.2.3 und späteren Versionen auf v2.5.0.

    Durchführen eines rollenden Upgrades

    1. diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.json index 177fe6ca1..bfc8d1bd9 100644 --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Milvus Cluster mit Milvus Operator aufrüsten","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aktualisieren Sie Ihren Milvus Operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus durch Änderung des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Milvus Cluster mit Milvus Operator aufrüsten","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aktualisieren Sie Ihren Milvus Operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus durch Änderung des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.md index 516d81680..1625fc26c 100644 --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_cluster-operator.md @@ -23,7 +23,7 @@ title: Milvus Cluster mit Milvus Operator aufrüsten d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

      Diese Anleitung beschreibt, wie Sie Ihren Milvus-Cluster mit Milvus Operator aktualisieren.

      +

      Dieser Leitfaden beschreibt, wie Sie Ihren Milvus-Cluster mit Milvus Operator aktualisieren.

      Aktualisieren Sie Ihren Milvus Operator

      Sobald Sie Ihren Milvus-Operator auf die neueste Version aktualisiert haben, haben Sie die folgenden Möglichkeiten:

      Durchführen eines rollenden Upgrades

      Seit Milvus 2.2.3 können Sie Milvus-Koordinatoren so konfigurieren, dass sie im Aktiv-Standby-Modus arbeiten und die Funktion des rollenden Upgrades für sie aktivieren, so dass Milvus auf eingehende Anfragen während der Koordinator-Upgrades reagieren kann. In früheren Versionen müssen die Koordinatoren während eines Upgrades entfernt und neu erstellt werden, was zu einer gewissen Ausfallzeit des Dienstes führen kann.

      -

      Auf der Grundlage der von Kubernetes bereitgestellten rollierenden Aktualisierungsfunktionen erzwingt der Milvus-Operator eine geordnete Aktualisierung der Bereitstellungen entsprechend ihren Abhängigkeiten. Darüber hinaus implementiert Milvus einen Mechanismus, der sicherstellt, dass seine Komponenten während des Upgrades mit den von ihnen abhängigen Komponenten kompatibel bleiben, wodurch potenzielle Ausfallzeiten des Dienstes erheblich reduziert werden.

      +

      Seit Milvus 2.2.3 können Sie Milvus-Koordinatoren so konfigurieren, dass sie im Aktiv-Standby-Modus arbeiten, und die Funktion "Rolling Upgrade" für sie aktivieren, so dass Milvus auf eingehende Anfragen während der Koordinator-Upgrades reagieren kann. In früheren Versionen müssen die Koordinatoren während eines Upgrades entfernt und neu erstellt werden, was zu einer gewissen Ausfallzeit des Dienstes führen kann.

      +

      Auf der Grundlage der von Kubernetes bereitgestellten rollierenden Aktualisierungsfunktionen erzwingt der Milvus-Operator eine geordnete Aktualisierung der Bereitstellungen entsprechend ihrer Abhängigkeiten. Darüber hinaus implementiert Milvus einen Mechanismus, der sicherstellt, dass seine Komponenten während des Upgrades mit den von ihnen abhängigen Komponenten kompatibel bleiben, wodurch potenzielle Ausfallzeiten des Dienstes erheblich reduziert werden.

      Die Funktion "Rolling Upgrade" ist standardmäßig deaktiviert. Sie müssen sie explizit über eine Konfigurationsdatei aktivieren.

      apiVersion: milvus.io/v1beta1
       kind: Milvus
      @@ -76,7 +76,7 @@ spec:
         components:
           enableRollingUpdate: true
           imageUpdateMode: rollingUpgrade # Default value, can be omitted
      -    image: milvusdb/milvus:v2.5.0-beta
      +    image: milvusdb/milvus:v2.5.0
       

      In der obigen Konfigurationsdatei setzen Sie spec.components.enableRollingUpdate auf true und spec.components.image auf die gewünschte Milvus-Version.

      Standardmäßig führt Milvus rollende Upgrades für Koordinatoren in einer geordneten Weise durch, bei der die Pod-Images der Koordinatoren nacheinander ersetzt werden. Um die Upgrade-Zeit zu verkürzen, sollten Sie spec.components.imageUpdateMode auf all setzen, damit Milvus alle Pod-Images gleichzeitig ersetzt.

      @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      Sie können spec.components.imageUpdateMode auf rollingDowngrade setzen, damit Milvus die Coordinator-Pod-Images durch eine niedrigere Version ersetzt.

      apiVersion: milvus.io/v1beta1
      @@ -128,7 +128,7 @@ metadata:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      Führen Sie dann das Folgende aus, um das Upgrade durchzuführen:

      kubectl patch -f milvusupgrade.yaml
      @@ -148,8 +148,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Seit Milvus 2.2.0 sind die Metadaten nicht mehr mit denen früherer Versionen kompatibel. Die folgenden Beispielschnipsel gehen von einem Upgrade von Milvus 2.1.4 auf Milvus 2.5.0-beta aus.

      -

      1. Erstellen Sie eine .yaml Datei für die Migration von Metadaten

      Erstellen Sie eine Metadaten-Migrationsdatei. Im Folgenden finden Sie ein Beispiel. Sie müssen name, sourceVersion und targetVersion in der Konfigurationsdatei angeben. Im folgenden Beispiel wird name auf my-release-upgrade, sourceVersion auf v2.1.4 und targetVersion auf v2.5.0-beta gesetzt. Dies bedeutet, dass Ihr Milvus-Cluster von v2.1.4 auf v2.5.0-beta aktualisiert wird.

      +

      Seit Milvus 2.2.0 sind die Metadaten nicht mehr mit denen früherer Versionen kompatibel. Die folgenden Beispielschnipsel gehen von einem Upgrade von Milvus 2.1.4 auf Milvus 2.5.0 aus.

      +

      1. Erstellen Sie eine .yaml Datei für die Migration von Metadaten

      Erstellen Sie eine Metadaten-Migrationsdatei. Im Folgenden finden Sie ein Beispiel. Sie müssen name, sourceVersion und targetVersion in der Konfigurationsdatei angeben. Im folgenden Beispiel wird name auf my-release-upgrade, sourceVersion auf v2.1.4 und targetVersion auf v2.5.0 gesetzt. Dies bedeutet, dass Ihr Milvus-Cluster von v2.1.4 auf v2.5.0 aktualisiert wird.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -159,9 +159,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.json
      index d1625042e..50d6ac68e 100644
      --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.json
      +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.json
      @@ -1 +1 @@
      -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Upgrade von Milvus Standalone mit Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade von Milvus durch Ändern des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Upgrade von Milvus Standalone mit Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade von Milvus durch Ändern des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.md
      index 9fd8db3b1..f846cdacb 100644
      --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.md
      +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-docker.md
      @@ -26,7 +26,7 @@ title: Upgrade von Milvus Standalone mit Docker Compose
               >
             
           

      Dieses Thema beschreibt, wie Sie Milvus mit Docker Compose aktualisieren können.

      -

      Im Normalfall können Sie Milvus aktualisieren, indem Sie sein Image ändern. Allerdings müssen Sie vor einem Upgrade von v2.1.x auf v2.5.0-beta die Metadaten migrieren.

      +

      Im Normalfall können Sie Milvus aktualisieren, indem Sie sein Image ändern. Vor einem Upgrade von v2.1.x auf v2.5.0 müssen Sie jedoch die Metadaten migrieren.

      Aufgrund von Sicherheitsbedenken aktualisiert Milvus seine MinIO auf RELEASE.2023-03-20T20-16-18Z mit der Veröffentlichung von v2.2.5. Vor einem Upgrade von früheren Milvus Standalone-Versionen, die mit Docker Compose installiert wurden, sollten Sie eine Single-Node Single-Drive MinIO-Bereitstellung erstellen und die vorhandenen MinIO-Einstellungen und -Inhalte in die neue Bereitstellung migrieren. Einzelheiten hierzu finden Sie in diesem Leitfaden.

      @@ -51,7 +51,7 @@ title: Upgrade von Milvus Standalone mit Docker Compose
      ...
       standalone:
         container_name: milvus-standalone
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       
    2. Führen Sie die folgenden Befehle aus, um das Upgrade durchzuführen.

      docker compose down
      @@ -85,7 +85,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.json
      index 66662c374..5ce1d6af9 100644
      --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.json
      +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Upgrade von Milvus Standalone mit Helm Chart","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Prüfen Sie die Milvus-Version","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus mit Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Upgrade von Milvus Standalone mit Helm Chart","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Prüfen Sie die Milvus-Version","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus mit Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.md
      index bc5849dc1..c3f2933c8 100644
      --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.md
      +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      Sie können den Upgrade-Pfad für Ihren Milvus wie folgt wählen:

      -
      - [Führen Sie ein rollendes Upgrade durch](#conduct-a-rolling-upgrade) von Milvus v2.2.3 und späteren Versionen auf v2.5.0-beta.
      +
      - [Führen Sie ein rollendes Upgrade durch](#conduct-a-rolling-upgrade) von Milvus v2.2.3 und späteren Versionen auf v2.5.0.

      Durchführen eines rollenden Upgrades

      1. @@ -207,9 +207,9 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
        $ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'
         # milvusdb/milvus:v2.1.4
         
        -

        4. Migrieren Sie die Metadaten

        Eine wichtige Änderung in Milvus 2.2 ist die Metadatenstruktur der Segmentindizes. Daher müssen Sie Helm verwenden, um die Metadaten beim Upgrade von Milvus von v2.1.x auf v2.2.0 zu migrieren. Hier finden Sie ein Skript, mit dem Sie Ihre Metadaten sicher migrieren können.

        +

        4. Migrieren Sie die Metadaten

        Eine wichtige Änderung in Milvus 2.2 ist die Metadatenstruktur der Segmentindizes. Daher müssen Sie Helm verwenden, um die Metadaten zu migrieren, während Sie Milvus von v2.1.x auf v2.2.0 aktualisieren. Hier finden Sie ein Skript, mit dem Sie Ihre Metadaten sicher migrieren können.

        Dieses Skript gilt nur für Milvus, das auf einem K8s-Cluster installiert ist. Wenn während des Prozesses ein Fehler auftritt, sollten Sie zunächst mit der Rollback-Operation auf die vorherige Version zurückkehren.

        -

        In der folgenden Tabelle sind die Operationen aufgeführt, die Sie für die Metamigration durchführen können.

        +

        In der folgenden Tabelle sind die Operationen aufgeführt, die Sie bei der Migration von Metadaten durchführen können.

        @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
      2. Migrieren Sie die Milvus-Metadaten.
      3. Starten Sie die Milvus-Komponenten mit einem neuen Image.
      4. -

        2. Upgrade von Milvus von v2.1.x auf 2.5.0-beta

        Die folgenden Befehle gehen davon aus, dass Sie Milvus von v2.1.4 auf 2.5.0-beta aktualisieren. Ändern Sie sie auf die Versionen, die Ihren Bedürfnissen entsprechen.

        +

        2. Upgrade von Milvus von v2.1.x auf 2.5.0

        Die folgenden Befehle gehen davon aus, dass Sie Milvus von v2.1.4 auf 2.5.0 aktualisieren. Ändern Sie sie auf die Versionen, die Ihren Anforderungen entsprechen.

        1. Geben Sie den Namen der Milvus-Instanz, die Quell-Milvus-Version und die Ziel-Milvus-Version an.

          -
          ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
          +
          ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
           
        2. Geben Sie den Namespace mit -n an, wenn Ihr Milvus nicht im Standard-Namespace von K8s installiert ist.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
           
        3. Geben Sie den Wurzelpfad mit -r an, wenn Ihr Milvus mit dem benutzerdefinierten rootpath installiert ist.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
           
        4. Geben Sie das Bild-Tag mit -w an, wenn Ihr Milvus mit einem benutzerdefinierten image installiert ist.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
           
        5. Legen Sie -d true fest, wenn Sie den Migrations-Pod automatisch entfernen möchten, nachdem die Migration abgeschlossen ist.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
           
        6. Machen Sie einen Rollback und migrieren Sie erneut, wenn die Migration fehlschlägt.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
          -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
          +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
           
        diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.json index 6ff7592de..d156f5b55 100644 --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Aufrüstung von Milvus Standalone mit Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aktualisieren Sie Ihren Milvus Operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus durch Änderung des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Aufrüstung von Milvus Standalone mit Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aktualisieren Sie Ihren Milvus Operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Durchführen eines rollenden Upgrades","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade von Milvus durch Änderung des Images","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrieren Sie die Metadaten","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.md index 3001906a8..2fb073052 100644 --- a/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/de/adminGuide/upgrade_milvus_standalone-operator.md @@ -9,7 +9,7 @@ summary: >- können. title: Aufrüstung von Milvus Standalone mit Milvus Operator --- - +

        Aufrüstung von Milvus Standalone mit Milvus Operator

        Sobald Sie Ihren Milvus-Operator auf die neueste Version aktualisiert haben, haben Sie die folgenden Möglichkeiten:

        Durchführen eines rollenden Upgrades

        Seit Milvus 2.2.3 können Sie Milvus-Koordinatoren so konfigurieren, dass sie im Aktiv-Standby-Modus arbeiten, und die Funktion des rollenden Upgrades für sie aktivieren, damit Milvus auf eingehende Anfragen während der Koordinator-Upgrades reagieren kann. In früheren Versionen müssen die Koordinatoren während eines Upgrades entfernt und neu erstellt werden, was zu einer gewissen Ausfallzeit des Dienstes führen kann.

        +

        Seit Milvus 2.2.3 können Sie Milvus-Koordinatoren so konfigurieren, dass sie im Aktiv-Standby-Modus arbeiten, und die Funktion "Rolling Upgrade" für sie aktivieren, so dass Milvus auf eingehende Anfragen während der Koordinator-Upgrades reagieren kann. In früheren Versionen müssen die Koordinatoren während eines Upgrades entfernt und neu erstellt werden, was zu einer gewissen Ausfallzeit des Dienstes führen kann.

        Auf der Grundlage der von Kubernetes bereitgestellten rollierenden Aktualisierungsfunktionen erzwingt der Milvus-Operator eine geordnete Aktualisierung der Bereitstellungen entsprechend ihrer Abhängigkeiten. Darüber hinaus implementiert Milvus einen Mechanismus, der sicherstellt, dass seine Komponenten während des Upgrades mit den von ihnen abhängigen Komponenten kompatibel bleiben, wodurch potenzielle Ausfallzeiten des Dienstes erheblich reduziert werden.

        Die Funktion "Rolling Upgrade" ist standardmäßig deaktiviert. Sie müssen sie explizit über eine Konfigurationsdatei aktivieren.

        apiVersion: milvus.io/v1beta1
        @@ -78,7 +78,7 @@ spec:
           components:
             enableRollingUpdate: true
             imageUpdateMode: rollingUpgrade # Default value, can be omitted
        -    image: milvusdb/milvus:v2.5.0-beta
        +    image: milvusdb/milvus:v2.5.0
         

        In der obigen Konfigurationsdatei setzen Sie spec.components.enableRollingUpdate auf true und spec.components.image auf die gewünschte Milvus-Version.

        Standardmäßig führt Milvus ein Rolling Upgrade für Koordinatoren in geordneter Weise durch, wobei die Pod-Images der Koordinatoren nacheinander ersetzt werden. Um die Upgrade-Zeit zu verkürzen, sollten Sie spec.components.imageUpdateMode auf all setzen, damit Milvus alle Pod-Images gleichzeitig ersetzt.

        @@ -90,7 +90,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

        Sie können spec.components.imageUpdateMode auf rollingDowngrade setzen, damit Milvus die Coordinator-Pod-Images durch eine niedrigere Version ersetzt.

        apiVersion: milvus.io/v1beta1
        @@ -132,7 +132,7 @@ labels:
         spec:
           # Omit other fields ...
           components:
        -   image: milvusdb/milvus:v2.5.0-beta
        +   image: milvusdb/milvus:v2.5.0
         

        Führen Sie dann das Folgende aus, um das Upgrade durchzuführen:

        kubectl patch -f milvusupgrade.yaml
        @@ -152,8 +152,8 @@ spec:
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        Seit Milvus 2.2.0 sind die Metadaten nicht mehr mit denen früherer Versionen kompatibel. Die folgenden Beispielschnipsel gehen von einem Upgrade von Milvus 2.1.4 auf Milvus v2.5.0-beta aus.

        -

        1. Erstellen Sie eine .yaml Datei für die Metadaten-Migration

        Erstellen Sie eine Metadaten-Migrationsdatei. Im Folgenden finden Sie ein Beispiel. Sie müssen name, sourceVersion und targetVersion in der Konfigurationsdatei angeben. Im folgenden Beispiel wird name auf my-release-upgrade, sourceVersion auf v2.1.4 und targetVersion auf v2.5.0-beta gesetzt. Dies bedeutet, dass Ihre Milvus-Instanz von v2.1.4 auf v2.5.0-beta aktualisiert wird.

        +

        Seit Milvus 2.2.0 sind die Metadaten nicht mehr mit denen früherer Versionen kompatibel. Die folgenden Beispielschnipsel gehen von einem Upgrade von Milvus 2.1.4 auf Milvus v2.5.0 aus.

        +

        1. Erstellen Sie eine .yaml Datei für die Migration von Metadaten

        Erstellen Sie eine Metadaten-Migrationsdatei. Im Folgenden finden Sie ein Beispiel. Sie müssen name, sourceVersion und targetVersion in der Konfigurationsdatei angeben. Im folgenden Beispiel wird name auf my-release-upgrade, sourceVersion auf v2.1.4 und targetVersion auf v2.5.0 gesetzt. Dies bedeutet, dass Ihre Milvus-Instanz von v2.1.4 auf v2.5.0 aktualisiert wird.

        apiVersion: milvus.io/v1beta1
         kind: MilvusUpgrade
         metadata:
        @@ -163,9 +163,9 @@ spec:
             namespace: default
             name: my-release
           sourceVersion: "v2.1.4"
        -  targetVersion: "v2.5.0-beta"
        +  targetVersion: "v2.5.0"
           # below are some omit default values:
        -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
        +  # targetImage: "milvusdb/milvus:v2.5.0"
           # toolImage: "milvusdb/meta-migration:v2.2.0"
           # operation: upgrade
           # rollbackIfFailed: true
        diff --git a/localization/v2.5.x/site/de/adminGuide/users_and_roles.json b/localization/v2.5.x/site/de/adminGuide/users_and_roles.json
        new file mode 100644
        index 000000000..a4c6e13f7
        --- /dev/null
        +++ b/localization/v2.5.x/site/de/adminGuide/users_and_roles.json
        @@ -0,0 +1 @@
        +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"Benutzer und Rollen erstellen","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"Benutzer","href":"User​","type":2,"isActive":false},{"label":"Rolle","href":"Role​","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/de/adminGuide/users_and_roles.md b/localization/v2.5.x/site/de/adminGuide/users_and_roles.md
        new file mode 100644
        index 000000000..eebbcc161
        --- /dev/null
        +++ b/localization/v2.5.x/site/de/adminGuide/users_and_roles.md
        @@ -0,0 +1,261 @@
        +---
        +id: users_and_roles.md
        +related_key: 'users, roles'
        +summary: >-
        +  Milvus erreicht eine feinkörnige Zugriffskontrolle durch RBAC. Sie können mit
        +  der Erstellung von Benutzern und Rollen beginnen, dann den Rollen Privilegien
        +  oder Privilegiengruppen zuweisen und schließlich die Zugriffskontrolle durch
        +  die Zuweisung von Rollen an Benutzer verwalten. Diese Methode gewährleistet
        +  die Effizienz und Sicherheit der Zugriffsverwaltung. Auf dieser Seite erfahren
        +  Sie, wie Sie Benutzer und Rollen in Milvus erstellen können.
        +title: Benutzer und Rollen erstellen
        +---
        +

        Benutzer und Rollen erstellen

        Milvus erreicht eine feinkörnige Zugriffskontrolle durch RBAC. Sie können mit der Erstellung von Benutzern und Rollen beginnen, dann den Rollen Privilegien oder Privilegiengruppen zuweisen und schließlich die Zugriffskontrolle durch die Zuweisung von Rollen an Benutzer verwalten. Diese Methode gewährleistet die Effizienz und Sicherheit der Zugriffsverwaltung. Auf dieser Seite wird beschrieben, wie man Benutzer und Rollen in Milvus erstellt.

        +

        Benutzer

        Nach der Initialisierung einer Milvus-Instanz wird automatisch ein Root-Benutzer für die Authentifizierung bei der ersten Verbindung mit Milvus erstellt. Der Benutzername des Root-Benutzers ist root und das Passwort lautet Milvus. Die Standardrolle des Root-Benutzers ist admin, der Zugriff auf alle Ressourcen hat. Um die Datensicherheit zu gewährleisten, bewahren Sie bitte die Anmeldedaten des Root-Benutzers sicher auf, um unbefugten Zugriff zu verhindern.

        +

        Für den täglichen Betrieb empfiehlt es sich, Benutzer anzulegen, anstatt den Root-Benutzer zu verwenden.

        +

        Anlegen eines Benutzers

        Das folgende Beispiel zeigt, wie Sie einen Benutzer mit dem Benutzernamen user_1 und dem Passwort P@ssw0rd anlegen. Der Benutzername und das Passwort für den Benutzer müssen diese Regeln befolgen.

        +
          +
        • Benutzername: Muss mit einem Buchstaben beginnen und darf nur Groß- und Kleinbuchstaben, Zahlen und Unterstriche enthalten.

        • +
        • Passwort: Muss 8-64 Zeichen lang sein und drei der folgenden Zeichen enthalten: Großbuchstaben, Kleinbuchstaben, Zahlen und Sonderzeichen.

        • +
        + +
        from pymilvus import MilvusClient​
        +​
        +client = MilvusClient(​
        +    uri="http://localhost:19530",​
        +    token="root:Milvus"​
        +)​
        +​
        +client.create_user(user_name="user_1", password="P@ssw0rd")​
        +
        +
        +
        import io.milvus.v2.client.ConnectConfig;​
        +import io.milvus.v2.client.MilvusClientV2;​
        +import io.milvus.v2.service.rbac.request.CreateUserReq;​
        +​
        +ConnectConfig connectConfig = ConnectConfig.builder()​
        +        .uri("http://localhost:19530")​
        +        .token("root:Milvus")​
        +        .build();​
        +        ​
        +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
        +​
        +CreateUserReq createUserReq = CreateUserReq.builder()​
        +        .userName("user_1")​
        +        .password("P@ssw0rd")​
        +        .build();​
        +        ​
        +client.createUser(createUserReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +const address = "http://localhost:19530";​
        +const token = "root:Milvus";​
        +const client = new MilvusClient({address, token});​
        +​
        +await milvusClient.createUser({​
        +   username: 'user_1',​
        +   password: 'P@ssw0rd',​
        + });​
        +
        +
        +
        export CLUSTER_ENDPOINT="http://localhost:19530"​
        +export TOKEN="root:Milvus"​
        +​
        +curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1",​
        +    "password": "P@ssw0rd"​
        +}'​
        +
        +
        +

        Passwort aktualisieren

        Nach dem Anlegen eines Benutzers können Sie das Passwort aktualisieren, wenn Sie es vergessen haben.

        +

        Das neue Kennwort muss außerdem die folgende Regel erfüllen.

        +
          +
        • Es muss 8-64 Zeichen lang sein und drei der folgenden Zeichen enthalten: Großbuchstaben, Kleinbuchstaben, Zahlen und Sonderzeichen.
        • +
        +

        Das folgende Beispiel zeigt, wie Sie das Kennwort für den Benutzer user_1 in NewP@ssw0rd ändern.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.update_password(​
        +    user_name="user_1",​
        +    old_password="P@ssw0rd",​
        +    new_password="NewP@ssw0rd"​
        +)​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
        +​
        +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
        +        .userName("user_1")​
        +        .password("P@ssw0rd")​
        +        .newPassword("NewP@ssw0rd")​
        +        .build();​
        +client.updatePassword(updatePasswordReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.updateUser({​
        +   username: 'user_1',​
        +   newPassword: 'P@ssw0rd',​
        +   oldPassword: 'NewP@ssw0rd',​
        +});​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "newPassword": "P@ssw0rd!",​
        +    "userName": "user_1",​
        +    "password": "P@ssw0rd"​
        +}'​
        +
        +
        +

        Benutzer auflisten

        Nachdem Sie mehrere Benutzer angelegt haben, können Sie alle vorhandenen Benutzer auflisten und anzeigen.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_users()​
        +
        +
        +
        List<String> resp = client.listUsers();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.listUsers();​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Unten sehen Sie eine Beispielausgabe. root ist der Standardbenutzer, der automatisch in Milvus erstellt wird. user_1 ist der neue Benutzer, der gerade erstellt wurde.

        +
        ['root', 'user_1']​
        +
        +
        +

        Rolle

        Milvus bietet eine eingebaute Rolle namens admin, die eine Administratorrolle ist, die auf Ressourcen unter allen Instanzen zugreifen kann und Privilegien für alle Operationen hat. Für eine feiner abgestufte Zugriffsverwaltung und verbesserte Datensicherheit wird empfohlen, dass Sie benutzerdefinierte Rollen auf der Grundlage Ihrer Bedürfnisse erstellen.

        +

        Eine Rolle erstellen

        Das folgende Beispiel zeigt, wie Sie eine Rolle namens role_a erstellen.

        +

        Der Rollenname muss die folgende Regel erfüllen.

        +
          +
        • Er muss mit einem Buchstaben beginnen und darf nur Groß- oder Kleinbuchstaben, Zahlen und Unterstriche enthalten."
        • +
        + +
        from pymilvus import MilvusClient​
        +​
        +client.create_role(role_name="role_a")​
        +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
        +
        +
        +
        CreateRoleReq createRoleReq = CreateRoleReq.builder()​
        +        .roleName("role_a")​
        +        .build();​
        +       ​
        +
        +
        +
        client.createRole(createRoleReq);​
        +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.createRole({​
        +   roleName: 'role_a',​
        +});​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "roleName": "role_a"​
        +}'​
        +
        +
        +

        Rollen auflisten

        Nachdem Sie mehrere Rollen erstellt haben, können Sie alle vorhandenen Rollen auflisten und ansehen.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_roles()​
        +
        +
        +
        List<String> roles = client.listRoles();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.listRoles(​
        +    includeUserInfo: True​
        +);​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Unten sehen Sie eine Beispielausgabe. admin ist die Standardrolle in Milvus. role_a ist die neue Rolle, die gerade erstellt wurde.

        +
        ['admin', 'role_a']​
        +
        +
        diff --git a/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 1a459f20d..2858e8a3d 100644 --- a/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Milvus mit Docker Compose ausführen (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Installieren Sie Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Milvus mit Docker Compose ausführen (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Installieren Sie Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.md index 35e1ff45a..17917df54 100644 --- a/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/de/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Milvus mit Docker Compose ausführen (Linux)

        Milvus bietet eine Docker Compose-Konfigurationsdatei im Milvus-Repository. Um Milvus mit Docker Compose zu installieren, führen Sie einfach folgenden Befehl aus

        # Download the configuration file
        -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
        +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
         
         # Start Milvus
         $ sudo docker compose up -d
        diff --git a/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
        index 0cdb22888..b4a8915f7 100644
        --- a/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
        +++ b/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
        @@ -1 +1 @@
        -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Milvus mit GPU-Unterstützung mit Docker Compose starten","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus installieren","href":"Install-Milvus","type":2,"isActive":false},{"label":"Speicherpool konfigurieren","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Milvus mit GPU-Unterstützung mit Docker Compose starten","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Voraussetzungen","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus installieren","href":"Install-Milvus","type":2,"isActive":false},{"label":"Speicherpool konfigurieren","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Wie geht es weiter?","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
        index befad2619..5ee35258b 100644
        --- a/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
        +++ b/localization/v2.5.x/site/de/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
        @@ -58,9 +58,9 @@ title: Milvus mit GPU-Unterstützung mit Docker Compose starten
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        Um Milvus mit GPU-Unterstützung mit Docker Compose zu installieren, führen Sie folgende Schritte aus.

        -

        1. Herunterladen und Konfigurieren der YAML-Datei

        Laden Sie herunter milvus-standalone-docker-compose-gpu.yml und speichern Sie sie als docker-compose.yml manuell oder mit dem folgenden Befehl.

        -
        $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
        +    

        Um Milvus mit GPU-Unterstützung mit Docker Compose zu installieren, führen Sie die folgenden Schritte aus.

        +

        1. Herunterladen und Konfigurieren der YAML-Datei

        Laden Sie herunter milvus-standalone-docker-compose-gpu.yml und speichern Sie sie als docker-compose.yml manuell oder mit dem folgenden Befehl.

        +
        $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
         

        Sie müssen einige Änderungen an den Umgebungsvariablen des eigenständigen Dienstes in der YAML-Datei wie folgt vornehmen:

          @@ -110,7 +110,7 @@ Creating milvus-standalone ... done
        • Der milvus-standalone-Container bedient lokal die Ports 19530 mit den Standardeinstellungen und ordnet seine Daten den Volumes/milvus im aktuellen Ordner zu.
        -

        Mit folgendem Befehl können Sie überprüfen, ob die Container aktiv sind:

        +

        Mit dem folgenden Befehl können Sie überprüfen, ob die Container aktiv sind:

        $ sudo docker compose ps
         
               Name                     Command                  State                            Ports
        diff --git a/localization/v2.5.x/site/de/menuStructure/de.json b/localization/v2.5.x/site/de/menuStructure/de.json
        index 9505151d1..433fe6ad3 100644
        --- a/localization/v2.5.x/site/de/menuStructure/de.json
        +++ b/localization/v2.5.x/site/de/menuStructure/de.json
        @@ -701,40 +701,71 @@
                     "order": 5,
                     "children": []
                   },
        +          {
        +            "label": "Filtern",
        +            "id": "filtering",
        +            "order": 6,
        +            "children": [
        +              {
        +                "label": "Filterung erklärt",
        +                "id": "boolean.md",
        +                "order": 0,
        +                "children": []
        +              },
        +              {
        +                "label": "Grundlegende Operatoren",
        +                "id": "basic-operators.md",
        +                "order": 1,
        +                "children": []
        +              },
        +              {
        +                "label": "Filterung Schablonierung",
        +                "id": "filtering-templating.md",
        +                "order": 2,
        +                "children": []
        +              },
        +              {
        +                "label": "JSON-Operatoren",
        +                "id": "json-operators.md",
        +                "order": 3,
        +                "children": []
        +              },
        +              {
        +                "label": "Array-Operatoren",
        +                "id": "array-operators.md",
        +                "order": 4,
        +                "children": []
        +              }
        +            ]
        +          },
                   {
                     "label": "Volltextsuche",
                     "id": "full-text-search.md",
        -            "order": 6,
        +            "order": 7,
                     "children": []
                   },
                   {
                     "label": "Textübereinstimmung",
                     "id": "keyword-match.md",
        -            "order": 7,
        +            "order": 8,
                     "children": []
                   },
                   {
                     "label": "Iteratoren suchen",
                     "id": "with-iterators.md",
        -            "order": 8,
        +            "order": 9,
                     "children": []
                   },
                   {
                     "label": "Partitionsschlüssel verwenden",
                     "id": "use-partition-key.md",
        -            "order": 9,
        -            "children": []
        -          },
        -          {
        -            "label": "Filterung von Metadaten",
        -            "id": "boolean.md",
        -            "order": 14,
        +            "order": 10,
                     "children": []
                   },
                   {
                     "label": "Neueinstufung",
                     "id": "reranking.md",
        -            "order": 15,
        +            "order": 11,
                     "children": []
                   }
                 ]
        @@ -1364,17 +1395,48 @@
                     "children": []
                   },
                   {
        -            "label": "Benutzer, Privilegien und Rollen",
        -            "id": "users_and_roles.md",
        -            "order": 10,
        -            "children": []
        -          },
        -          {
        -            "label": "RBAC aktivieren",
        -            "id": "rbac.md",
        +            "label": "RBAC",
        +            "id": "rbac",
                     "order": 1,
                     "isMenu": true,
        -            "children": []
        +            "children": [
        +              {
        +                "label": "RBAC Erklärt",
        +                "id": "rbac.md",
        +                "order": 0,
        +                "children": []
        +              },
        +              {
        +                "label": "Benutzer und Rollen erstellen",
        +                "id": "users_and_roles.md",
        +                "order": 1,
        +                "children": []
        +              },
        +              {
        +                "label": "Privilegiengruppe erstellen",
        +                "id": "privilege_group.md",
        +                "order": 2,
        +                "children": []
        +              },
        +              {
        +                "label": "Privilegien erteilen",
        +                "id": "grant_privileges.md",
        +                "order": 3,
        +                "children": []
        +              },
        +              {
        +                "label": "Zuschuss-Rollen",
        +                "id": "grant_roles.md",
        +                "order": 4,
        +                "children": []
        +              },
        +              {
        +                "label": "Benutzer und Rollen löschen",
        +                "id": "drop_users_roles.md",
        +                "order": 5,
        +                "children": []
        +              }
        +            ]
                   },
                   {
                     "label": "Verschlüsselung im Transit",
        @@ -1513,6 +1575,12 @@
                   }
                 ]
               },
        +      {
        +        "label": "Milvus WebUI",
        +        "id": "milvus-webui.md",
        +        "order": 6,
        +        "children": []
        +      },
               {
                 "label": "Milvus Größenberechnungs-Tool",
                 "id": "sizing",
        diff --git a/localization/v2.5.x/site/de/release_notes.json b/localization/v2.5.x/site/de/release_notes.json
        index c7ff97c4c..c286278ac 100644
        --- a/localization/v2.5.x/site/de/release_notes.json
        +++ b/localization/v2.5.x/site/de/release_notes.json
        @@ -1 +1 @@
        -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Hinweise zur Veröffentlichung","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Hinweise zur Veröffentlichung","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/de/release_notes.md b/localization/v2.5.x/site/de/release_notes.md
        index c5956004a..cac530fff 100644
        --- a/localization/v2.5.x/site/de/release_notes.md
        +++ b/localization/v2.5.x/site/de/release_notes.md
        @@ -18,8 +18,8 @@ title: Hinweise zur Veröffentlichung
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        Finden Sie heraus, was es Neues in Milvus gibt! Auf dieser Seite werden neue Funktionen, Verbesserungen, bekannte Probleme und Fehlerbehebungen in jeder Version zusammengefasst. In diesem Abschnitt finden Sie die Versionshinweise für jede veröffentlichte Version nach v2.5.0. Wir empfehlen Ihnen, diese Seite regelmäßig zu besuchen, um sich über Updates zu informieren.

        -

        v2.5.0-beta

        Finden Sie heraus, was es Neues in Milvus gibt! Auf dieser Seite werden neue Funktionen, Verbesserungen, bekannte Probleme und Fehlerbehebungen in jeder Version zusammengefasst. Sie können die Versionshinweise für jede Version nach v2.5.0 in diesem Abschnitt finden. Wir empfehlen Ihnen, diese Seite regelmäßig zu besuchen, um sich über Updates zu informieren.

        +

        v2.5.0

        Veröffentlichungsdatum: November 26, 2024

        +

        Veröffentlichungsdatum: Dezember 23, 2024

        ParameterBeschreibungStandardwertErforderlich
        - +
        Milvus-VersionPython SDK-VersionNode.js SDK-VersionJava SDK-Version
        2.5.0-beta2.5.02.5.02.5.0
        2.5.02.5.12.5.22.5.2
        -

        Milvus 2.5.0-beta bringt bedeutende Fortschritte zur Verbesserung der Benutzerfreundlichkeit, Skalierbarkeit und Leistung für Benutzer, die mit Vektorsuche und umfangreicher Datenverwaltung zu tun haben. Mit dieser Version integriert Milvus leistungsstarke neue Funktionen wie die begriffsbasierte Suche, Clustering-Kompaktierung für optimierte Abfragen und vielseitige Unterstützung für spärliche und dichte Vektorsuchmethoden. Verbesserungen in den Bereichen Cluster-Management, Indizierung und Datenhandhabung bieten ein neues Maß an Flexibilität und Benutzerfreundlichkeit und machen Milvus zu einer noch robusteren und benutzerfreundlicheren Vektordatenbank.

        +

        Milvus 2.5.0 bringt bedeutende Fortschritte zur Verbesserung der Benutzerfreundlichkeit, Skalierbarkeit und Leistung für Benutzer, die mit Vektorsuche und umfangreicher Datenverwaltung zu tun haben. Mit dieser Version integriert Milvus leistungsstarke neue Funktionen wie die begriffsbasierte Suche, Clustering-Kompaktierung für optimierte Abfragen und vielseitige Unterstützung für spärliche und dichte Vektorsuchmethoden. Verbesserungen in den Bereichen Cluster-Management, Indizierung und Datenhandling sorgen für ein neues Maß an Flexibilität und Benutzerfreundlichkeit und machen Milvus zu einer noch robusteren und benutzerfreundlicheren Vektordatenbank.

        Wesentliche Merkmale

        Milvus 2.5 unterstützt die mit Sparse-BM25 implementierte Volltextsuche! Diese Funktion ist eine wichtige Ergänzung zu den starken semantischen Suchfähigkeiten von Milvus, insbesondere in Szenarien, die seltene Wörter oder technische Begriffe beinhalten. In früheren Versionen unterstützte Milvus Sparse-Vektoren, um bei der Stichwortsuche zu helfen. Diese spärlichen Vektoren wurden außerhalb von Milvus durch neuronale Modelle wie SPLADEv2/BGE-M3 oder statistische Modelle wie den BM25-Algorithmus erzeugt.

        -

        Milvus 2.5 basiert auf Tantivy und verfügt über eingebaute Analysatoren und Sparse-Vektor-Extraktion, wodurch die API nicht mehr nur Vektoren als Eingabe erhält, sondern auch direkt Text akzeptiert. Die statistischen BM25-Informationen werden in Echtzeit aktualisiert, wenn Daten eingefügt werden, was die Benutzerfreundlichkeit und Genauigkeit erhöht. Darüber hinaus bieten spärliche Vektoren auf der Grundlage von ANN-Algorithmen (Approximate Nearest Neighbour) eine bessere Leistung als Standard-Schlüsselwortsuchsysteme.

        +

        Milvus 2.5 basiert auf Tantivy und verfügt über eingebaute Analysatoren und Sparse-Vektor-Extraktion, wodurch die API nicht mehr nur Vektoren als Eingabe erhält, sondern auch direkt Text akzeptiert. Die statistischen BM25-Informationen werden in Echtzeit aktualisiert, wenn Daten eingefügt werden, was die Benutzerfreundlichkeit und Genauigkeit erhöht. Darüber hinaus bieten spärliche Vektoren, die auf ANN-Algorithmen (Approximate Nearest Neighbour) basieren, eine bessere Leistung als Standard-Schlüsselwortsuchsysteme.

        Einzelheiten finden Sie unter Analyzer-Übersicht und Volltextsuche.

        Cluster Management WebUI (Beta)

        Um massive Daten und umfangreiche Funktionen besser zu unterstützen, umfasst das ausgeklügelte Design von Milvus verschiedene Abhängigkeiten, zahlreiche Knotenrollen, komplexe Datenstrukturen und mehr. Diese Aspekte können eine Herausforderung für die Nutzung und Wartung darstellen.

        Milvus 2.5 führt eine integrierte Cluster Management WebUI ein, die die Schwierigkeiten bei der Systemwartung reduziert, indem sie die komplexen Informationen der Milvus-Laufzeitumgebung visualisiert. Dazu gehören Details zu Datenbanken und Sammlungen, Segmenten, Kanälen, Abhängigkeiten, Knotenstatus, Aufgabeninformationen, langsame Abfragen und vieles mehr.

        -

        Textabgleich

        Milvus 2.5 nutzt die Analyse- und Indizierungsfunktionen von Tantivy für die Textvorverarbeitung und den Aufbau von Indizes und unterstützt den präzisen Abgleich von Textdaten in natürlicher Sprache auf der Grundlage bestimmter Begriffe. Diese Funktion wird in erster Linie für die gefilterte Suche nach bestimmten Bedingungen verwendet und kann skalare Filter zur Verfeinerung von Abfrageergebnissen einbeziehen, so dass Ähnlichkeitssuchen innerhalb von Vektoren, die skalare Kriterien erfüllen, möglich sind.

        +

        Textabgleich

        Milvus 2.5 nutzt die Analyse- und Indizierungsfunktionen von Tantivy für die Textvorverarbeitung und den Aufbau von Indizes und unterstützt den präzisen Abgleich von Textdaten in natürlicher Sprache auf der Grundlage bestimmter Begriffe. Diese Funktion wird in erster Linie für die gefilterte Suche nach bestimmten Bedingungen verwendet und kann skalare Filterung zur Verfeinerung von Abfrageergebnissen einbeziehen, was eine Ähnlichkeitssuche innerhalb von Vektoren ermöglicht, die skalare Kriterien erfüllen.

        Weitere Informationen finden Sie unter Analyzer Overview und Text Match.

        Bitmap-Index

        Ein neuer skalarer Datenindex wurde der Milvus-Familie hinzugefügt. Der BitMap-Index verwendet ein Array von Bits, dessen Länge der Anzahl der Zeilen entspricht, um die Existenz von Werten darzustellen und die Suche zu beschleunigen.

        -

        Bitmap-Indizes haben sich traditionell für Felder mit niedriger Kardinalität bewährt, die nur eine geringe Anzahl unterschiedlicher Werte aufweisen, z. B. eine Spalte mit Geschlechtsinformationen, die nur zwei mögliche Werte enthält: männlich und weiblich.

        +

        Bitmap-Indizes haben sich traditionell bei Feldern mit niedriger Kardinalität bewährt, die nur eine geringe Anzahl unterschiedlicher Werte haben, z. B. eine Spalte mit Geschlechtsinformationen, die nur zwei mögliche Werte enthält: männlich und weiblich.

        Weitere Informationen finden Sie unter Bitmap-Index.

        -

        Nullbar & Standardwert

        Milvus unterstützt jetzt das Festlegen von löschbaren Eigenschaften und Standardwerten für skalare Felder mit Ausnahme des Primärschlüsselfeldes. Bei skalaren Feldern, die als nullable=True gekennzeichnet sind, können Benutzer das Feld beim Einfügen von Daten auslassen; das System behandelt es als Nullwert oder Standardwert (falls gesetzt), ohne einen Fehler zu verursachen.

        +

        Nullbar & Standardwert

        Milvus unterstützt jetzt das Festlegen von löschbaren Eigenschaften und Standardwerten für skalare Felder mit Ausnahme des Primärschlüsselfeldes. Bei skalaren Feldern, die als nullable=True markiert sind, können Benutzer das Feld beim Einfügen von Daten auslassen; das System behandelt es als Nullwert oder Standardwert (falls gesetzt), ohne einen Fehler zu verursachen.

        Standardwerte und löschbare Eigenschaften bieten Milvus mehr Flexibilität. Benutzer können diese Funktion für Felder mit unsicheren Werten bei der Erstellung von Sammlungen nutzen. Es vereinfacht auch die Datenmigration von anderen Datenbanksystemen zu Milvus, indem es die Handhabung von Datensätzen mit Nullwerten unter Beibehaltung der ursprünglichen Standardwerteinstellungen ermöglicht.

        Einzelheiten finden Sie unter Nullable & Default Value.

        Faiss-basierte HNSW SQ/PQ/PRQ

        Durch die enge Zusammenarbeit mit der Faiss-Gemeinschaft konnte der HNSW-Algorithmus in Faiss sowohl in Bezug auf die Funktionalität als auch auf die Leistung erheblich verbessert werden. Aus Gründen der Stabilität und Wartungsfreundlichkeit hat Milvus 2.5 seine Unterstützung für HNSW offiziell von hnswlib nach Faiss verlagert.

        -

        Basierend auf Faiss unterstützt Milvus 2.5 mehrere Quantisierungsmethoden für HNSW, um den Anforderungen verschiedener Szenarien gerecht zu werden: SQ (Scalar Quantizer), PQ (Product Quantizer) und PRQ (Product Residual Quantizer). SQ und PQ sind häufiger anzutreffen; SQ bietet eine gute Abfrageleistung und Aufbaugeschwindigkeit, während PQ bei gleichem Komprimierungsverhältnis eine bessere Wiedererkennung bietet. Viele Vektordatenbanken verwenden in der Regel eine binäre Quantisierung, die eine einfache Form der SQ-Quantisierung darstellt.

        +

        Basierend auf Faiss unterstützt Milvus 2.5 mehrere Quantisierungsmethoden für HNSW, um den Anforderungen verschiedener Szenarien gerecht zu werden: SQ (Scalar Quantizer), PQ (Product Quantizer) und PRQ (Product Residual Quantizer). SQ und PQ sind häufiger anzutreffen; SQ bietet eine gute Abfrageleistung und Erstellungsgeschwindigkeit, während PQ bei gleichem Komprimierungsverhältnis eine bessere Wiedererkennung bietet. Viele Vektordatenbanken verwenden in der Regel eine binäre Quantisierung, die eine einfache Form der SQ-Quantisierung darstellt.

        PRQ ist eine Verschmelzung von PQ und AQ (Additive Quantizer). Im Vergleich zu PQ sind längere Erstellungszeiten erforderlich, um einen besseren Recall zu erzielen, insbesondere bei hohen Komprimierungsraten, wie bei der binären Komprimierung.

        -

        Clustering-Verdichtung (Beta)

        Milvus 2.5 führt die Clustering Compaction ein, um die Suche zu beschleunigen und die Kosten in großen Sammlungen zu reduzieren. Durch die Angabe eines skalaren Feldes als Clustering-Schlüssel werden die Daten nach Bereichen umverteilt, um die Speicherung und den Abruf zu optimieren. Diese Funktion funktioniert wie ein globaler Index und ermöglicht Milvus, Daten bei Abfragen auf der Grundlage von Clustering-Metadaten effizient zu beschneiden und die Suchleistung zu verbessern, wenn skalare Filter angewendet werden.

        +

        Clustering-Verdichtung (Beta)

        Milvus 2.5 führt die Clustering Compaction ein, um die Suche zu beschleunigen und die Kosten in großen Sammlungen zu reduzieren. Durch die Angabe eines skalaren Feldes als Clustering-Schlüssel werden die Daten nach Bereichen umverteilt, um die Speicherung und den Abruf zu optimieren. Diese Funktion funktioniert wie ein globaler Index und ermöglicht es Milvus, Daten bei Abfragen auf der Grundlage von Clustering-Metadaten effizient zu beschneiden und die Suchleistung zu verbessern, wenn skalare Filter angewendet werden.

        Einzelheiten finden Sie unter Clustering Compaction.

        -

        Andere Funktionen

        Streaming-Knoten (Beta)

        Mit Milvus 2.5 wird eine neue Komponente namens Streaming Node eingeführt, die WAL-Dienste (Write-Ahead Logging) bereitstellt. Dadurch ist Milvus in der Lage, vor und nach dem Lesen und Schreiben von Kanälen einen Konsens zu erzielen, wodurch neue Merkmale, Funktionalitäten und Optimierungen möglich werden. Diese Funktion ist in Milvus 2.5 standardmäßig deaktiviert und wird in Version 3.0 offiziell verfügbar sein.

        +

        Andere Funktionen

        Streaming-Knoten (Beta)

        Mit Milvus 2.5 wird eine neue Komponente namens Streaming Node eingeführt, die WAL-Dienste (Write-Ahead Logging) bereitstellt. Dadurch ist Milvus in der Lage, vor und nach dem Lesen und Schreiben von Kanälen einen Konsens zu erzielen, wodurch neue Merkmale, Funktionen und Optimierungen freigeschaltet werden. Diese Funktion ist in Milvus 2.5 standardmäßig deaktiviert und wird in Version 3.0 offiziell verfügbar sein.

        IPv6-Unterstützung

        Milvus unterstützt jetzt IPv6, was eine erweiterte Netzwerkkonnektivität und Kompatibilität ermöglicht.

        CSV-Bulk-Import

        Zusätzlich zu den JSON- und Parquet-Formaten unterstützt Milvus jetzt auch den direkten Massenimport von Daten im CSV-Format.

        Expression Templates zur Abfrage-Beschleunigung

        Milvus unterstützt jetzt Ausdrucksvorlagen und verbessert damit die Effizienz der Ausdrucksanalyse, insbesondere in Szenarien mit komplexen Ausdrücken.

        @@ -74,10 +74,13 @@ title: Hinweise zur Veröffentlichung
      5. MVCC-Unterstützung: Dank der Multi-Version Concurrency Control (MVCC) können Benutzer jetzt Iteratoren verwenden, ohne von nachfolgenden Datenänderungen wie Einfügungen und Löschungen betroffen zu sein.
      6. Persistenter Cursor: Milvus unterstützt jetzt einen persistenten Cursor für QueryIterator, so dass Benutzer die Iteration nach einem Neustart von Milvus an der letzten Position wieder aufnehmen können, ohne den gesamten Iterationsprozess neu starten zu müssen.
      7. -

        Verbesserungen

        Optimierung des Löschens

        Verbesserte Geschwindigkeit und verringerter Speicherverbrauch bei umfangreichen Löschungen durch Optimierung der Sperrenverwendung und der Speicherverwaltung.

        +

        Verbesserungen

        Optimierung des Löschens

        Verbesserte Geschwindigkeit und verringerter Speicherverbrauch bei umfangreichen Löschvorgängen durch Optimierung der Sperrenverwendung und der Speicherverwaltung.

        Upgrade der Abhängigkeiten

        Upgrade auf ETCD 3.5.16 und Pulsar 3.0.7 LTS, wobei bestehende CVEs behoben und die Sicherheit verbessert wurde. Hinweis: Das Upgrade auf Pulsar 3.x ist nicht mit früheren 2.x-Versionen kompatibel.

        Benutzer, die bereits eine funktionierende Milvus-Installation haben, müssen die ETCD- und Pulsar-Komponenten aktualisieren, bevor sie die neuen Features und Funktionen nutzen können. Einzelheiten finden Sie unter Upgrade von Pulsar von 2.x auf 3.x

        Lokale Speicherung V2

        In Milvus 2.5 wurde ein neues lokales Dateiformat eingeführt, das die Lade- und Abfrageeffizienz für skalare Daten verbessert, den Speicher-Overhead reduziert und die Grundlage für künftige Optimierungen schafft.

        Optimierung des Ausdrucks-Parsing

        Verbessertes Parsen von Ausdrücken durch Implementierung von Caching für wiederholte Ausdrücke, Aktualisierung von ANTLR und Optimierung der Leistung von NOT IN Klauseln.

        Verbesserte DDL-Gleichzeitigkeitsleistung

        Die Gleichzeitigkeitsleistung von Data Definition Language (DDL)-Operationen wurde optimiert.

        Angleichung der RESTful-API-Funktionen

        Angleichung der Funktionen der RESTful-API an andere SDKs zur Gewährleistung der Konsistenz.

        +

        Aktualisierungen für Sicherheit und Konfiguration

        Unterstützung von TLS zur Sicherung der Kommunikation zwischen Knoten in komplexeren oder Unternehmensumgebungen. Details finden Sie unter Sicherheitskonfiguration.

        +

        Leistungsverbesserungen bei der Komprimierung

        Die maximale Segmentbegrenzung bei der gemischten Komprimierung wurde aufgehoben und kleinere Segmente werden nun zuerst priorisiert, wodurch die Effizienz verbessert und Abfragen bei großen oder fragmentierten Datensätzen beschleunigt werden.

        +

        Score-basierter Channel-Ausgleich

        Es wurde eine Richtlinie eingeführt, die die Lasten dynamisch über die Kanäle hinweg ausgleicht und so die Ressourcennutzung und die Gesamtstabilität in groß angelegten Implementierungen verbessert.

        diff --git a/localization/v2.5.x/site/de/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/de/userGuide/collections/modify-collection.json index 15e9a99b0..e5763c48b 100644 --- a/localization/v2.5.x/site/de/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/de/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Sammlung ändern","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Sammlung umbenennen","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Sammlung TTL einstellen","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Sammlung ändern","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Sammlung umbenennen","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Sammlung TTL einstellen","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/de/userGuide/collections/modify-collection.md index 10f607629..f310bef0f 100644 --- a/localization/v2.5.x/site/de/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/de/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

        Wenn eine Sammlung für einen bestimmten Zeitraum gelöscht werden soll, sollten Sie ihre Time-To-Live (TTL) in Sekunden festlegen. Sobald die TTL abgelaufen ist, löscht Milvus die Entitäten in der Sammlung und lässt die Sammlung fallen. Die Löschung erfolgt asynchron, was bedeutet, dass Suchen und Abfragen noch möglich sind, bevor die Löschung abgeschlossen ist.

        +

        Wenn eine Sammlung für einen bestimmten Zeitraum gelöscht werden soll, sollten Sie ihre Time-To-Live (TTL) in Sekunden festlegen. Sobald die TTL abläuft, löscht Milvus die Entitäten in der Sammlung. Die Löschung erfolgt asynchron, was bedeutet, dass Suchen und Abfragen noch möglich sind, bevor die Löschung abgeschlossen ist.

        Der folgende Codeschnipsel demonstriert, wie die TTL einer Sammlung geändert werden kann.

        -
        # Currently not available for Python
        +
        from pymilvus import MilvusClient
         
        +client.alter_collection_properties(
        +  collection_name="collection_name",
        +  properties = {"collection.ttl.seconds": 500}
        +)
         
        import io.milvus.v2.service.collection.request.AlterCollectionReq;​
         import java.util.HashMap;​
        diff --git a/localization/v2.5.x/site/de/userGuide/schema/string.md b/localization/v2.5.x/site/de/userGuide/schema/string.md
        index 90390a394..ee1e6d217 100644
        --- a/localization/v2.5.x/site/de/userGuide/schema/string.md
        +++ b/localization/v2.5.x/site/de/userGuide/schema/string.md
        @@ -2,10 +2,10 @@
         id: string.md
         title: String-Feld
         summary: >-
        -  In Milvus ist VARCHAR der Datentyp, der für die Speicherung von stringartigen
        -  Daten verwendet wird und für die Speicherung von Strings mit variabler Länge
        +  In Milvus ist VARCHAR der Datentyp, der für die Speicherung von Daten vom Typ
        +  String verwendet wird und für die Speicherung von Strings mit variabler Länge
           geeignet ist. Er kann Zeichenketten mit Einzel- und Multi-Byte-Zeichen
        -  speichern, mit einer maximalen Länge von bis zu 60.535 Zeichen. Wenn Sie ein
        +  speichern, mit einer maximalen Länge von bis zu 65.535 Zeichen. Wenn Sie ein
           VARCHAR-Feld definieren, müssen Sie auch den Parameter max_length für die
           maximale Länge angeben. Der Zeichenkettentyp VARCHAR bietet eine effiziente
           und flexible Möglichkeit zum Speichern und Verwalten von Textdaten und ist
        @@ -27,7 +27,7 @@ summary: >-
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        In Milvus ist VARCHAR der Datentyp, der für die Speicherung von stringartigen Daten verwendet wird und für die Speicherung von Strings mit variabler Länge geeignet ist. Er kann Zeichenketten mit Einzel- und Multi-Byte-Zeichen speichern, mit einer maximalen Länge von bis zu 60.535 Zeichen. Wenn Sie ein Feld VARCHAR definieren, müssen Sie auch den Parameter für die maximale Länge max_length angeben. Der Stringtyp VARCHAR bietet eine effiziente und flexible Möglichkeit zum Speichern und Verwalten von Textdaten und ist daher ideal für Anwendungen, die Strings unterschiedlicher Länge verarbeiten.

        +

        In Milvus ist VARCHAR der Datentyp, der für die Speicherung von stringartigen Daten verwendet wird und für die Speicherung von Strings mit variabler Länge geeignet ist. Er kann Zeichenketten mit Einzel- und Multi-Byte-Zeichen speichern, mit einer maximalen Länge von bis zu 65.535 Zeichen. Wenn Sie ein Feld VARCHAR definieren, müssen Sie auch den Parameter für die maximale Länge max_length angeben. Der Stringtyp VARCHAR bietet eine effiziente und flexible Möglichkeit zum Speichern und Verwalten von Textdaten und ist daher ideal für Anwendungen, die Strings unterschiedlicher Länge verarbeiten.

        VARCHAR-Feld hinzufügen

        Milvus bietet leistungsstarke Operatoren zur Abfrage von Array-Feldern, die es Ihnen ermöglichen, Entitäten auf der Grundlage des Inhalts von Arrays zu filtern und abzurufen.

        +
        +

        Alle Elemente innerhalb eines Arrays müssen vom gleichen Typ sein, und verschachtelte Strukturen innerhalb von Arrays werden wie einfache Zeichenketten behandelt. Daher ist es ratsam, bei der Arbeit mit ARRAY-Feldern übermäßig tiefe Verschachtelungen zu vermeiden und sicherzustellen, dass Ihre Datenstrukturen für eine optimale Leistung so flach wie möglich sind.

        +
        +

        Verfügbare ARRAY-Operatoren

        Die ARRAY-Operatoren ermöglichen eine feinkörnige Abfrage von Array-Feldern in Milvus. Diese Operatoren sind.

        + +

        ARRAY_CONTAINS

        Der ARRAY_CONTAINS Operator prüft, ob ein bestimmtes Element in einem Array-Feld vorhanden ist. Er ist nützlich, wenn Sie Entitäten finden wollen, bei denen ein bestimmtes Element in dem Array vorhanden ist.

        +

        Beispiel

        +

        Angenommen, Sie haben ein Array-Feld history_temperatures, das die aufgezeichneten niedrigsten Temperaturen für verschiedene Jahre enthält. Um alle Entitäten zu finden, in denen das Array den Wert 23 enthält, können Sie den folgenden Filterausdruck verwenden.

        +
        filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
        +
        +
        +

        Dieser gibt alle Entitäten zurück, bei denen das Array history_temperatures den Wert 23 enthält.

        +

        ARRAY_CONTAINS_ALL

        Der ARRAY_CONTAINS_ALL Operator stellt sicher, dass alle Elemente der angegebenen Liste im Array-Feld vorhanden sind. Dieser Operator ist nützlich, wenn Sie Entitäten abgleichen möchten, die mehrere Werte im Array enthalten.

        +

        Beispiel

        +

        Wenn Sie alle Entitäten finden möchten, bei denen das Array history_temperatures sowohl 23 als auch 24 enthält, können Sie verwenden.

        +
        filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
        +
        +
        +

        Dies gibt alle Entitäten zurück, bei denen das Array history_temperatures beide der angegebenen Werte enthält.

        +

        ARRAY_CONTAINS_ANY

        Der ARRAY_CONTAINS_ANY Operator prüft, ob eines der Elemente aus der angegebenen Liste im Array-Feld vorhanden ist. Dies ist nützlich, wenn Sie Entitäten abgleichen möchten, die mindestens einen der angegebenen Werte im Array enthalten.

        +

        Beispiel

        +

        Um alle Entitäten zu finden, bei denen das Array history_temperatures entweder 23 oder 24 enthält, können Sie verwenden.

        +
        filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
        +
        +
        +

        Dies wird alle Entitäten zurückgeben, bei denen das Array history_temperatures mindestens einen der Werte 23 oder 24 enthält.

        +

        ARRAY_LENGTH

        Der ARRAY_LENGTH Operator ermöglicht es Ihnen, Entitäten auf der Grundlage der Anzahl der Elemente in einem Array-Feld zu filtern. Dies ist nützlich, wenn Sie Entitäten mit Arrays einer bestimmten Länge finden müssen.

        +

        Beispiel

        +

        Wenn Sie alle Entitäten finden wollen, bei denen das Array history_temperatures weniger als 10 Elemente hat, können Sie verwenden.

        +
        filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
        +
        +
        +

        Dies wird alle Entitäten zurückgeben, bei denen das Array history_temperatures weniger als 10 Elemente hat.

        diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..05b7063e8 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"Grundlegende Operatoren","href":"Basic-Operators​","type":1,"isActive":false},{"label":"Vergleichsoperatoren","href":"Comparison-operators​","type":2,"isActive":false},{"label":"Bereichsoperatoren","href":"Range-operators​","type":2,"isActive":false},{"label":"Arithmetische Operatoren","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"Logische Operatoren","href":"Logical-Operators​","type":2,"isActive":false},{"label":"Tipps zur Verwendung grundlegender Operatoren mit JSON- und ARRAY-Feldern","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"Schlussfolgerung","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..5dc9a86c5 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,237 @@ +--- +id: basic-operators.md +summary: >- + Milvus bietet eine Vielzahl von grundlegenden Operatoren, mit denen Sie Daten + effizient filtern und abfragen können. Mit diesen Operatoren können Sie Ihre + Suchbedingungen auf der Grundlage von skalaren Feldern, numerischen + Berechnungen, logischen Bedingungen und mehr verfeinern. Die Kenntnis der + Verwendung dieser Operatoren ist entscheidend für die Erstellung präziser + Abfragen und die Maximierung der Effizienz Ihrer Suchvorgänge. +title: Grundlegende Operatoren +--- +

        Grundlegende Operatoren

        Milvus bietet einen umfangreichen Satz von Basisoperatoren, die Ihnen helfen, Daten effizient zu filtern und abzufragen. Mit diesen Operatoren können Sie Ihre Suchbedingungen auf der Grundlage von skalaren Feldern, numerischen Berechnungen, logischen Bedingungen und mehr verfeinern. Das Verständnis für die Verwendung dieser Operatoren ist entscheidend für die Erstellung präziser Abfragen und die Maximierung der Effizienz Ihrer Suchen.

        +

        Vergleichsoperatoren

        Vergleichsoperatoren werden verwendet, um Daten auf der Grundlage von Gleichheit, Ungleichheit oder Größe zu filtern. Sie sind auf numerische, Text- und Datumsfelder anwendbar.

        +

        Unterstützte Vergleichsoperatoren.

          +
        • == (Gleich)

        • +
        • != (Nicht gleich)

        • +
        • > (Größer als)

        • +
        • < (Kleiner als)

        • +
        • >= (Größer als oder gleich)

        • +
        • <= (Kleiner als oder gleich)

        • +
        +

        Beispiel 1: Filtern mit Gleich bis (==)

        Angenommen, Sie haben ein Feld namens status und möchten alle Entitäten finden, bei denen status "aktiv" ist. Sie können den Gleichheitsoperator == verwenden.

        +
        filter = 'status == "active"'​
        +
        +
        +

        Beispiel 2: Filtern mit Not Equal To (!=)

        Um Entitäten zu finden, bei denen status nicht "inaktiv" ist.

        +
        filter = 'status != "inactive"'​
        +
        +
        +

        Beispiel 3: Filtern mit Größer als (>)

        Wenn Sie alle Entitäten finden wollen, deren age größer als 30 ist.

        +
        filter = 'age > 30'​
        +
        +
        +

        Beispiel 4: Filtern mit "kleiner als" (<)

        Um Entitäten zu finden, bei denen price kleiner als 100 ist.

        +
        filter = 'price < 100'​
        +
        +
        +

        Beispiel 5: Filtern mit Größer als oder gleich (>=)

        Wenn Sie alle Entitäten finden wollen, bei denen rating größer oder gleich 4 ist.

        +
        filter = 'rating >= 4'​
        +
        +
        +

        Beispiel 6: Filtern mit Kleiner als oder gleich (<=)

        Um Entitäten zu finden, deren discount kleiner oder gleich 10% ist.

        +
        filter = 'discount <= 10'​
        +
        +
        +

        Bereichsoperatoren

        Bereichsoperatoren helfen bei der Filterung von Daten auf der Grundlage bestimmter Gruppen oder Bereiche von Werten.

        +

        Unterstützte Bereichsoperatoren.

          +
        • IN: Wird verwendet, um Werte innerhalb eines bestimmten Satzes oder Bereichs zu finden.

        • +
        • LIKE: Wird verwendet, um ein Muster abzugleichen (meist für Textfelder).

        • +
        +

        Beispiel 1: Verwendung von IN für die Suche nach mehreren Werten

        Wenn Sie alle Entitäten finden möchten, bei denen color entweder "rot", "grün" oder "blau" ist.

        +
        filter = 'color in ["red", "green", "blue"]'​
        +
        +
        +

        Dies ist nützlich, wenn Sie die Zugehörigkeit zu einer Liste von Werten prüfen wollen.

        +

        Beispiel 2: Verwendung von LIKE für Mustervergleiche

        Der Operator LIKE wird für den Mustervergleich in Zeichenkettenfeldern verwendet. Er kann Teilzeichenfolgen an verschiedenen Positionen im Text entsprechen: als Präfix, Infix oder Suffix. Der Operator LIKE verwendet das Symbol % als Platzhalter, der mit einer beliebigen Anzahl von Zeichen (einschließlich Null) übereinstimmen kann.

        +

        Präfix-Übereinstimmung (Beginnt mit)

        Um eine Präfix-Übereinstimmung durchzuführen, bei der die Zeichenfolge mit einem bestimmten Muster beginnt, können Sie das Muster an den Anfang stellen und % verwenden, um alle darauf folgenden Zeichen abzugleichen. Beispiel: Sie möchten alle Produkte finden, deren name mit "Prod" beginnt.

        +
        filter = 'name LIKE "Prod%"'​
        +
        +
        +

        Dies entspricht allen Produkten, deren Name mit "Prod" beginnt, z. B. "Produkt A", "Produkt B" usw.

        +

        Suffix-Übereinstimmung (Endet mit)

        Für eine Suffix-Übereinstimmung, bei der die Zeichenfolge mit einem bestimmten Muster endet, setzen Sie das Symbol % an den Anfang des Musters. Beispiel: Sie möchten alle Produkte finden, deren name mit "XYZ" endet.

        +
        filter = 'name LIKE "%XYZ"'​
        +
        +
        +

        Damit werden alle Produkte gefunden, deren Name auf "XYZ" endet, z. B. "ProduktXYZ", "MusterXYZ" usw.

        +

        Infix-Abgleich (Enthält)

        Um eine Infix-Übereinstimmung durchzuführen, bei der das Muster an beliebiger Stelle in der Zeichenfolge erscheinen kann, können Sie das Symbol % sowohl am Anfang als auch am Ende des Musters platzieren. Beispiel: Sie möchten alle Produkte finden, deren name das Wort "Pro" enthält.

        +
        filter = 'name LIKE "%Pro%"'​
        +
        +
        +

        Dies entspricht allen Produkten, deren Name die Teilzeichenkette "Pro" enthält, wie z. B. "Product", "ProLine" oder "SuperPro".

        +

        Arithmetische Operatoren

        Mit arithmetischen Operatoren können Sie Bedingungen erstellen, die auf Berechnungen mit numerischen Feldern basieren.

        +

        Unterstützte arithmetische Operatoren.

          +
        • + (Addition)

        • +
        • - (Subtraktion)

        • +
        • * (Multiplikation)

        • +
        • / (Division)

        • +
        • % (Modulus)

        • +
        • ** (Potenzierung)

        • +
        +

        Beispiel 1: Verwendung der Addition (+)

        Suche nach Entitäten, bei denen der Preis total die Summe von base_price und tax ist.

        +
        filter = 'total == base_price + tax'​
        +
        +
        +

        Beispiel 2: Verwendung der Subtraktion (-)

        Um Entitäten zu finden, bei denen quantity größer als 50 und quantity_sold kleiner als 30 ist.

        +
        filter = 'quantity - quantity_sold > 50'​
        +
        +
        +

        Beispiel 3: Verwendung der Multiplikation (*)

        Suche nach Entitäten, bei denen price größer als 100 und quantity größer als 10 ist, multipliziert.

        +
        filter = 'price * quantity > 1000'​
        +
        +
        +

        Beispiel 4: Verwendung der Division (/)

        Um Produkte zu finden, bei denen total_price geteilt durch quantity kleiner als 50 ist.

        +
        filter = 'total_price / quantity < 50'​
        +
        +
        +

        Beispiel 5: Verwendung von Modulus (%)

        Um Einheiten zu finden, bei denen id eine gerade Zahl ist (d.h. durch 2 teilbar).

        +
        filter = 'id % 2 == 0'​
        +
        +
        +

        Beispiel 6: Verwendung der Potenzierung (**)

        Um Entitäten zu finden, bei denen price hoch 2 größer als 1000 ist.

        +
        filter = 'price ** 2 > 1000'​
        +
        +
        +

        Logische Operatoren

        Logische Operatoren werden verwendet, um mehrere Bedingungen in einem komplexeren Filterausdruck zu kombinieren. Dazu gehören AND, OR und NOT.

        +

        Unterstützte logische Operatoren.

          +
        • AND: Kombiniert mehrere Bedingungen, die alle wahr sein müssen.

        • +
        • OR: Kombiniert Bedingungen, von denen mindestens eine wahr sein muss.

        • +
        • NOT: Negiert eine Bedingung.

        • +
        +

        Beispiel 1: AND zum Kombinieren von Bedingungen verwenden

        Alle Produkte finden, bei denen price größer als 100 und stock größer als 50 ist.

        +
        filter = 'price > 100 AND stock > 50'​
        +
        +
        +

        Beispiel 2: OR zum Kombinieren von Bedingungen verwenden

        Um alle Produkte zu finden, bei denen color entweder "rot" oder "blau" ist.

        +
        filter = 'color == "red" OR color == "blue"'​
        +
        +
        +

        Beispiel 3: Verwendung von NOT zum Ausschließen einer Bedingung

        Um alle Produkte zu finden, bei denen color nicht "grün" ist.

        +
        filter = 'NOT color == "green"'​
        +
        +
        +

        Tipps zur Verwendung grundlegender Operatoren mit JSON- und ARRAY-Feldern

        Die Basisoperatoren in Milvus sind zwar vielseitig und können auf skalare Felder angewendet werden, aber sie können auch effektiv mit den Schlüsseln und Indizes in JSON- und ARRAY-Feldern verwendet werden.

        +

        Wenn Sie zum Beispiel ein Feld product haben, das mehrere Schlüssel wie price, model und tags enthält, verweisen Sie immer direkt auf den Schlüssel.

        +
        filter = 'product["price"] > 1000'​
        +
        +
        +

        Um Datensätze zu finden, bei denen die erste Temperatur in einem Array von aufgezeichneten Temperaturen einen bestimmten Wert überschreitet, verwenden Sie.

        +
        filter = 'history_temperatures[0] > 30'​
        +
        +
        +

        Schlussfolgerung

        Milvus bietet eine Reihe von grundlegenden Operatoren, die Ihnen Flexibilität beim Filtern und Abfragen Ihrer Daten bieten. Durch die Kombination von Vergleichs-, Bereichs-, arithmetischen und logischen Operatoren können Sie leistungsstarke Filterausdrücke erstellen, um Ihre Suchergebnisse einzugrenzen und die benötigten Daten effizient abzurufen.

        diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..e136c6559 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"Filterung erklärt","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"Grundlegende Operatoren","href":"Basic-operators​","type":2,"isActive":false},{"label":"Vorlagen für Filterausdrücke","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"Datentypspezifische Operatoren","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..7896b8f65 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,147 @@ +--- +id: boolean.md +summary: >- + Milvus bietet leistungsstarke Filtermöglichkeiten, die eine präzise Abfrage + Ihrer Daten ermöglichen. Mit Filterausdrücken können Sie bestimmte skalare + Felder anvisieren und Suchergebnisse mit verschiedenen Bedingungen verfeinern. + In diesem Handbuch wird die Verwendung von Filterausdrücken in Milvus anhand + von Beispielen erläutert, die sich auf Abfrageoperationen konzentrieren. Sie + können diese Filter auch in Such- und Löschanfragen anwenden. +title: Filterung erklärt +--- +

        Filterung erklärt

        Milvus bietet leistungsstarke Filtermöglichkeiten, die eine präzise Abfrage Ihrer Daten ermöglichen. Mit Filterausdrücken können Sie bestimmte skalare Felder anvisieren und die Suchergebnisse mit verschiedenen Bedingungen verfeinern. In diesem Handbuch wird die Verwendung von Filterausdrücken in Milvus anhand von Beispielen erläutert, die sich auf Abfrageoperationen konzentrieren. Sie können diese Filter auch in Such- und Löschanfragen anwenden.

        +

        Grundlegende Operatoren

        Milvus unterstützt mehrere grundlegende Operatoren zum Filtern von Daten.

        +
          +
        • Vergleichsoperatoren: ==, !=, >, <, >= und <= ermöglichen die Filterung auf der Grundlage von numerischen, Text- oder Datumsfeldern.

        • +
        • Bereichsfilter: IN und LIKE helfen bei der Suche nach bestimmten Wertebereichen oder -mengen.

        • +
        • Arithmetische Operatoren: + - , *, /, %, und ** werden für Berechnungen mit numerischen Feldern verwendet.

        • +
        • Logische Operatoren: AND, OR, und NOT kombinieren mehrere Bedingungen zu komplexen Ausdrücken.

        • +
        +

        Beispiel: Filtern nach Farbe

        Um Entitäten mit Primärfarben (rot, grün oder blau) in einem skalaren Feld color zu finden, verwenden Sie den folgenden Filterausdruck.

        +
        filter='color in ["red", "green", "blue"]'​
        +
        +
        +

        Beispiel: Filtern von JSON-Feldern

        Milvus erlaubt es, Schlüssel in JSON-Feldern zu referenzieren. Wenn Sie zum Beispiel ein JSON-Feld product mit den Schlüsseln price und model haben und Produkte mit einem bestimmten Modell und einem Preis unter 1.850 finden möchten, verwenden Sie diesen Filterausdruck.

        +
        filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
        +
        +
        +

        Beispiel: Filtern von Array-Feldern

        Wenn Sie ein Array-Feld history_temperatures mit Temperaturdatensätzen haben und Observatorien finden möchten, bei denen die 10. aufgezeichnete Temperatur 23°C überschreitet, verwenden Sie diesen Ausdruck.

        +
        filter='history_temperatures[10] > 23'​
        +
        +
        +

        Weitere Informationen zu diesen grundlegenden Operatoren finden Sie unter Grundlegende Operatoren.

        +

        Vorlagen für Filterausdrücke

        Wenn Sie mit CJK-Zeichen filtern, kann die Verarbeitung aufgrund der größeren Zeichensätze und Kodierungsunterschiede komplexer sein. Dies kann zu einer langsameren Leistung führen, insbesondere mit dem IN Operator.

        +

        Milvus führt Filterausdruck-Vorlagen ein, um die Leistung bei der Arbeit mit CJK-Zeichen zu optimieren. Durch die Trennung der dynamischen Werte vom Filterausdruck kann die Abfragemaschine das Einfügen von Parametern effizienter handhaben.

        +

        Beispiel

        Um Personen über 25 Jahre zu finden, die entweder in "北京" (Peking) oder "上海" (Shanghai) leben, verwenden Sie den folgenden Vorlagenausdruck.

        +
        filter = "age > 25 AND city IN ['北京', '上海']"​
        +
        +
        +

        Um die Leistung zu verbessern, verwenden Sie diese Variante mit Parametern.

        +
        filter = "age > {age} AND city in {city}",​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        Dieser Ansatz reduziert den Parsing-Overhead und verbessert die Abfragegeschwindigkeit. Weitere Informationen finden Sie unter Filtervorlagen.

        +

        Datentypspezifische Operatoren

        Milvus bietet erweiterte Filteroperatoren für bestimmte Datentypen, wie JSON-, ARRAY- und VARCHAR-Felder.

        +

        JSON-Feld-spezifische Operatoren

        Milvus bietet erweiterte Operatoren für die Abfrage von JSON-Feldern, die eine präzise Filterung innerhalb komplexer JSON-Strukturen ermöglichen.

        +

        **JSON_CONTAINS(identifier, jsonExpr)**: Prüft, ob ein JSON-Ausdruck im Feld existiert.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains(tags, "sale")'​
        +
        +
        +

        **JSON_CONTAINS_ALL(identifier, jsonExpr)**: Stellt sicher, dass alle Elemente des JSON-Ausdrucks vorhanden sind.

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        **JSON_CONTAINS_ANY(identifier, jsonExpr)**: Filtert nach Entitäten, bei denen mindestens ein Element im JSON-Ausdruck vorhanden ist.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        Weitere Einzelheiten zu JSON-Operatoren finden Sie unter JSON-Operatoren.

        +

        Feldspezifische ARRAY-Operatoren

        Milvus bietet erweiterte Filteroperatoren für Array-Felder, wie ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY und ARRAY_LENGTH, die eine feinkörnige Kontrolle über Array-Daten ermöglichen.

        +

        **ARRAY_CONTAINS**: Filtert Entitäten, die ein bestimmtes Element enthalten.

        +
        filter="ARRAY_CONTAINS(history_temperatures, 23)"​
        +
        +
        +

        **ARRAY_CONTAINS_ALL**: Filtert Entitäten, in denen alle Elemente einer Liste vorhanden sind.

        +
        filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_CONTAINS_ANY**: Filtert Entitäten, die ein beliebiges Element aus der Liste enthalten.

        +
        filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_LENGTH**: Filtert auf der Grundlage der Länge des Arrays.

        +
        filter="ARRAY_LENGTH(history_temperatures) < 10"​
        +
        +
        +

        Weitere Einzelheiten zu Array-Operatoren finden Sie unter ARRAY-Operatoren.

        +

        VARCHAR feldspezifische Operatoren

        Der Operator **Text_Match** ermöglicht die präzise Suche nach Dokumenten auf der Grundlage bestimmter Suchbegriffe. Er ist besonders nützlich für gefilterte Suchen, die skalare Filter mit vektoriellen Ähnlichkeitssuchen kombinieren. Im Gegensatz zur semantischen Suche konzentriert sich Text Match auf das genaue Vorkommen von Begriffen.

        +

        Milvus verwendet Tantivy zur Unterstützung der invertierten Indizierung und der begriffsbasierten Textsuche. Der Prozess umfasst.

        +
          +
        1. Analyzer: Tokenisiert und verarbeitet den Eingabetext.

        2. +
        3. Indizierung: Erzeugt einen invertierten Index, der eindeutige Token auf Dokumente abbildet.

        4. +
        +

        Weitere Einzelheiten finden Sie unter Textabgleich.

        diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..fb0684104 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"Filter-Vorlagen","href":"Filter-Templating​","type":1,"isActive":false},{"label":"Überblick","href":"Overview​","type":2,"isActive":false},{"label":"Suchoperationen","href":"Search-Operations​","type":2,"isActive":false},{"label":"Abfrageoperationen","href":"Query-Operations​","type":2,"isActive":false},{"label":"Löschoperationen","href":"Delete-Operations​","type":2,"isActive":false},{"label":"Schlussfolgerung","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..2e4855e98 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,155 @@ +--- +id: filtering-templating.md +summary: >- + In Milvus können komplexe Filterausdrücke mit zahlreichen Elementen, + insbesondere solche, die Nicht-ASCII-Zeichen wie CJK-Zeichen enthalten, die + Abfrageleistung erheblich beeinträchtigen. Um dies zu beheben, führt Milvus + einen Mechanismus zur Schablonierung von Filterausdrücken ein, der die + Effizienz verbessern soll, indem er die Zeit für das Parsen komplexer + Ausdrücke reduziert. Auf dieser Seite wird die Verwendung von + Filterausdrucksvorlagen bei Such-, Abfrage- und Löschvorgängen erläutert. +title: Filterung Schablonierung +--- +

        Filter-Vorlagen

        In Milvus können komplexe Filterausdrücke mit zahlreichen Elementen, insbesondere solche, die Nicht-ASCII-Zeichen wie CJK-Zeichen enthalten, die Abfrageleistung erheblich beeinträchtigen. Um dies zu beheben, führt Milvus einen Mechanismus zur Schablonierung von Filterausdrücken ein, der die Effizienz verbessern soll, indem er die Zeit für das Parsen komplexer Ausdrücke reduziert. Auf dieser Seite wird die Verwendung der Filterausdruckschablone bei Such-, Abfrage- und Löschvorgängen erläutert.

        +

        Überblick

        Filterausdruckschablonen ermöglichen es Ihnen, Filterausdrücke mit Platzhaltern zu erstellen, die während der Abfrageausführung dynamisch durch Werte ersetzt werden können. Durch die Verwendung von Schablonen vermeiden Sie die Einbettung großer Arrays oder komplexer Ausdrücke direkt in den Filter, was die Parsing-Zeit reduziert und die Abfrageleistung verbessert.

        +

        Nehmen wir an, Sie haben einen Filterausdruck mit zwei Feldern, age und city, und Sie möchten alle Personen finden, deren Alter größer als 25 ist und die entweder in "北京" (Peking) oder "上海" (Shanghai) leben. Anstatt die Werte direkt in den Filterausdruck einzubetten, können Sie eine Vorlage verwenden.

        +
        filter = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        Hier sind {age} und {city} Platzhalter, die bei der Ausführung der Abfrage durch die tatsächlichen Werte in filter_params ersetzt werden.

        +

        Die Verwendung von Filterausdruck-Vorlagen in Milvus hat mehrere entscheidende Vorteile.

        +
          +
        • Geringere Parsing-Zeit: Durch das Ersetzen großer oder komplexer Filterausdrücke durch Platzhalter verbringt das System weniger Zeit mit dem Parsing und der Verarbeitung des Filters.

        • +
        • Verbesserte Abfrageleistung: Durch den reduzierten Parsing-Overhead verbessert sich die Abfrageleistung, was zu höheren QPS und schnelleren Antwortzeiten führt.

        • +
        • Skalierbarkeit: Wenn Ihre Datensätze wachsen und die Filterausdrücke komplexer werden, sorgt das Templating dafür, dass die Leistung effizient und skalierbar bleibt.

        • +
        +

        Suchoperationen

        Für Suchoperationen in Milvus wird der Ausdruck filter verwendet, um die Filterbedingung zu definieren, und der Parameter filter_params wird verwendet, um die Werte für die Platzhalter anzugeben. Das filter_params Wörterbuch enthält die dynamischen Werte, die Milvus verwendet, um den Filterausdruck zu ersetzen.

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.search(​
        +    "hello_milvus",​
        +    vectors[:nq],​
        +    filter=expr,​
        +    limit=10,​
        +    output_fields=["age", "city"],​
        +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
        +    filter_params=filter_params,​
        +)​
        +
        +
        +

        In diesem Beispiel wird Milvus bei der Ausführung der Suche {age} dynamisch durch 25 und {city} durch ["北京", "上海"] ersetzen.

        +

        Abfrageoperationen

        Der gleiche Schablonenmechanismus kann auf Abfrageoperationen in Milvus angewendet werden. In der Funktion query definieren Sie den Filterausdruck und verwenden filter_params, um die zu ersetzenden Werte anzugeben.

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.query(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    output_fields=["age", "city"],​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        Durch die Verwendung von filter_params kann Milvus das dynamische Einfügen von Werten effizient handhaben und die Geschwindigkeit der Abfrageausführung verbessern.

        +

        Löschoperationen

        Sie können Filterausdrücke auch in Löschvorgängen verwenden. Ähnlich wie bei der Suche und Abfrage definiert der Ausdruck filter die Bedingungen, und filter_params liefert die dynamischen Werte für die Platzhalter.

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.delete(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        Dieser Ansatz verbessert die Leistung von Löschvorgängen, vor allem wenn es um komplexe Filterbedingungen geht.

        +

        Schlussfolgerung

        Das Templating von Filterausdrücken ist ein wichtiges Werkzeug zur Optimierung der Abfrageleistung in Milvus. Durch die Verwendung von Platzhaltern und des filter_params Wörterbuchs können Sie die Zeit, die für das Parsen komplexer Filterausdrücke aufgewendet wird, erheblich reduzieren. Dies führt zu einer schnelleren Abfrageausführung und einer besseren Gesamtleistung.

        diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..baca76cc4 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"JSON-Operatoren","href":"JSON-Operators​","type":1,"isActive":false},{"label":"Verfügbare JSON-Operatoren","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_CONTAINS_ALL","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"JSON_COTAINS_ANY","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..9a8c6d37d --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,123 @@ +--- +id: json-operators.md +summary: >- + Milvus unterstützt fortschrittliche Operatoren für die Abfrage und Filterung + von JSON-Feldern und eignet sich damit perfekt für die Verwaltung komplexer, + strukturierter Daten. Diese Operatoren ermöglichen eine hocheffektive Abfrage + von JSON-Dokumenten, so dass Sie Entitäten auf der Grundlage bestimmter + Elemente, Werte oder Bedingungen innerhalb der JSON-Felder abrufen können. + Dieser Abschnitt führt Sie durch die Verwendung von JSON-spezifischen + Operatoren in Milvus und bietet praktische Beispiele zur Veranschaulichung + ihrer Funktionalität. +title: JSON-Operatoren +--- +

        JSON-Operatoren

        Milvus unterstützt fortschrittliche Operatoren für die Abfrage und Filterung von JSON-Feldern und eignet sich damit perfekt für die Verwaltung komplexer, strukturierter Daten. Diese Operatoren ermöglichen eine hocheffektive Abfrage von JSON-Dokumenten und erlauben es Ihnen, Entitäten auf der Grundlage bestimmter Elemente, Werte oder Bedingungen innerhalb der JSON-Felder abzurufen. Dieser Abschnitt führt Sie durch die Verwendung von JSON-spezifischen Operatoren in Milvus und bietet praktische Beispiele zur Veranschaulichung ihrer Funktionalität.

        +
        +

        JSON-Felder können nicht mit komplexen, verschachtelten Strukturen umgehen und behandeln alle verschachtelten Strukturen als einfache Zeichenketten. Daher ist es bei der Arbeit mit JSON-Feldern ratsam, übermäßig tiefe Verschachtelungen zu vermeiden und sicherzustellen, dass Ihre Datenstrukturen für eine optimale Leistung so flach wie möglich sind.

        +
        +

        Verfügbare JSON-Operatoren

        Milvus bietet mehrere leistungsstarke JSON-Operatoren, die beim Filtern und Abfragen von JSON-Daten helfen, und diese Operatoren sind

        + +

        Wir wollen diese Operatoren anhand von Beispielen untersuchen, um zu sehen, wie sie in realen Szenarien angewendet werden können.

        +

        JSON_CONTAINS

        Der Operator json_contains prüft, ob ein bestimmtes Element oder Subarray in einem JSON-Feld vorhanden ist. Er ist nützlich, wenn Sie sicherstellen wollen, dass ein JSON-Array oder -Objekt einen bestimmten Wert enthält.

        +

        Beispiel

        +

        Stellen Sie sich vor, Sie haben eine Sammlung von Produkten, jedes mit einem tags Feld, das ein JSON Array von Strings enthält, wie z.B. ["electronics", "sale", "new"]. Sie möchten Produkte filtern, die das Tag "sale" haben.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains(tags, "sale")'​
        +
        +
        +

        In diesem Beispiel gibt Milvus alle Produkte zurück, bei denen das Feld tags das Element "sale" enthält.

        +

        JSON_CONTAINS_ALL

        Der Operator json_contains_all stellt sicher, dass alle Elemente eines angegebenen JSON-Ausdrucks im Zielfeld vorhanden sind. Er ist besonders nützlich, wenn Sie mehrere Werte innerhalb eines JSON-Arrays abgleichen müssen.

        +

        Beispiel

        +

        Wenn Sie alle Produkte finden möchten, die die Tags "electronics", "sale" und "new" haben, können Sie den Operator json_contains_all verwenden.

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        Diese Abfrage gibt alle Produkte zurück, bei denen das Array tags alle drei angegebenen Elemente enthält: "electronics", "sale", und "new".

        +

        JSON_COTAINS_ANY

        Der json_contains_any Operator filtert Entitäten, bei denen mindestens ein Element des JSON-Ausdrucks innerhalb des Feldes existiert. Dies ist nützlich, wenn Sie Entitäten auf der Grundlage eines beliebigen von mehreren möglichen Werten abgleichen möchten.

        +

        Beispiel

        +

        Angenommen, Sie möchten Produkte filtern, die mindestens eines der Tags "electronics", "sale" oder "new" enthalten. Um dies zu erreichen, können Sie den Operator json_contains_any verwenden.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        In diesem Fall gibt Milvus alle Produkte zurück, die mindestens eines der Tags in der Liste ["electronics", "new", "clearance"] haben. Auch wenn ein Produkt nur eines dieser Tags hat, wird es in das Ergebnis aufgenommen.

        diff --git a/localization/v2.5.x/site/de/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/de/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..44ed9d761 --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"Übersicht","href":"Overview","type":2,"isActive":false},{"label":"Startseite","href":"Home","type":2,"isActive":false},{"label":"Sammlungen","href":"Collections","type":2,"isActive":false},{"label":"Abfrage","href":"Query","type":2,"isActive":false},{"label":"Daten","href":"Data","type":2,"isActive":false},{"label":"Aufgaben","href":"Tasks","type":2,"isActive":false},{"label":"Langsame Anfragen","href":"Slow-requests","type":2,"isActive":false},{"label":"Konfigurationen","href":"Configurations","type":2,"isActive":false},{"label":"Werkzeuge","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/de/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/de/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..d5bf57b1e --- /dev/null +++ b/localization/v2.5.x/site/de/userGuide/tools/milvus-webui.md @@ -0,0 +1,280 @@ +--- +id: milvus-webui.md +summary: >- + Milvus Web UI ist ein grafisches Verwaltungstool für Milvus. Es verbessert die + Beobachtbarkeit des Systems durch eine einfache und intuitive Schnittstelle. + Sie können +title: Milvus WebUI +--- +

        Milvus WebUI

        Milvus Web UI ist ein grafisches Verwaltungswerkzeug für Milvus. Es verbessert die Beobachtbarkeit des Systems mit einer einfachen und intuitiven Schnittstelle. Sie können Milvus Web UI verwenden, um die Statistiken und Metriken der Komponenten und Abhängigkeiten von Milvus zu beobachten, Datenbank- und Sammlungsdetails zu überprüfen und detaillierte Milvus-Konfigurationen aufzulisten.

        +

        Übersicht

        Milvus Web UI unterscheidet sich von Birdwatcher und Attu dadurch, dass es ein integriertes Tool ist, das eine allgemeine Systembeobachtung mit einer einfachen und intuitiven Oberfläche ermöglicht.

        +

        Die folgende Tabelle vergleicht die Funktionen von Milvus Web UI und Birdwatcher/Attu:

        + + + + + + + + + + + +
        FunktionMilvus Web UIBirdwatcherAttu
        Bedienbare FormGUICLIGUI
        Ziel-BenutzerMaintainer, EntwicklerMaintainerEntwickler
        InstallationEingebautEigenständiges WerkzeugEigenständiges Werkzeug
        AbhängigkeitenMilvusMilvus / etcdMilvus
        Primäre FunktionalitätenLaufzeitumgebung, Datenbank-/Sammlungsdetails, Segmente, Kanäle, Aufgaben und langsame AbfragenÜberprüfung von Metadaten und Ausführung der Milvus-APIDatenbankverwaltung und operative Aufgaben
        +

        Milvus Web UI bietet die folgenden Funktionen:

        +

        + + Milvus Web UI overview + Überblick über Milvus Web UI

        +
          +
        • Startseite

          +

          Hier finden Sie Informationen über die aktuell laufende Milvus-Instanz, ihre Komponenten, verbundene Clients und Abhängigkeiten.

        • +
        • Sammlungen

          +

          Sie können die Liste der Datenbanken und Sammlungen, die sich derzeit in Milvus befinden, einsehen und deren Details überprüfen.

        • +
        • Abfrage

          +

          Sie können die gesammelten Statistiken der Abfrageknoten und Abfragekoordinatoren in Bezug auf Segmente, Kanäle, Replikate und Ressourcengruppen einsehen.

        • +
        • Daten

          +

          Sie können die gesammelten Statistiken der Datenknoten in Bezug auf Segmente und Kanäle anzeigen.

        • +
        • Tasks

          +

          Sie können die Liste der in Milvus laufenden Tasks anzeigen, einschließlich Querycoord-Scheduler-Tasks, Verdichtungs-Tasks, Indexerstellungs-Tasks, Import-Tasks und Datensynchronisierungs-Tasks.

        • +
        • Langsame Anfragen

          +

          Sie können die Liste der langsamen Anfragen in Milvus anzeigen, einschließlich des Anfragetyps, der Anfragedauer und der Anfrageparameter.

        • +
        • Konfigurationen

          +

          Sie können die Liste der Milvus-Konfigurationen und deren Werte anzeigen.

        • +
        • Werkzeuge

          +

          Sie können von der Web-UI aus auf die beiden eingebauten Tools, pprof und Milvus-Datenvisualisierung, zugreifen.

        • +
        +

        Startseite

        Auf der Home-Seite finden Sie die folgenden Informationen:

        +

        + + Milvus Web UI Home + Milvus Web UI Startseite

        +
          +
        • System-Informationen: Zeigen Sie Systeminformationen an, einschließlich Informationen über den Bereitstellungsmodus, das bei der Bereitstellung verwendete Image und zugehörige Informationen.

        • +
        • Komponenten-Informationen: Zeigen Sie den Status und die Metriken der Komponenten in Milvus an, einschließlich des Status und der Metriken der Abfrageknoten, Datenknoten, Indexknoten, Koordinatoren und Proxys.

        • +
        • Verbundene Clients: Zeigen Sie die verbundenen Clients und ihre Informationen an, einschließlich SDK-Typ und -Version, Benutzername und Zugriffshistorie.

        • +
        • System-Abhängigkeiten: Zeigen Sie den Status und die Metriken der Abhängigkeiten von Milvus an, einschließlich des Status und der Metriken des Metaspeichers, der Nachrichtenwarteschlange und des Objektspeichers.

        • +
        +

        Sammlungen

        Auf der Seite Sammlungen können Sie die Liste der Datenbanken und Sammlungen, die sich derzeit in Milvus befinden, einsehen und deren Details überprüfen.

        +

        + + Milvus Web UI Collections + Milvus Web UI Sammlungen

        +
          +
        • Datenbank: Zeigen Sie die Liste der derzeit in Milvus vorhandenen Datenbanken und deren Details an.

        • +
        • Sammlungen: Zeigen Sie die Liste der Sammlungen in jeder Datenbank und deren Details an.

        • +
        +

        Abfrage

        + + Milvus Web UI Query Page + Milvus Web UI Abfrage Seite

        +
          +
        • Segmente: Zeigen Sie die Liste der Segmente und deren Details an, einschließlich der Segment-ID, der entsprechenden Sammlung, des Status, der Größe usw.

          +

          In der Spalte Von können Sie die Quelle des Segments finden. Mögliche Quellenindikatoren sind wie folgt

          +
            +
          • QN: Abfrageknoten

          • +
          • CT: Aktuelles Ziel in QueryCoord

          • +
          • NT: Nächstes Ziel in QueryCoord

          • +
          • DIST: Verteilung in QueryCoord

          • +
        • +
        • Kanäle: Zeigen Sie die Liste der Kanäle und ihre Details an, einschließlich des Kanalnamens, der entsprechenden Sammlungen usw.

          +

          In der Spalte Von können Sie die Quelle des Segments finden. Mögliche Quellenindikatoren sind wie folgt

          +
            +
          • QN: Abfrageknoten

          • +
          • CT: Aktuelles Ziel in QueryCoord

          • +
          • NT: Nächstes Ziel in QueryCoord

          • +
          • DIST: Verteilung in QueryCoord

          • +
        • +
        • Replikate: Anzeigen der Liste der Replikate und ihrer Details, einschließlich der Replikat-ID, der entsprechenden Sammlung usw.

        • +
        • Ressourcengruppen: Zeigen Sie die Liste der Ressourcengruppen und ihre Details an, einschließlich des Namens der Ressourcengruppe, der Anzahl der Abfrageknoten in der Gruppe und ihrer Konfigurationen, usw.

        • +
        +

        Daten

        + + Milvus Web UI Data Page + Milvus Web UI Daten Seite

        +
          +
        • Segmente: Zeigen Sie die Liste der Segmente aus den Datenknoten/Koordinatoren und deren Details an, einschließlich der Segment-ID, der entsprechenden Sammlung, des Status, der Größe usw.

        • +
        • Kanäle: Zeigen Sie die Liste der Kanäle aus den Datenknoten/Koordinatoren und deren Details an, einschließlich des Kanalnamens, der entsprechenden Sammlungen usw.

        • +
        +

        Aufgaben

        + + Milvus Web UI Tasks Page + Milvus Web UI Aufgaben Seite

        +
          +
        • Aufgaben: Zeigen Sie die Liste der in Milvus laufenden Aufgaben an, einschließlich des Aufgabentyps, des Status und der Aktionen.

          +
            +
          • QueryCoord-Aufgaben: Anzeige aller QueryCoord Scheduler-Tasks, einschließlich Balancer, Index/Segment/Channel/Leader Checker der letzten 15 Minuten.

          • +
          • Verdichtungs-Aufgaben: Anzeige aller Verdichtungsaufgaben der Datenkoordinatoren in den letzten 15 Minuten.

          • +
          • Indexerstellungs-Aufgaben: Zeigt alle Indexerstellungsaufgaben der Datenkoordinatoren der letzten 30 Minuten an.

          • +
          • Import-Aufgaben: Zeigt alle Importaufgaben der Datenkoordinatoren der letzten 30 Minuten an.

          • +
          • Daten-Synchronisations-Aufgaben: Zeigen Sie alle Datensynchronisierungsaufgaben der Datenknoten in den letzten 15 Minuten an.

          • +
        • +
        +

        Langsame Anfragen

        + + Milvus Web UI Slow Requests Page + Milvus Web UI Seite Langsame Anfragen

        +
          +
        • Langsame Anfragen: Eine langsame Anfrage ist eine Suche oder eine Abfrage, deren Latenzzeit länger ist als der in der Konfiguration angegebene Wert von proxy.slowQuerySpanInSeconds. Die Liste der langsamen Anfragen zeigt alle langsamen Anfragen der letzten 15 Minuten an.
        • +
        +

        Konfigurationen

        + + Milvus Web UI Configurations Page + Milvus Web UI Konfigurationen Seite

        +
          +
        • Konfigurationen: Zeigt die Liste der Milvus-Laufzeitkonfigurationen und deren Werte an.
        • +
        +

        Werkzeuge

          +
        • pprof: Zugriff auf das pprof-Tool zur Profilerstellung und Fehlersuche in Milvus.

        • +
        • Milvus-Datenvisualisierungstool: Zugriff auf das Milvus-Datenvisualisierungstool zur Visualisierung der Daten in Milvus.

        • +
        diff --git a/localization/v2.5.x/site/en/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/en/adminGuide/config_jaeger_tracing.md index d3444d98f..f41834861 100644 --- a/localization/v2.5.x/site/en/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/en/adminGuide/config_jaeger_tracing.md @@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
        -

        2. Deploy Jager

        The simplest possible way to create a Jaeger instance is by creating a YAML file like the following example. This will install the default AllInOne strategy, which deploys the all-in-one image (combining jaeger-agent, jaeger-collector, jaeger-query, and Jaeger UI) in a single pod, using in-memory storage by default.

        +

        2. Deploy Jaeger

        The simplest possible way to create a Jaeger instance is by creating a YAML file like the following example. This will install the default AllInOne strategy, which deploys the all-in-one image (combining jaeger-agent, jaeger-collector, jaeger-query, and Jaeger UI) in a single pod, using in-memory storage by default.

        If you want to store traces for a long time, please refer to production-strategy.

        apiVersion: jaegertracing.io/v1
         kind: Jaeger
        diff --git a/localization/v2.5.x/site/en/adminGuide/configure-docker.json b/localization/v2.5.x/site/en/adminGuide/configure-docker.json
        index 292f8078e..039633349 100644
        --- a/localization/v2.5.x/site/en/adminGuide/configure-docker.json
        +++ b/localization/v2.5.x/site/en/adminGuide/configure-docker.json
        @@ -1 +1 @@
        -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configure Milvus with Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Download a configuration file","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modify the configuration file","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Download an installation file","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modify the installation file","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Start Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configure Milvus with Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Download a configuration file","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modify the configuration file","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Download an installation file","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modify the installation file","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Start Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/en/adminGuide/configure-docker.md b/localization/v2.5.x/site/en/adminGuide/configure-docker.md
        index 8e2e6c383..356a362a8 100644
        --- a/localization/v2.5.x/site/en/adminGuide/configure-docker.md
        +++ b/localization/v2.5.x/site/en/adminGuide/configure-docker.md
        @@ -39,8 +39,8 @@ In current release, all parameters take effect only after Milvus restarts.
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        Download milvus.yaml directly or with the following command.

        -
        $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
        +    

        Download milvus.yaml directly or with the following command.

        +
        $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
         

        Modify the configuration file

        Download the installation file for Milvus standalone, and save it as docker-compose.yml.

        +

        Download the installation file for Milvus standalone, and save it as docker-compose.yml.

        You can also simply run the following command.

        # For Milvus standalone
        -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
        +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
         

        Modify the installation file

        To ensure data security, it is recommend that you drop users and roles that are no longer in use. This guide introduces how to drop users and roles.​

        +

        Drop a user​

        The following example demonstrates how to drop the user user_1. ​

        +
        +

        The root user cannot be dropped.​

        +
        + +
        from pymilvus import MilvusClient​
        +​
        +client = MilvusClient(​
        +    uri="http://localhost:19530",​
        +    token="root:Milvus"​
        +)​
        +​
        +# create a user​
        +client.drop_user(user_name="user_1")​
        +
        +
        +
        import io.milvus.v2.client.ConnectConfig​
        +import io.milvus.v2.client.MilvusClientV2​
        +import io.milvus.v2.service.rbac.request.DropUserReq​
        +​
        +ConnectConfig connectConfig = ConnectConfig.builder()​
        +        .uri("http://localhost:19530")​
        +        .token("root:Milvus")​
        +        .build();​
        +        ​
        +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
        +​
        +DropUserReq dropUserReq = DropUserReq.builder()​
        +        .userName("user_1")​
        +        .build();​
        +client.dropUser(dropUserReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +const address = "http://localhost:19530";​
        +const token = "root:Milvus";​
        +const client = new MilvusClient({address, token});​
        +​
        +milvusClient.deleteUser({​
        +    username: 'user_1'​
        +})​
        +
        +
        +
        export CLUSTER_ENDPOINT="http://localhost:19530"​
        +export TOKEN="root:Milvus"​
        +​
        +curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1"​
        +}'​
        +
        +
        +

        Once the user is dropped, you can list all existing users to check if the drop operation is successful. ​

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_users()​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.listUsersReq​
        +​
        +List<String> resp = client.listUsers();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.listUsers()​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Below is an example output. There is no user_1 in the list. The drop operation is successful.​

        +
        ['root']​
        +
        +
        +

        Drop a role​

        The following example demonstrates how to drop the role role_a.​

        +
        +

        The built-in role admin cannot be dropped.​

        +
        + +
        from pymilvus import MilvusClient​
        +​
        +client.drop_role(role_name="role_a")​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.DropRoleReq​
        +​
        +DropRoleReq dropRoleReq = DropRoleReq.builder()​
        +        .roleName("role_a")​
        +        .build();​
        +client.dropRole(dropRoleReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.dropRole({​
        +   roleName: 'role_a',​
        + })​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "roleName": "role_a"​
        +}'​
        +
        +
        +

        Once the role is dropped, you can list all existing roles to check if the drop operation is successful. ​

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_roles()​
        +
        +
        +
        List<String> resp = client.listRoles();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.listRoles(​
        +    includeUserInfo: True​
        +)​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Below is an example output. There is no role_a in the list. The drop operation is successful.​

        +
        ['admin']​
        +
        +
        diff --git a/localization/v2.5.x/site/en/adminGuide/grant_privileges.json b/localization/v2.5.x/site/en/adminGuide/grant_privileges.json new file mode 100644 index 000000000..c90e0096e --- /dev/null +++ b/localization/v2.5.x/site/en/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"Grant Privilege or Privilege Group to Roles​","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"Grant a privilege or a privilege group to a role​","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"Describe a role","href":"Describe-a-role","type":2,"isActive":false},{"label":"Revoke a privilege or a privilege group from a role","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/grant_privileges.md b/localization/v2.5.x/site/en/adminGuide/grant_privileges.md new file mode 100644 index 000000000..8bf915c78 --- /dev/null +++ b/localization/v2.5.x/site/en/adminGuide/grant_privileges.md @@ -0,0 +1,556 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: >- + Once a role is created, you can grant privileges to the role. This guide + introduces how to grant privileges or privilege groups to a role.​ +title: Grant Privilege or Privilege Group to Roles​ +--- +

        Grant Privilege or Privilege Group to Roles​

        Once a role is created, you can grant privileges to the role. This guide introduces how to grant privileges or privilege groups to a role.​

        +

        Grant a privilege or a privilege group to a role​

        Milvus 2.5 introduces a new version of API which streamlines the grant operation. You no longer need to look up the object type when granting a privilege to a role. The following are the parameters and corresponding explanations.​

        +
          +
        • role_name: The name of the target role to which privilege(s) or privilege group(s) need to be granted.​

        • +
        • Resource: The target resource of a privilege, which can be a specific instance, database or collection. The following table explains how to specify the resource in the client.grantV2() method.​

        • +
        +

        Level

        +

        Resource

        +

        Grant Method

        +

        Notes

        +

        Collection

        +

        +

        A specific collection​

        +

        +

        client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")​

        +

        Input the name of your target collection and the name of the database to which the target collection belongs.​

        +

        +

        All collections under a specific database​

        +

        client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")​

        +

        Input the name of your target database and a wildcard `*` as the collection name.​

        +

        **Database**

        +

        A specific database​

        +

        client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")​

        +

        Input the name of your target database and a wildcard `*` as the collection name.​

        +

        +

        All databases under the current instance​

        +

        client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")​

        +

        Input `*` as the database name and `*` as the collection name.​

        +

        **Instance**

        +

        The current instance​

        +

        client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")​

        +

        Input `*` as the database name and `*` as the collection name.​

        +
        +
          +
        • Privilege: The specific privilege or privilege group that you need to grant to a role. Currently, Milvus provides 56 types of privileges that you can grant. The table below lists the privileges in Milvus.​

          +

          +

          The type column in the table below are user to facilitate your quick lookup for privileges and is used for classification purposes only. When granting privileges, you do not need to understand the types. You just need to input the corresponding privileges.​

          +

        • +
        +

        **Type **

        +

        **Privilege**

        +

        **Description**

        +

        **Relevant API description on the client side**

        +

        Database Privileges​

        +

        ListDatabases​

        +

        View all databases in the current instance​

        +

        [ListDatabases](https://milvus.io/docs/manage_databases.md)

        +

        DescribeDatabase​

        +

        View the details of a database​

        +

        [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

        +

        CreateDatabase​

        +

        Create a database​

        +

        [CreateDatabase](https://milvus.io/docs/manage_databases.md)

        +

        DropDatabase​

        +

        Drop a database​

        +

        [DropDatabase](https://milvus.io/docs/manage_databases.md)

        +

        AlterDatabase​

        +

        Modify the properties of a database​

        +

        [AlterDatabase](https://milvus.io/docs/manage_databases.md)

        +

        Collection Privileges​

        +

        +

        GetFlushState​

        +

        Check the status of the collection flush operation​

        +

        [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

        +

        GetLoadState​

        +

        Check the load status of a collection​

        +

        [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

        +

        GetLoadingProgress​

        +

        Check the loading progress of a collection​

        +

        [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

        +

        ShowCollections​

        +

        View all collections with collection privileges​

        +

        [ShowCollections](https://milvus.io/docs/view-collections.md)

        +

        ListAliases​

        +

        View all aliases of a collection​

        +

        [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

        +

        DescribeCollection​

        +

        View the details of a collection​

        +

        [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

        +

        DescribeAlias​

        +

        View the details of an alias​

        +

        [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

        +

        GetStatistics​

        +

        Obtain the statistics of a collection (eg. The number of entities in a collection)​

        +

        [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

        +

        CreateCollection​

        +

        Create a collection​

        +

        [CreateCollection](https://milvus.io/docs/create-collection.md)

        +

        DropCollection​

        +

        Drop a collection​

        +

        [DropCollection](https://milvus.io/docs/drop-collection.md)

        +

        Load​

        +

        Load a collection​

        +

        [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

        +

        Release​

        +

        Release a collection​

        +

        [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

        +

        Flush​

        +

        +

        Persist all entities in a collection to a sealed segment. Any entity inserted after the flush operation will be stored in a new segment.​

        +

        [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

        +

        Compaction​

        +

        Manually trigger compaction​

        +

        [Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

        +

        RenameCollection​

        +

        Rename a collection​

        +

        [RenameCollection](https://milvus.io/docs/modify-collection.md)

        +

        CreateAlias​

        +

        Create an alias for a collection​

        +

        [CreateAlias](https://milvus.io/docs/manage-aliases.md)

        +

        DropAlias​

        +

        Drop the alias of a collection​

        +

        [DropAlias](https://milvus.io/docs/manage-aliases.md)

        +

        FlushAll​

        +

        Flush all collections in a database​

        +

        [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

        +

        Partition Privileges​

        +

        HasPartition​

        +

        Check whether a partition exists​

        +

        [HasPartition](https://milvus.io/docs/manage-partitions.md)

        +

        ShowPartitions​

        +

        View all partitions in a collection​

        +

        [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

        +

        CreatePartition​

        +

        Create a partition​

        +

        [CreatePartition](https://milvus.io/docs/manage-partitions.md)

        +

        DropPartition​

        +

        Drop a partition​

        +

        [DropPartition](https://milvus.io/docs/manage-partitions.md)

        +

        Index Privileges​

        +

        IndexDetail​

        +

        View the details of an index​

        +

        +

        [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

        +

        CreateIndex​

        +

        Create an index​

        +

        [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

        +

        DropIndex​

        +

        Drop an index​

        +

        [DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

        +

        Resource Management Privileges​

        +

        +

        LoadBalance​

        +

        Achieve load balance​

        +

        [LoadBalance](https://milvus.io/docs/resource_group.md)

        +

        CreateResourceGroup​

        +

        Create a resource group​

        +

        [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

        +

        DropResourceGroup​

        +

        Drop a resource group​

        +

        [DropResourceGroup](https://milvus.io/docs/resource_group.md)

        +

        UpdateResourceGroups​

        +

        Update a resource group​

        +

        [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

        +

        DescribeResourceGroup​

        +

        View the details of a resource group​

        +

        [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

        +

        ListResourceGroups​

        +

        View all resource groups of the current instance​

        +

        [ListResourceGroups](https://milvus.io/docs/resource_group.md)

        +

        TransferNode​

        +

        Transfer nodes between resource groups​

        +

        [TransferNode](https://milvus.io/docs/resource_group.md)

        +

        TransferReplica​

        +

        Transfer replicas between resource groups​

        +

        [TransferReplica](https://milvus.io/docs/resource_group.md)

        +

        BackupRBAC​

        +

        Create a backup for all RBAC related operations in the current instance​

        +

        BackupRBAC​

        +

        RestoreRBAC​

        +

        Restore a backup of all RBAC related operations in the current instance​

        +

        RestoreRBAC​

        +

        Entity Privileges​

        +

        +

        Query​

        +

        Conduct a query​

        +

        [Query](https://milvus.io/docs/get-and-scalar-query.md)

        +

        Search​

        +

        Conduct a search​

        +

        [Search](https://milvus.io/docs/single-vector-search.md)

        +

        Insert​

        +

        Insert entities​

        +

        [Insert](https://milvus.io/docs/insert-update-delete.md)

        +

        Delete​

        +

        Delete entities​

        +

        [Delete](https://milvus.io/docs/delete-entities.md)

        +

        Upsert​

        +

        Upsert entities​

        +

        [Upsert](https://milvus.io/docs/upsert-entities.md)

        +

        Import​

        +

        Bulk insert or import entities​

        +

        [BulkInsert/Import](https://milvus.io/docs/import-data.md)

        +

        RBAC Privileges​

        +

        CreateOwnership​

        +

        Create a user or a role​

        +

        [CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

        +

        UpdateUser​

        +

        Update the password of a user​

        +

        [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

        +

        DropOwnership​

        +

        Drop a user password or a role​

        +

        [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

        +

        SelectOwnership​

        +

        View all users that are granted a specific role ​

        +

        [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

        +

        ManageOwnership​

        +

        Manage a user or a role or grant a role to a user​

        +

        [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

        +

        SelectUser​

        +

        View all roles granted to a user​

        +

        [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

        +

        CreatePrivilegeGroup​

        +

        Create a privilege group​

        +

        [CreatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +

        DropPrivilegeGroup​

        +

        Drop a privilege group​

        +

        [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +

        ListPrivilegeGroups​

        +

        View all privilege groups in the current instance​

        +

        [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +

        OperatePrivilegeGroup​

        +

        Add privileges to or remove privileges from a privilege group​

        +

        [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +
        +

        The following example demonstrates how to grant the privilege PrivilegeSearch on collection_01 under the default database as well as a privilege group named privilege_group_1 to the role role_a.

        +
        + Python + Java + Go + Node.js + cURL +
        +
        from pymilvus import MilvusClient
        +
        +client = MilvusClient(
        +    uri="http://localhost:19530",
        +    token="root:Milvus"
        +)
        +
        +client.grant_privilege_v2(
        +    role_name="role_a",
        +    privilege="Search"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +    
        +client.grant_privilege_v2(
        +    role_name="role_a",
        +    privilege="privilege_group_1"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +
        +client.grant_privilege_v2(
        +    role_name="role_a",
        +    privilege="ClusterReadOnly"
        +    collection_name='*'
        +    db_name='*',
        +)
        +
        +
        import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
        +
        +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("Search")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("privilege_group_1")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("ClusterReadOnly")
        +        .collectionName("*")
        +        .dbName("*")
        +        .build());
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"
        +
        +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
        +
        +const address = "http://localhost:19530";
        +const token = "root:Milvus";
        +const client = new MilvusClient({address, token});
        +
        +await milvusClient.grantPrivilege({
        +   roleName: 'role_a',
        +   object: 'Collection', 
        +   objectName: 'collection_01',
        +   privilegeName: 'Search'
        + });
        +
        +
        curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "Search",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "privilege_group_1",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "ClusterReadOnly",
        +    "collectionName": "*",
        +    "dbName":"*"
        +}'
        +
        +

        Describe a role

        The following example demonstrates how to view the privileges granted to the role role_a using the describe_role method.

        +
        + Python + Java + Go + Node.js + cURL +
        +
        from pymilvus import MilvusClient
        +
        +client.describe_role(role_name="role_a")
        +
        +
        import io.milvus.v2.service.rbac.response.DescribeRoleResp;
        +import io.milvus.v2.service.rbac.request.DescribeRoleReq
        +
        +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
        +        .roleName("role_a")
        +        .build();
        +DescribeRoleResp resp = client.describeRole(describeRoleReq);
        +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"
        +
        +client.ListRoles(context.Background())
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
        +
        +await milvusClient.describeRole({roleName: 'role_a'});
        +
        +
        curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a"
        +}'
        +
        +

        Below is an example output.

        +
        {
        +     "role": "role_a",
        +     "privileges": [
        +         {
        +             "collection_name": "collection_01",
        +             "db_name": "default",
        +             "role_name": "role_a",
        +             "privilege": "Search",
        +             "grantor_name": "root"
        +         },
        +         "privilege_group_1"
        +     ]
        +}
        +
        +

        Revoke a privilege or a privilege group from a role

        The following example demonstrates how to revoke the privilege PrivilegeSearch on collection_01 under the default database as well as the privilege group privilege_group_1 that have been granted to the role role_a.

        +
        + Python + Java + Go + cURL +
        +
        from pymilvus import MilvusClient
        +
        +client = MilvusClient(
        +    uri="http://localhost:19530",
        +    token="root:Milvus"
        +)
        +
        +client.revoke_privilege_v2(
        +    role_name="role_a",
        +    privilege="Search"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +    
        +client.revoke_privilege_v2(
        +    role_name="role_a",
        +    privilege="privilege_group_1"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +
        +client.revoke_privilege_v2(
        +    role_name="role_a",
        +    privilege="ClusterReadOnly"
        +    collection_name='*'
        +    db_name='*',
        +)
        +
        +
        import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
        +
        +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("Search")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("privilege_group_1")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("ClusterReadOnly")
        +        .collectionName("*")
        +        .dbName("*")
        +        .build());
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"
        +
        +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
        +
        +
        curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "Search",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "Search",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "ClusterReadOnly",
        +    "collectionName": "*",
        +    "dbName":"*"
        +}'
        +
        diff --git a/localization/v2.5.x/site/en/adminGuide/grant_roles.json b/localization/v2.5.x/site/en/adminGuide/grant_roles.json new file mode 100644 index 000000000..12651d853 --- /dev/null +++ b/localization/v2.5.x/site/en/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"Grant Roles to Users​","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"Grant a role to a user​","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"Describe user​","href":"Describe-user​","type":2,"isActive":false},{"label":"Revoke a role​","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/grant_roles.md b/localization/v2.5.x/site/en/adminGuide/grant_roles.md new file mode 100644 index 000000000..ee0814d60 --- /dev/null +++ b/localization/v2.5.x/site/en/adminGuide/grant_roles.md @@ -0,0 +1,215 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + After creating a role and granting privileges to the role, you can grant the + role to users so that the users can access resources and perform actions that + are defined by the role. You can grant multiple roles to a user or grant a + role to multiple users. This guide introduces how to grant roles to users.​ +title: Grant Roles to Users​ +--- +

        Grant Roles to Users​

        After creating a role and granting privileges to the role, you can grant the role to users so that the users can access resources and perform actions that are defined by the role. You can grant multiple roles to a user or grant a role to multiple users. This guide introduces how to grant roles to users.​

        +

        The built-in user root in Milvus has already been granted the admin role, which has all privileges. You do not need to assign any other roles to it.​

        +

        Grant a role to a user​

        The following example demonstrates how to grant the role role_a to the user user_1.​

        + +
        from pymilvus import MilvusClient​
        +​
        +client = MilvusClient(​
        +    uri="http://localhost:19530",​
        +    token="root:Milvus"​
        +)​
        +​
        +client.grant_role(user_name="user_1", role_name="role_a")​
        +
        +
        +
        import io.milvus.v2.client.ConnectConfig;​
        +import io.milvus.v2.client.MilvusClientV2;​
        +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
        +​
        +String CLUSTER_ENDPOINT = "http://localhost:19530";​
        +String TOKEN = "root:Milvus";​
        +​
        +​
        +ConnectConfig connectConfig = ConnectConfig.builder()​
        +    .uri(CLUSTER_ENDPOINT)​
        +    .token(TOKEN)​
        +    .build();​
        +    ​
        +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
        +​
        +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
        +        .roleName("role_a")​
        +        .userName("user_1")​
        +        .build();​
        +client.grantRole(grantRoleReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +const address = "http://localhost:19530";​
        +const token = "root:Milvus";​
        +const client = new MilvusClient({address, token});​
        +​
        +milvusClient.grantRole({​
        +   username: 'user_1',​
        +   roleName: 'role_a'​
        + })​
        +
        +
        +
        export CLUSTER_ENDPOINT="http://localhost:19530"​
        +export TOKEN="root:Milvus"​
        +​
        +curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "roleName": "role_a",​
        +    "userName": "user_1"​
        +}'​
        +
        +
        +

        Describe user​

        Once you grant a role to a user, you can check if the grant operation is successful via the describe_user() method.​

        +

        The following example demonstrates how to check the role(s) of the user user_1.​

        + +
        from pymilvus import MilvusClient​
        +​
        +client.describe_user(user_name="user_1")​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.DescribeUserReq;​
        +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
        +​
        +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
        +        .userName("user_1")​
        +        .build();​
        +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.describeUser({username: 'user_1'})​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1"​
        +}'​
        +
        +
        +

        Below is an example output.​

        +
        {'user_name': 'user_1', 'roles': 'role_a'}​
        +
        +
        +

        Revoke a role​

        You can also revoke a role that has been assigned to a user.​

        +

        The following example demonstrates how to revoke the role role_a assigned to the user user_1.​

        + +
        from pymilvus import MilvusClient​
        +​
        +client.revoke_role(​
        +    user_name='user_1',​
        +    role_name='role_a'​
        +)​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
        +​
        +client.revokeRole(RevokeRoleReq.builder()​
        +        .userName("user_1")​
        +        .roleName("role_a")​
        +        .build());​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1",​
        +    "roleName": "role_a"​
        +}'​
        +
        +
        diff --git a/localization/v2.5.x/site/en/adminGuide/privilege_group.json b/localization/v2.5.x/site/en/adminGuide/privilege_group.json new file mode 100644 index 000000000..e04d73e8b --- /dev/null +++ b/localization/v2.5.x/site/en/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"Create Privilege Group​","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"Privilege group vs. privileges​","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"Built-in privilege groups​","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"Procedures​","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/privilege_group.md b/localization/v2.5.x/site/en/adminGuide/privilege_group.md new file mode 100644 index 000000000..d3b2be93d --- /dev/null +++ b/localization/v2.5.x/site/en/adminGuide/privilege_group.md @@ -0,0 +1,513 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: >- + To streamline the process of granting privileges, it is recommended that you + combine multiple privileges into a privilege group.​ +title: Create Privilege Group +--- +

        Create Privilege Group​

        To streamline the process of granting privileges, it is recommended that you combine multiple privileges into a privilege group.​

        +

        Privilege group vs. privileges​

        A privilege group consists of multiple privileges.​

        +

        + + Privilege group illustrated + Privilege group illustrated + +

        +

        As shown in the figure above, suppose you need to grant three different privileges to a role.​

        +
          +
        • If you do not use a privilege group, you need to grant the privileges three times.​

        • +
        • If you use a privilege group, you only need to create a privilege group and add the three privileges to this privilege group and grant the privilege group to Role A.​

        • +
        +

        By using a privilege group, you can grant multiple privileges in bulk to a role.​

        +

        Built-in privilege groups​

        For ease-of-use, Milvus provides a total of 9 built-in privileges on the collection, database, and instance level: COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW and Cluster_Admin.​

        +
        +

        The three levels of built-in privilege groups do not have a cascading relationship. Setting a privilege group at the instance level does not automatically set permissions for all databases and collections under that instance. Privileges at the database and collection levels need to be set manually.​

        +
        +

        The following tables explains the privileges includes in each of the built-in privilege group.​

        +

        Collection level​

          +
        • COLL_RO: includes privileges to read collection data​

        • +
        • COLL_RW: includes privileges to read and write collection data​

        • +
        • COLL_ADMIN: includes privileges to read and write collection data and manage collections.​

        • +
        +

        The table below lists the specific privileges included in the three built-in privilege groups at the collection level:​

        +

        **Privilege**

        +

        **CollectionReadOnly**

        +

        **CollectionReadWrite**

        +

        **CollectionAdmin**

        +

        Query​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        Search​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        IndexDetail​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        GetFlushState​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        GetLoadState​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        GetLoadingProgress​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        HasPartition​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        ShowPartitions​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        ListAliases​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        DescribeCollection​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        DescribeAlias​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        GetStatistics​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        CreateIndex​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        DropIndex​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        CreatePartition​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        DropPartition​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Load​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Release​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Insert​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Delete​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Upsert​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Import​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Flush​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        Compaction​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        LoadBalance​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        CreateAlias​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        DropAlias​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +
        +

        Database level​

          +
        • DB_RO: includes privileges to read database data​

        • +
        • DB_RW: includes privileges to read and write database data​

        • +
        • DB_Admin: includes privileges to read and write database data and manage databases.​

        • +
        +

        The table below lists the specific privileges included in the three built-in privilege groups at the database level:​

        +

        **Privilege**

        +

        **DatabaseReadOnly**

        +

        **DatabaseReadWrite**

        +

        **DatabaseAdmin**

        +

        ShowCollections​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        DescribeDatabase​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        CreateCollection​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        DropCollection​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        AlterDatabase​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +
        +

        Cluster level​

          +
        • Cluster_RO: includes privileges to read instnace data​

        • +
        • Cluster_RW: includes privileges to read and write instance data​

        • +
        • Cluster_Admin: includes privileges to read and write instance data and manage instances.​

        • +
        +

        The table below lists the specific privileges included in the three built-in privilege groups at the instance level:​

        +

        **Privilege**

        +

        **ClusterReadOnly**

        +

        **ClusterReadWrite**

        +

        **ClusterAdmin**

        +

        ListDatabases​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        RenameCollection​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        CreateOwnership​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        UpdateUser​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        DropOwnership​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        SelectOwnership​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        ManageOwnership​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        SelectUser​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        BackupRBAC​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        RestoreRBAC​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        CreateResourceGroup​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        DropResourceGroup​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        UpdateResourceGroups​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        DescribeResourceGroup​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        ListResourceGroups​

        +

        ✔️​

        +

        ✔️​

        +

        ✔️​

        +

        TransferNode​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        TransferReplica​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        CreateDatabase​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        DropDatabase​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        FlushAll​

        +

        ❌​

        +

        ✔️​

        +

        ✔️​

        +

        CreatePrivilegeGroup​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        DropPrivilegeGroup​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        ListPrivilegeGroups​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +

        OperatePrivilegeGroup​

        +

        ❌​

        +

        ❌​

        +

        ✔️​

        +
        +

        Procedures​

        You can create a privilege group and then add privileges to the privilege group. ​

        +

        Create a privilege group​

        The following example demonstrates how to create a privilege group named privilege_group_1.​

        +
        + Python + Java + Go + cURL +
        +
        from pymilvus import MilvusClient​
        +client.create_privileg_group(group_name='privilege_group_1')​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
        +​
        +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1"​
        +}'​
        +
        +
        +

        Add privileges to a privilege group​

        The following example demonstrates how to add privileges PrivilegeBackupRBAC and PrivilegeRestoreRBAC to the privilege group privilege_group_1 that is just created.​

        +
        + Python + Java + Go + cURL +
        +
        from pymilvus import MilvusClient​
        +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
        +​
        +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .privileges(Arrays.asList("Query", "Search"))​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1",​
        +    "privileges":["Query", "Search"]​
        +}'​
        +
        +
        +

        Remove privileges from a privilege group​

        The following example demonstrates how to remove the privilege PrivilegeRestoreRBAC from the privilege group privilege_group_1.​

        +
        + Python + Java + Go + cURL +
        +
        from pymilvus import MilvusClient​
        +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
        +​
        +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .privileges(Collections.singletonList("Search"))​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1",​
        +    "privileges":["Search"]​
        +}'​
        +
        +
        +

        List privilege groups​

        The following example demonstrates how to list all existing privilege groups.​

        +
        + Python + Java + Go + cURL +
        +
        from pymilvus import MilvusClient​
        +client.list_privilege_groups()​
        +
        +
        +
        import io.milvus.v2.service.rbac.PrivilegeGroup;​
        +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
        +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
        +​
        +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
        +        .build());​
        +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.ListPrivilegeGroups(context.Background())​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Below is an example output.​

        +
        PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
        +
        +
        +

        Drop a privilege group​

        The following example demonstrates how to drop the privilege group privilege_group_1.​

        +
        + Python + Java + Go + cURL +
        +
        from pymilvus import MilvusClient​
        +client.drop_privilege_group(group_name='privilege_group_1')​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
        +​
        +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1"​
        +}'​
        +
        +
        diff --git a/localization/v2.5.x/site/en/adminGuide/rbac.json b/localization/v2.5.x/site/en/adminGuide/rbac.json index efe195a22..99d6f82d7 100644 --- a/localization/v2.5.x/site/en/adminGuide/rbac.json +++ b/localization/v2.5.x/site/en/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"Enable RBAC","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Initiate a Milvus client to establish a connection","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. Create a user","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. Create a role","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. Grant a privilege to a role","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. Grant a role to a user","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. Revoke privileges","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBAC Explained​","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"RBAC key concepts​","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"Procedures​","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/rbac.md b/localization/v2.5.x/site/en/adminGuide/rbac.md index 9b48f6788..772e5dd1f 100644 --- a/localization/v2.5.x/site/en/adminGuide/rbac.md +++ b/localization/v2.5.x/site/en/adminGuide/rbac.md @@ -1,10 +1,13 @@ --- id: rbac.md related_key: enable RBAC -summary: 'Learn how to manage users, roles, and privileges.' -title: Enable RBAC +summary: >- + RBAC (Role-Based Access Control) is an access control method based on roles. + With RBAC, you can finely control the operations users can perform at the + collection, database, and instance levels, enhancing data security. ​ +title: RBAC Explained --- -

        Enable RBAC

        By enabling RBAC, you can control access to specific Milvus resources (Eg. a collection or a partition) or permissions based on user role and privileges. Currently, this feature is only available in Python and Java.

        -

        This topic describes how to enable RBAC and manage users and roles.

        -
        -

        The code snippets on this page use new MilvusClient (Python) to interact with Milvus. New MilvusClient SDKs for other languages will be released in future updates.

        -
        -

        1. Initiate a Milvus client to establish a connection

        RBAC (Role-Based Access Control) is an access control method based on roles. With RBAC, you can finely control the operations users can perform at the collection, database, and instance levels, enhancing data security. ​

        +

        Unlike traditional user access control models, RBAC introduces the concept of roles. In the RBAC model, you grant privileges to roles and then grant those roles to users. Then users can obtain privileges. ​

        +

        The RBAC model can improve the efficiency of access control management. For example, if multiple users require the same set of privileges, you do not need to manually set the privileges for each user. Instead, you can create a role and assign the role to users. If you want to adjust the privileges of these users, you can just adjust the role privileges and the modification will be applied to all users with this role.​

        +

        RBAC key concepts​

        After you enable user authentication, connect to your Milvus instance using token that consists of a username and a password. By default, Milvus uses the root user with the password Milvus.

        -
        from pymilvus import MilvusClient
        -
        -client = MilvusClient(
        -    uri='http://localhost:19530', # replace with your own Milvus server address
        -    token='root:Milvus' # replace with your own Milvus server token
        -)
        -
        -

        2. Create a user

        Create a user named user_1 with the password P@ssw0rd:

        -
        client.create_user(
        -    user_name='user_1',
        -    password='P@ssw0rd'
        -)
        -
        -

        After creating a user, you can:

        -
          -
        • Update a user password. You need to provide both the original and the new password.
        • -
        -
        client.update_password(
        -    user_name='user_1',
        -    old_password='P@ssw0rd',
        -    new_password='P@ssw0rd123'
        -)
        -
        -
          -
        • List all users.
        • -
        -
        client.list_users()
        -
        -# output:
        -# ['root', 'user_1']
        -
        -
          -
        • Check the role of a particular user.
        • -
        -
        client.describe_user(user_name='user_1')
        -
        -# output:
        -# {'user_name': 'user_1', 'roles': ()}
        -
        -

        3. Create a role

        The following example creates a role named roleA.

        -
        client.create_role(
        -    role_name="roleA",
        -)
        -
        -

        After creating a role, you can:

        +

        + + Users, roles, and privileges + Users, roles, and privileges + +

        +

        There are four major components in the RBAC model.​

          -
        • List all roles.
        • +
        • **Resource: **The resource entity that can be accessed. There are three levels of resources in Milvus - instance, database, and collection.​

        • +
        • **Privilege: **The permission to perform certain operations on Milvus resources (eg. create collections, insert data, etc). ​

        • +
        • **Privilege group: **A group of multiple privileges.​

        • +
        • **Role: **A role consists of two parts-privileges and resources. Privileges define the type of operations that a role can perform while resources define the target resources that the operations can be performed on. For example, the database administrator role can perform read, write, and manage operations on certain databases.​

        • +
        • **User: **A user is someone who uses Milvus. Each user has a unique ID and is granted a role or multiple roles. ​

        -
        client.list_roles()
        -
        -# output:
        -# ['admin', 'public', 'roleA']
        -
        -

        4. Grant a privilege to a role

        The following example demonstrates how to grant the permission of searching all collections to the role named roleA.

        -

        The object_type specifies the object type, which can also be understood as the resource type. Currently, valid values ​​include Collection/User/Global, etc., where Global means that there is no specific resource type. The object_name is the resource name. If objecttype is Collection, then object name can be referred to a specific collection name, or you can use * to specify all collections. If objecttype is Global, then the object name can be only specified as *. See Users and Roles for other types of privileges you can grant.

        -

        Before managing role privileges, make sure you have enabled user authentication. Otherwise, an error may occur. For information on how to enable user authentication, refer to Authenticate User Access.

        -
        # grant privilege to a role
        -
        -client.grant_privilege(
        -    role_name='roleA',
        -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
        -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
        -    privilege='SelectUser'
        -)
        -
        -

        After granting a privilege to a role, you can:

        -
          -
        • View the privileges granted to a role.
        • -
        -
        client.describe_role(
        -    role_name='roleA'
        -)
        -
        -# output:
        -# {'role': 'roleA',
        -#  'privileges': [{'object_type': 'User',
        -#    'object_name': 'user_1',
        -#    'db_name': 'default',
        -#    'role_name': 'roleA',
        -#    'privilege': 'SelectUser',
        -#    'grantor_name': 'root'}]}
        -
        -

        5. Grant a role to a user

        Grant the role to a user so that this user can inherit all the privileges of the role.

        -
        # grant a role to a user
        -
        -client.grant_role(
        -    user_name='user_1',
        -    role_name='roleA'
        -)
        -
        -

        After granting the role, verify that it has been granted:

        -
        client.describe_user(
        -    user_name='user_1'
        -)
        -
        -# output:
        -# {'user_name': 'user_1', 'roles': ('roleA')}
        -
        -

        6. Revoke privileges

        -

        Exercise caution when performing the following operations because these operations are irreversible.

        -
        -
          -
        • Remove a privilege from a role. If you revoke a privilege that has not been granted to the role, an error will occur.
        • -
        -
        client.revoke_privilege(
        -    role_name='roleA',
        -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
        -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
        -    privilege='SelectUser'
        -)
        -
        -
          -
        • Remove a user from a role. If you revoke a role that has not been granted to the user, an error will occur.
        • -
        -
        client.revoke_role(
        -    user_name='user_1',
        -    role_name='roleA'
        -)
        -
        -
          -
        • Drop a role.
        • -
        -
        client.drop_role(role_name='roleA')
        -
        -
          -
        • Drop a user.
        • -
        -
        client.drop_user(user_name='user_1')
        -
        -

        What’s next

        +

        The achieve access control via RBAC, you need to follow the steps below:​

        +
          +
        1. Create a user: In addition to the default user root in Milvus, you can create new users and set passwords to protect data security.​

        2. +
        3. Create a role: You can create customized roles based on your needs. The specific capabilities of a role are determined by its privileges.​

        4. +
        5. Create a privilege group: Combine multiple privileges into one privilege group to streamline the process of granting privileges to a role.​

        6. +
        7. Grant privileges or privilege groups to a role: Define the capabilities of a role be granting privileges or privilege groups to this role. ​

        8. +
        9. Grant roles to users: Grant roles with certain privileges to users so that users can have the privileges of a role. A single role can be granted to multiple users.​

        10. +
        diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.json index 246b31c90..cbe0a7b2b 100644 --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Upgrade Milvus Cluster with Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Upgrade Milvus Cluster with Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md index 0e6b43c87..ae37961f5 100644 --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: Upgrade Milvus Cluster with Docker Compose >

        This topic describes how to upgrade your Milvus using Docker Compose.

        -

        In normal cases, you can upgrade Milvus by changing its image. However, you need to migrate the metadata before any upgrade from v2.1.x to v2.5.0-beta.

        +

        In normal cases, you can upgrade Milvus by changing its image. However, you need to migrate the metadata before any upgrade from v2.1.x to v2.5.0.

        Upgrade Milvus by changing its image

      8. Run the following commands to perform the upgrade.

        docker compose down
        @@ -105,7 +105,7 @@ cmd:
           runWithBackup: true
         config:
           sourceVersion: 2.1.4   # Specify your milvus version
        -  targetVersion: 2.5.0-beta
        +  targetVersion: 2.5.0
           backupFilePath: /tmp/migration.bak
         metastore:
           type: etcd
        diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.json
        index 51d027dd4..f2c810d68 100644
        --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.json
        +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.json
        @@ -1 +1 @@
        -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Upgrade Milvus Cluster with Helm Chart","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Check Milvus Helm Chart","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus using Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Upgrade Milvus Cluster with Helm Chart","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Check Milvus Helm Chart","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus using Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md
        index 15cb52827..3e6cc18e8 100644
        --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md
        +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md
        @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
         zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
         

        You can choose the upgrade path for your Milvus as follows:

        -
        - [Conduct a rolling upgrade](#conduct-a-rolling-upgrade) from Milvus v2.2.3 and later releases to v2.5.0-beta.
        +
        - [Conduct a rolling upgrade](#conduct-a-rolling-upgrade) from Milvus v2.2.3 and later releases to v2.5.0.

        Conduct a rolling upgrade

        1. diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.json index 94da3088c..ddf435991 100644 --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Upgrade Milvus Cluster with Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Upgrade your Milvus operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Upgrade Milvus Cluster with Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Upgrade your Milvus operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.md index 806987845..ba9bc5dd8 100644 --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

        Once you have upgraded your Milvus operator to the latest version, you have the following choices:

        Conduct a rolling upgrade

      In this above configuration file, set spec.components.enableRollingUpdate to true and set spec.components.image to the desired Milvus version.

      By default, Milvus performs rolling upgrade for coordinators in an ordered way, in which it replaces the coordinator pod images one after another. To reduce the upgrade time, consider setting spec.components.imageUpdateMode to all so that Milvus replaces all pod images at the same time.

      @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      You can set spec.components.imageUpdateMode to rollingDowngrade to have Milvus replace coordinator pod images with a lower version.

      apiVersion: milvus.io/v1beta1
      @@ -128,7 +128,7 @@ metadata:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      Then run the following to perform the upgrade:

      kubectl patch -f milvusupgrade.yaml
      @@ -148,8 +148,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Since Milvus 2.2.0, the metadata is incompatible with that in previous releases. The following example snippets assume an upgrade from Milvus 2.1.4 to Milvus 2.5.0-beta.

      -

      1. Create a .yaml file for metadata migration

      Create a metadata migration file. The following is an example. You need to specify the name, sourceVersion, and targetVersion in the configuration file. The following example sets the name to my-release-upgrade, sourceVersion to v2.1.4, and targetVersion to v2.5.0-beta. This means that your Milvus cluster will be upgraded from v2.1.4 to v2.5.0-beta.

      +

      Since Milvus 2.2.0, the metadata is incompatible with that in previous releases. The following example snippets assume an upgrade from Milvus 2.1.4 to Milvus 2.5.0.

      +

      1. Create a .yaml file for metadata migration

      Create a metadata migration file. The following is an example. You need to specify the name, sourceVersion, and targetVersion in the configuration file. The following example sets the name to my-release-upgrade, sourceVersion to v2.1.4, and targetVersion to v2.5.0. This means that your Milvus cluster will be upgraded from v2.1.4 to v2.5.0.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -159,9 +159,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.json
      index 283394329..371cf9799 100644
      --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.json
      +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.json
      @@ -1 +1 @@
      -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Upgrade Milvus Standalone with Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Upgrade Milvus Standalone with Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.md
      index c73fe928f..3ca158cea 100644
      --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.md
      +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.md
      @@ -24,7 +24,7 @@ title: Upgrade Milvus Standalone with Docker Compose
               >
             
           

      This topic describes how to upgrade your Milvus using Docker Compose.

      -

      In normal cases, you can upgrade Milvus by changing its image. However, you need to migrate the metadata before any upgrade from v2.1.x to v2.5.0-beta.

      +

      In normal cases, you can upgrade Milvus by changing its image. However, you need to migrate the metadata before any upgrade from v2.1.x to v2.5.0.

      Due to security concerns, Milvus upgrades its MinIO to RELEASE.2023-03-20T20-16-18Z with the release of v2.2.5. Before any upgrades from previous Milvus Standalone releases installed using Docker Compose, you should create a Single-Node Single-Drive MinIO deployment and migrate existing MinIO settings and content to the new deployment. For details, refer to this guide.

      @@ -49,7 +49,7 @@ title: Upgrade Milvus Standalone with Docker Compose
      ...
       standalone:
         container_name: milvus-standalone
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       
    3. Run the following commands to perform the upgrade.

      docker compose down
      @@ -83,7 +83,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.json
      index f647228d3..599a57393 100644
      --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.json
      +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Upgrade Milvus Standalone with Helm Chart","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Check the Milvus version","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus using Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Upgrade Milvus Standalone with Helm Chart","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Check the Milvus version","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus using Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.md
      index cc4c68243..086bb3e7f 100644
      --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.md
      +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      You can choose the upgrade path for your Milvus as follows:

      -
      - [Conduct a rolling upgrade](#conduct-a-rolling-upgrade) from Milvus v2.2.3 and later releases to v2.5.0-beta.
      +
      - [Conduct a rolling upgrade](#conduct-a-rolling-upgrade) from Milvus v2.2.3 and later releases to v2.5.0.

      Conduct a rolling upgrade

      1. @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
      2. Migrate the Milvus metadata.
      3. Start Milvus components with a new image.
      -

      2. Upgrade Milvus from v2.1.x to 2.5.0-beta

      The following commands assume that you upgrade Milvus from v2.1.4 to 2.5.0-beta. Change them to the versions that fit your needs.

      +

      2. Upgrade Milvus from v2.1.x to 2.5.0

      The following commands assume that you upgrade Milvus from v2.1.4 to 2.5.0. Change them to the versions that fit your needs.

      1. Specify Milvus instance name, source Milvus version, and target Milvus version.

        -
        ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
        +
        ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
         
      2. Specify the namespace with -n if your Milvus is not installed in the default K8s namespace.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
         
      3. Specify the root path with -r if your Milvus is installed with the custom rootpath.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
         
      4. Specify the image tag with -w if your Milvus is installed with a custom image.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
         
      5. Set -d true if you want to automatically remove the migration pod after the migration is completed.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
         
      6. Rollback and migrate again if the migration fails.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
        -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
        +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
         
      diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.json index 07a88de05..8f9cbc86f 100644 --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Upgrade Milvus Standalone with Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Upgrade your Milvus operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Upgrade Milvus Standalone with Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Upgrade your Milvus operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Conduct a rolling upgrade","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Upgrade Milvus by changing its image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrate the metadata","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.md index ad79bacab..0c5a1b9c6 100644 --- a/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

      Once you have upgraded your Milvus operator to the latest version, you have the following choices:

      Conduct a rolling upgrade

      In this above configuration file, set spec.components.enableRollingUpdate to true and set spec.components.image to the desired Milvus version.

      By default, Milvus performs a rolling upgrade for coordinators in an ordered way, in which it replaces the coordinator pod images one after another. To reduce the upgrade time, consider setting spec.components.imageUpdateMode to all so that Milvus replaces all pod images at the same time.

      @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      You can set spec.components.imageUpdateMode to rollingDowngrade to have Milvus replace coordinator pod images with a lower version.

      apiVersion: milvus.io/v1beta1
      @@ -130,7 +130,7 @@ labels:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      Then run the following to perform the upgrade:

      kubectl patch -f milvusupgrade.yaml
      @@ -150,8 +150,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Since Milvus 2.2.0, the metadata is incompatible with that in previous releases. The following example snippets assume an upgrade from Milvus 2.1.4 to Milvus v2.5.0-beta.

      -

      1. Create a .yaml file for metadata migration

      Create a metadata migration file. The following is an example. You need to specify the name, sourceVersion, and targetVersion in the configuration file. The following example sets the name to my-release-upgrade, sourceVersion to v2.1.4, and targetVersion to v2.5.0-beta. This means that your Milvus instance will be upgraded from v2.1.4 to v2.5.0-beta.

      +

      Since Milvus 2.2.0, the metadata is incompatible with that in previous releases. The following example snippets assume an upgrade from Milvus 2.1.4 to Milvus v2.5.0.

      +

      1. Create a .yaml file for metadata migration

      Create a metadata migration file. The following is an example. You need to specify the name, sourceVersion, and targetVersion in the configuration file. The following example sets the name to my-release-upgrade, sourceVersion to v2.1.4, and targetVersion to v2.5.0. This means that your Milvus instance will be upgraded from v2.1.4 to v2.5.0.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -161,9 +161,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      diff --git a/localization/v2.5.x/site/en/adminGuide/users_and_roles.json b/localization/v2.5.x/site/en/adminGuide/users_and_roles.json
      new file mode 100644
      index 000000000..3a93858f3
      --- /dev/null
      +++ b/localization/v2.5.x/site/en/adminGuide/users_and_roles.json
      @@ -0,0 +1 @@
      +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"Create Users & Roles​","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"User​","href":"User​","type":2,"isActive":false},{"label":"Role​","href":"Role​","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/en/adminGuide/users_and_roles.md b/localization/v2.5.x/site/en/adminGuide/users_and_roles.md
      new file mode 100644
      index 000000000..8d30fcb98
      --- /dev/null
      +++ b/localization/v2.5.x/site/en/adminGuide/users_and_roles.md
      @@ -0,0 +1,280 @@
      +---
      +id: users_and_roles.md
      +related_key: 'users, roles'
      +summary: >-
      +  Milvus achieves fine-grained access control through RBAC. You can start by
      +  creating users and roles, then assign privileges or privilege groups to roles,
      +  and finally manage access control by granting roles to users. This method
      +  ensures the efficiency and security of access management. This page introduces
      +  how to create users and roles in Milvus.​
      +title: Create Users & Roles​
      +---
      +

      Create Users & Roles​

      Milvus achieves fine-grained access control through RBAC. You can start by creating users and roles, then assign privileges or privilege groups to roles, and finally manage access control by granting roles to users. This method ensures the efficiency and security of access management. This page introduces how to create users and roles in Milvus.​

      +

      User​

      After initializing a Milvus instance, a root user is automatically generated for authentication when connecting to Milvus for the first time. The username of the root user is root and the password is Milvus. The default role of the root user is admin, which has access to all resources. To ensure data security, please keep your root user’s credentials safe to prevent unauthorized access.​

      +

      For daily operations, we recommend creating users instead of using the root user.​

      +

      Create a user​

      The following example shows how to create a user with the username user_1 and the password P@ssw0rd. The username and password for the user must follow these rules:​

      +
        +
      • Username: Must start with a letter and can only include uppercase or lowercase letters, numbers, and underscores.​

      • +
      • Password: Must be 8-64 characters long and must include three of the following: uppercase letters, lowercase letters, numbers, and special characters.​

      • +
      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +client.create_user(user_name="user_1", password="P@ssw0rd")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig;​
      +import io.milvus.v2.client.MilvusClientV2;​
      +import io.milvus.v2.service.rbac.request.CreateUserReq;​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +        .uri("http://localhost:19530")​
      +        .token("root:Milvus")​
      +        .build();​
      +        ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +CreateUserReq createUserReq = CreateUserReq.builder()​
      +        .userName("user_1")​
      +        .password("P@ssw0rd")​
      +        .build();​
      +        ​
      +client.createUser(createUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +await milvusClient.createUser({​
      +   username: 'user_1',​
      +   password: 'P@ssw0rd',​
      + });​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1",​
      +    "password": "P@ssw0rd"​
      +}'​
      +
      +
      +

      Update password​

      After creating a user, you can update the password if you forget.​

      +

      The new password must also follow the following rule:​

      +
        +
      • Must be 8-64 characters long and include three of the following: uppercase letters, lowercase letters, numbers, and special characters. ​
      • +
      +

      The following example shows how to update the password for user user_1 to NewP@ssw0rd.​

      + +
      from pymilvus import MilvusClient​
      +​
      +client.update_password(​
      +    user_name="user_1",​
      +    old_password="P@ssw0rd",​
      +    new_password="NewP@ssw0rd"​
      +)​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
      +​
      +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
      +        .userName("user_1")​
      +        .password("P@ssw0rd")​
      +        .newPassword("NewP@ssw0rd")​
      +        .build();​
      +client.updatePassword(updatePasswordReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.updateUser({​
      +   username: 'user_1',​
      +   newPassword: 'P@ssw0rd',​
      +   oldPassword: 'NewP@ssw0rd',​
      +});​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "newPassword": "P@ssw0rd!",​
      +    "userName": "user_1",​
      +    "password": "P@ssw0rd"​
      +}'​
      +
      +
      +

      List users​

      After creating several users, you can list and view all existing users.​

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_users()​
      +
      +
      +
      List<String> resp = client.listUsers();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.listUsers();​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Below is an example output. root is the default user automatically generated in Milvus. user_1 is the new user that is just created.​

      +
      ['root', 'user_1']​
      +
      +
      +

      Role​

      Milvus provides a built-in role called admin, which is an administrator role that can access resources under all instances and has privileges for all operations. For more fine-grained access management and enhanced data security, it is recommended that you create custom roles based on your needs.​

      +

      Create a role​

      The following example demonstrates how to create a role named role_a. ​

      +

      The role name must follow the following rule:​

      +
        +
      • Must start with a letter and can only include uppercase or lowercase letters, numbers, and underscores."​
      • +
      + +
      from pymilvus import MilvusClient​
      +​
      +client.create_role(role_name="role_a")​
      +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
      +
      +
      +
      CreateRoleReq createRoleReq = CreateRoleReq.builder()​
      +        .roleName("role_a")​
      +        .build();​
      +       ​
      +
      +
      +
      client.createRole(createRoleReq);​
      +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.createRole({​
      +   roleName: 'role_a',​
      +});​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      +

      List roles​

      After creating several roles, you can list and view all existing roles.​

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_roles()​
      +
      +
      +
      List<String> roles = client.listRoles();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.listRoles(​
      +    includeUserInfo: True​
      +);​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Below is an example output. admin is the default role in Milvus. role_a is the new role that is just created.​

      +
      ['admin', 'role_a']​
      +
      +
      diff --git a/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 9679307d7..57054946e 100644 --- a/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Run Milvus with Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Install Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Run Milvus with Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Install Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.md index 9843e5b4b..a247abce7 100644 --- a/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Run Milvus with Docker Compose (Linux)

      Milvus provides a Docker Compose configuration file in the Milvus repository. To install Milvus using Docker Compose, just run

      # Download the configuration file
      -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
      +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
       
       # Start Milvus
       $ sudo docker compose up -d
      diff --git a/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
      index 5ce148076..5ca6051b6 100644
      --- a/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
      +++ b/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
      @@ -1 +1 @@
      -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Run Milvus with GPU Support Using Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Install Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configure memory pool","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Run Milvus with GPU Support Using Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Prerequisites","href":"Prerequisites","type":2,"isActive":false},{"label":"Install Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configure memory pool","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"What's next","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
      index 6b07f7c94..dfe8dee52 100644
      --- a/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
      +++ b/localization/v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
      @@ -59,8 +59,8 @@ title: Run Milvus with GPU Support Using Docker Compose
               >
             
           

      To install Milvus with GPU support using Docker Compose, follow these steps.

      -

      1. Download and configure the YAML file

      Download milvus-standalone-docker-compose-gpu.yml and save it as docker-compose.yml manually, or with the following command.

      -
      $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
      +

      1. Download and configure the YAML file

      Download milvus-standalone-docker-compose-gpu.yml and save it as docker-compose.yml manually, or with the following command.

      +
      $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
       

      You need to make some changes to the environment variables of the standalone service in the YAML file as follows:

        diff --git a/localization/v2.5.x/site/en/menuStructure/en.json b/localization/v2.5.x/site/en/menuStructure/en.json index 3b8a863a6..cf3a7f265 100644 --- a/localization/v2.5.x/site/en/menuStructure/en.json +++ b/localization/v2.5.x/site/en/menuStructure/en.json @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "Filtering", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "Filtering Explained", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "Basic Operators", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "Filtering Templating", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "JSON Operators", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "Array Operators", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "Full Text Search", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "Text Match", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "Search Iterators", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "Use Partition Key", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "Metadata Filtering", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "Reranking", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "Users, Privileges, and Roles", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "Enable RBAC", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "RBAC Explained", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "Create Users & Roles", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "Create Privilege Group", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "Grant Privileges", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "Grant Roles", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "Drop Users & Roles", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "Encryption in Transit", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Milvus Sizing Tool", "id": "sizing", diff --git a/localization/v2.5.x/site/en/release_notes.json b/localization/v2.5.x/site/en/release_notes.json index 64cb988b7..554ef0296 100644 --- a/localization/v2.5.x/site/en/release_notes.json +++ b/localization/v2.5.x/site/en/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Release Notes","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Release Notes","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/release_notes.md b/localization/v2.5.x/site/en/release_notes.md index e40fb615c..03ad1370d 100644 --- a/localization/v2.5.x/site/en/release_notes.md +++ b/localization/v2.5.x/site/en/release_notes.md @@ -19,7 +19,7 @@ title: Release Notes >

        Find out what’s new in Milvus! This page summarizes new features, improvements, known issues, and bug fixes in each release. You can find the release notes for each released version after v2.5.0 in this section. We suggest that you regularly visit this page to learn about updates.

        -

        v2.5.0-beta

        Release date: November 26, 2024

        +

        Release date: December 23, 2024

        - +
        Milvus versionPython SDK versionNode.js SDK versionJava SDK version
        2.5.0-beta2.5.02.5.02.5.0
        2.5.02.5.12.5.22.5.2
        -

        Milvus 2.5.0-beta brings significant advancements to enhance usability, scalability, and performance for users dealing with vector search and large-scale data management. With this release, Milvus integrates powerful new features like term-based search, clustering compaction for optimized queries, and versatile support for sparse and dense vector search methods. Enhancements in cluster management, indexing, and data handling introduce new levels of flexibility and ease of use, making Milvus an even more robust and user-friendly vector database.

        +

        Milvus 2.5.0 brings significant advancements to enhance usability, scalability, and performance for users dealing with vector search and large-scale data management. With this release, Milvus integrates powerful new features like term-based search, clustering compaction for optimized queries, and versatile support for sparse and dense vector search methods. Enhancements in cluster management, indexing, and data handling introduce new levels of flexibility and ease of use, making Milvus an even more robust and user-friendly vector database.

        Key Features

        Milvus 2.5 supports full text search implemented with Sparse-BM25! This feature is an important complement to Milvus’s strong semantic search capabilities, especially in scenarios involving rare words or technical terms. In previous versions, Milvus supported sparse vectors to assist with keyword search scenarios. These sparse vectors were generated outside of Milvus by neural models like SPLADEv2/BGE-M3 or statistical models such as the BM25 algorithm.

        Powered by Tantivy, Milvus 2.5 has built-in analyzers and sparse vector extraction, extending the API from only receiving vectors as input to directly accepting text. BM25 statistical information is updated in real time as data is inserted, enhancing usability and accuracy. Additionally, sparse vectors based on approximate nearest neighbor (ANN) algorithms offer more powerful performance than standard keyword search systems.

        For details, refer to Analyzer Overview and Full Text Search.

        @@ -81,3 +81,6 @@ title: Release Notes

        Expression Parsing Optimization

        Improved expression parsing by implementing caching for repeated expressions, upgrading ANTLR, and optimizing the performance of NOT IN clauses.

        Improved DDL Concurrency Performance

        Optimized the concurrency performance of Data Definition Language (DDL) operations.

        RESTful API Feature Alignment

        Aligned the functionalities of the RESTful API with other SDKs for consistency.

        +

        Security & Configuration Updates

        Supported TLS to secure inter-node communication in more complex or enterprise environments. For details, refer to Security Configuration.

        +

        Compaction Performance Enhancements

        Removed maximum segment limitations in mixed compaction and now prioritizes smaller segments first, improving efficiency and speeding up queries on large or fragmented datasets.

        +

        Score-Based Channel Balancing

        Introduced a policy that dynamically balances loads across channels, enhancing resource utilization and overall stability in large-scale deployments.

        diff --git a/localization/v2.5.x/site/en/userGuide/schema/string.md b/localization/v2.5.x/site/en/userGuide/schema/string.md index 1e81e2311..94049a3f1 100644 --- a/localization/v2.5.x/site/en/userGuide/schema/string.md +++ b/localization/v2.5.x/site/en/userGuide/schema/string.md @@ -4,7 +4,7 @@ title: String Field summary: >- In Milvus, VARCHAR is the data type used for storing string-type data, suitable for storing variable-length strings. It can store strings with both - single- and multi-byte characters, with a maximum length of up to 60,535 + single- and multi-byte characters, with a maximum length of up to 65,535 characters. When defining a VARCHAR field, you must also specify the maximum length parameter max_length. The VARCHAR string type offers an efficient and flexible way to store and manage text data, making it ideal for applications @@ -25,7 +25,7 @@ summary: >- d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

        In Milvus, VARCHAR is the data type used for storing string-type data, suitable for storing variable-length strings. It can store strings with both single- and multi-byte characters, with a maximum length of up to 60,535 characters. When defining a VARCHAR field, you must also specify the maximum length parameter max_length. The VARCHAR string type offers an efficient and flexible way to store and manage text data, making it ideal for applications that handle strings of varying lengths.​

        +

        In Milvus, VARCHAR is the data type used for storing string-type data, suitable for storing variable-length strings. It can store strings with both single- and multi-byte characters, with a maximum length of up to 65,535 characters. When defining a VARCHAR field, you must also specify the maximum length parameter max_length. The VARCHAR string type offers an efficient and flexible way to store and manage text data, making it ideal for applications that handle strings of varying lengths.​

        Add VARCHAR field​

        Milvus provides powerful operators to query array fields, allowing you to filter and retrieve entities based on the contents of arrays. ​

        +
        +

        All elements within an array must be the same type, and nested structures within arrays are treated as plain strings. Therefore, when working with ARRAY fields, it is advisable to avoid excessively deep nesting and ensure that your data structures are as flat as possible for optimal performance.​

        +
        +

        Available ARRAY Operators​

        The ARRAY operators allow for fine-grained querying of array fields in Milvus. These operators are:​

        + +

        ARRAY_CONTAINS​

        The ARRAY_CONTAINS operator checks if a specific element exists in an array field. It’s useful when you want to find entities where a given element is present in the array.​

        +

        Example

        +

        Suppose you have an array field history_temperatures, which contains the recorded lowest temperatures for different years. To find all entities where the array contains the value 23, you can use the following filter expression:​

        +
        filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
        +
        +
        +

        This will return all entities where the history_temperatures array contains the value 23.​

        +

        ARRAY_CONTAINS_ALL​

        The ARRAY_CONTAINS_ALL operator ensures that all elements of the specified list are present in the array field. This operator is useful when you want to match entities that contain multiple values in the array.​

        +

        Example

        +

        If you want to find all entities where the history_temperatures array contains both 23 and 24, you can use:​

        +
        filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
        +
        +
        +

        This will return all entities where the history_temperatures array contains both of the specified values.​

        +

        ARRAY_CONTAINS_ANY​

        The ARRAY_CONTAINS_ANY operator checks if any of the elements from the specified list are present in the array field. This is useful when you want to match entities that contain at least one of the specified values in the array.​

        +

        Example

        +

        To find all entities where the history_temperatures array contains either 23 or 24, you can use:​

        +
        filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
        +
        +
        +

        This will return all entities where the history_temperatures array contains at least one of the values 23 or 24.​

        +

        ARRAY_LENGTH​

        The ARRAY_LENGTH operator allows you to filter entities based on the number of elements in an array field. This is useful when you need to find entities with arrays of a certain length.​

        +

        Example

        +

        If you want to find all entities where the history_temperatures array has fewer than 10 elements, you can use:​

        +
        filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
        +
        +
        +

        This will return all entities where the history_temperatures array has fewer than 10 elements.​

        diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..578f596fc --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"Basic Operators​","href":"Basic-Operators​","type":1,"isActive":false},{"label":"Comparison operators​","href":"Comparison-operators​","type":2,"isActive":false},{"label":"Range operators​","href":"Range-operators​","type":2,"isActive":false},{"label":"Arithmetic Operators​","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"Logical Operators​","href":"Logical-Operators​","type":2,"isActive":false},{"label":"Tips on Using Basic Operators with JSON and ARRAY Fields​","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"Conclusion​","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..9d1cf639e --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,236 @@ +--- +id: basic-operators.md +summary: >- + Milvus provides a rich set of basic operators to help you filter and query + data efficiently. These operators allow you to refine your search conditions + based on scalar fields, numeric calculations, logical conditions, and more. + Understanding how to use these operators is crucial for building precise + queries and maximizing the efficiency of your searches.​ +title: Basic Operators +--- +

        Basic Operators​

        Milvus provides a rich set of basic operators to help you filter and query data efficiently. These operators allow you to refine your search conditions based on scalar fields, numeric calculations, logical conditions, and more. Understanding how to use these operators is crucial for building precise queries and maximizing the efficiency of your searches.​

        +

        Comparison operators​

        Comparison operators are used to filter data based on equality, inequality, or size. They are applicable to numeric, text, and date fields.​

        +

        Supported Comparison Operators:​

          +
        • == (Equal to)​

        • +
        • != (Not equal to)​

        • +
        • > (Greater than)​

        • +
        • < (Less than)​

        • +
        • >= (Greater than or equal to)​

        • +
        • <= (Less than or equal to)​

        • +
        +

        Example 1: Filtering with Equal To (==)​

        Assume you have a field named status and you want to find all entities where status is "active". You can use the equality operator ==:​

        +
        filter = 'status == "active"'​
        +
        +
        +

        Example 2: Filtering with Not Equal To (!=)​

        To find entities where status is not "inactive":​

        +
        filter = 'status != "inactive"'​
        +
        +
        +

        Example 3: Filtering with Greater Than (>)​

        If you want to find all entities with an age greater than 30:​

        +
        filter = 'age > 30'​
        +
        +
        +

        Example 4: Filtering with Less Than (<)​

        To find entities where price is less than 100:​

        +
        filter = 'price < 100'​
        +
        +
        +

        Example 5: Filtering with Greater Than or Equal To (>=)​

        If you want to find all entities with rating greater than or equal to 4:​

        +
        filter = 'rating >= 4'​
        +
        +
        +

        Example 6: Filtering with Less Than or Equal To (<=)​

        To find entities with discount less than or equal to 10%:​

        +
        filter = 'discount <= 10'​
        +
        +
        +

        Range operators​

        Range operators help filter data based on specific sets or ranges of values.​

        +

        Supported Range Operators:​

          +
        • IN: Used to match values within a specific set or range.​

        • +
        • LIKE: Used to match a pattern (mostly for text fields).​

        • +
        +

        Example 1: Using IN to Match Multiple Values​

        If you want to find all entities where the color is either "red", "green", or "blue":​

        +
        filter = 'color in ["red", "green", "blue"]'​
        +
        +
        +

        This is useful when you want to check for membership in a list of values.​

        +

        Example 2: Using LIKE for Pattern Matching​

        The LIKE operator is used for pattern matching in string fields. It can match substrings in different positions within the text: as a prefix, infix, or suffix. The LIKE operator uses the % symbol as a wildcard, which can match any number of characters (including zero).​

        +

        Prefix Match (Starts With)​

        To perform a prefix match, where the string starts with a given pattern, you can place the pattern at the beginning and use % to match any characters following it. For example, to find all products whose name starts with "Prod":​

        +
        filter = 'name LIKE "Prod%"'​
        +
        +
        +

        This will match any product whose name starts with "Prod", such as "Product A", "Product B", etc.​

        +

        Suffix Match (Ends With)​

        For a suffix match, where the string ends with a given pattern, place the % symbol at the beginning of the pattern. For example, to find all products whose name ends with "XYZ":​

        +
        filter = 'name LIKE "%XYZ"'​
        +
        +
        +

        This will match any product whose name ends with "XYZ", such as "ProductXYZ", "SampleXYZ", etc.​

        +

        Infix Match (Contains)​

        To perform an infix match, where the pattern can appear anywhere in the string, you can place the % symbol at both the beginning and the end of the pattern. For example, to find all products whose name contains the word "Pro":​

        +
        filter = 'name LIKE "%Pro%"'​
        +
        +
        +

        This will match any product whose name contains the substring "Pro", such as "Product", "ProLine", or "SuperPro".​

        +

        Arithmetic Operators​

        Arithmetic operators allow you to create conditions based on calculations involving numeric fields.​

        +

        Supported Arithmetic Operators:​

          +
        • + (Addition)​

        • +
        • - (Subtraction)​

        • +
        • * (Multiplication)​

        • +
        • / (Division)​

        • +
        • % (Modulus)​

        • +
        • ** (Exponentiation)​

        • +
        +

        Example 1: Using Addition (+)​

        To find entities where the total price is the sum of base_price and tax:​

        +
        filter = 'total == base_price + tax'​
        +
        +
        +

        Example 2: Using Subtraction (-)​

        To find entities where quantity is greater than 50 and quantity_sold is less than 30:​

        +
        filter = 'quantity - quantity_sold > 50'​
        +
        +
        +

        Example 3: Using Multiplication (*)​

        To find entities where price is greater than 100 and quantity is greater than 10, multiplied:​

        +
        filter = 'price * quantity > 1000'​
        +
        +
        +

        Example 4: Using Division (/)​

        To find products where total_price divided by quantity is less than 50:​

        +
        filter = 'total_price / quantity < 50'​
        +
        +
        +

        Example 5: Using Modulus (%)​

        To find entities where the id is an even number (i.e., divisible by 2):​

        +
        filter = 'id % 2 == 0'​
        +
        +
        +

        Example 6: Using Exponentiation (**)​

        To find entities where price raised to the power of 2 is greater than 1000:​

        +
        filter = 'price ** 2 > 1000'​
        +
        +
        +

        Logical Operators​

        Logical operators are used to combine multiple conditions into a more complex filter expression. These include AND, OR, and NOT.​

        +

        Supported Logical Operators:​

          +
        • AND: Combines multiple conditions that must all be true.​

        • +
        • OR: Combines conditions where at least one must be true.​

        • +
        • NOT: Negates a condition.​

        • +
        +

        Example 1: Using AND to Combine Conditions​

        To find all products where price is greater than 100 and stock is greater than 50:​

        +
        filter = 'price > 100 AND stock > 50'​
        +
        +
        +

        Example 2: Using OR to Combine Conditions​

        To find all products where color is either “red” or "blue":​

        +
        filter = 'color == "red" OR color == "blue"'​
        +
        +
        +

        Example 3: Using NOT to Exclude a Condition​

        To find all products where color is not "green":​

        +
        filter = 'NOT color == "green"'​
        +
        +
        +

        Tips on Using Basic Operators with JSON and ARRAY Fields​

        While the basic operators in Milvus are versatile and can be applied to scalar fields, they can also be effectively used with the keys and indexes in the JSON and ARRAY fields.​

        +

        For example, if you have a product field that contains multiple keys like price, model, and tags, always reference the key directly:​

        +
        filter = 'product["price"] > 1000'​
        +
        +
        +

        To find records where the first temperature in an array of recorded temperatures exceeds a certain value, use:​

        +
        filter = 'history_temperatures[0] > 30'​
        +
        +
        +

        Conclusion​

        Milvus offers a range of basic operators that give you flexibility in filtering and querying your data. By combining comparison, range, arithmetic, and logical operators, you can create powerful filter expressions to narrow down your search results and retrieve the data you need efficiently.​

        diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..bb64bd955 --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"Filtering Explained​","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"Basic operators​","href":"Basic-operators​","type":2,"isActive":false},{"label":"Filter expression templates​","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"Data type-specific operators​","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..c71a8e81a --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,146 @@ +--- +id: boolean.md +summary: >- + Milvus provides powerful filtering capabilities that enable precise querying + of your data. Filter expressions allow you to target specific scalar fields + and refine search results with different conditions. This guide explains how + to use filter expressions in Milvus, with examples focused on query + operations. You can also apply these filters in search and delete requests.​​ +title: Filtering Explained +--- +

        Filtering Explained​

        Milvus provides powerful filtering capabilities that enable precise querying of your data. Filter expressions allow you to target specific scalar fields and refine search results with different conditions. This guide explains how to use filter expressions in Milvus, with examples focused on query operations. You can also apply these filters in search and delete requests.​

        +

        Basic operators​

        Milvus supports several basic operators for filtering data:​

        +
          +
        • Comparison Operators: ==, !=, >, <, >=, and <= allow filtering based on numeric, text, or date fields.​

        • +
        • Range Filters: IN and LIKE help match specific value ranges or sets.​

        • +
        • Arithmetic Operators: +, -, *, /, %, and ** are used for calculations involving numeric fields.​

        • +
        • Logical Operators: AND, OR, and NOT combine multiple conditions into complex expressions.​

        • +
        +

        Example: Filtering by Color​

        To find entities with primary colors (red, green, or blue) in a scalar field color, use the following filter expression:​

        +
        filter='color in ["red", "green", "blue"]'​
        +
        +
        +

        Example: Filtering JSON Fields​

        Milvus allows referencing keys in JSON fields. For instance, if you have a JSON field product with keys price and model, and want to find products with a specific model and price lower than 1,850, use this filter expression:​

        +
        filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
        +
        +
        +

        Example: Filtering Array Fields​

        If you have an array field history_temperatures containing temperature records, and want to find observatories where the 10th recorded temperature exceeds 23°C, use this expression:​

        +
        filter='history_temperatures[10] > 23'​
        +
        +
        +

        For more information on these basic operators, refer to ​Basic Operators.​

        +

        Filter expression templates​

        When filtering using CJK characters, processing can be more complex due to their larger character sets and encoding differences. This can result in slower performance, especially with the IN operator.​

        +

        Milvus introduces filter expression templating to optimize performance when working with CJK characters. By separating dynamic values from the filter expression, the query engine handles parameter insertion more efficiently.​

        +

        Example​

        To find individuals over the age of 25 living in either “北京” (Beijing) or “上海” (Shanghai), use the following template expression:​

        +
        filter = "age > 25 AND city IN ['北京', '上海']"​
        +
        +
        +

        To improve performance, use this variation with parameters:​

        +
        filter = "age > {age} AND city in {city}",​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        This approach reduces parsing overhead and improves query speed. For more information, see ​Filter Templating.​

        +

        Data type-specific operators​

        Milvus provides advanced filtering operators for specific data types, such as JSON, ARRAY, and VARCHAR fields.​

        +

        JSON field-specific operators​

        Milvus offers advanced operators for querying JSON fields, enabling precise filtering within complex JSON structures:​

        +

        **JSON_CONTAINS(identifier, jsonExpr)**: Checks if a JSON expression exists in the field.​

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains(tags, "sale")'​
        +
        +
        +

        **JSON_CONTAINS_ALL(identifier, jsonExpr)**: Ensures all elements of the JSON expression are present.​

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        **JSON_CONTAINS_ANY(identifier, jsonExpr)**: Filters for entities where at least one element exists in the JSON expression.​

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        For more details on JSON operators, refer to ​JSON Operators.​

        +

        ARRAY field-specific operators​

        Milvus provides advanced filtering operators for array fields, such as ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY, and ARRAY_LENGTH, which allow fine-grained control over array data:​

        +

        **ARRAY_CONTAINS**: Filters entities containing a specific element.​

        +
        filter="ARRAY_CONTAINS(history_temperatures, 23)"​
        +
        +
        +

        **ARRAY_CONTAINS_ALL**: Filters entities where all elements in a list are present.​

        +
        filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_CONTAINS_ANY**: Filters entities containing any element from the list.​

        +
        filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_LENGTH**: Filters based on the length of the array.​

        +
        filter="ARRAY_LENGTH(history_temperatures) < 10"​
        +
        +
        +

        For more details on array operators, see ​ARRAY Operators.​

        +

        VARCHAR field-specific operators​

        The **Text_Match** operator allows precise document retrieval based on specific query terms. It is particularly useful for filtered searches that combine scalar filters with vector similarity searches. Unlike semantic searches, Text Match focuses on exact term occurrences.​

        +

        Milvus uses Tantivy to support inverted indexing and term-based text search. The process involves:​

        +
          +
        1. Analyzer: Tokenizes and processes input text.​

        2. +
        3. Indexing: Creates an inverted index mapping unique tokens to documents.​

        4. +
        +

        For more details, refer to ​Text Match.​

        diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..9e74e4c1a --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"Filter Templating​","href":"Filter-Templating​","type":1,"isActive":false},{"label":"Overview​","href":"Overview​","type":2,"isActive":false},{"label":"Search Operations​","href":"Search-Operations​","type":2,"isActive":false},{"label":"Query Operations​","href":"Query-Operations​","type":2,"isActive":false},{"label":"Delete Operations​","href":"Delete-Operations​","type":2,"isActive":false},{"label":"Conclusion​","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..f92cc3f1a --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,154 @@ +--- +id: filtering-templating.md +summary: >- + In Milvus, complex filter expressions with numerous elements, especially those + involving non-ASCII characters like CJK characters, can significantly affect + query performance. To address this, Milvus introduces a filter expression + templating mechanism designed to improve efficiency by reducing the time spent + parsing complex expressions. This page explains using filter expression + templating in search, query, and delete operations. +title: Filtering Templating +--- +

        Filter Templating​

        In Milvus, complex filter expressions with numerous elements, especially those involving non-ASCII characters like CJK characters, can significantly affect query performance. To address this, Milvus introduces a filter expression templating mechanism designed to improve efficiency by reducing the time spent parsing complex expressions. This page explains using filter expression templating in search, query, and delete operations.​

        +

        Overview​

        Filter expression templating allows you to create filter expressions with placeholders, which can be dynamically substituted with values during query execution. Using templating, you avoid embedding large arrays or complex expressions directly into the filter, reducing parsing time and improving query performance.​

        +

        Let’s say you have a filter expression involving two fields, age and city, and you want to find all people whose age is greater than 25 and who live in either “北京” (Beijing) or “上海” (Shanghai). Instead of directly embedding the values in the filter expression, you can use a template:​

        +
        filter = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        Here, {age} and {city} are placeholders that will be replaced with the actual values in filter_params when the query is executed.​

        +

        Using filter expression templating in Milvus has several key advantages:​

        +
          +
        • Reduced Parsing Time: By replacing large or complex filter expressions with placeholders, the system spends less time parsing and processing the filter.​

        • +
        • Improved Query Performance: With reduced parsing overhead, query performance improves, leading to higher QPS and faster response times.​

        • +
        • Scalability: As your datasets grow and filter expressions become more complex, templating ensures that performance remains efficient and scalable.​

        • +
        +

        Search Operations​

        For search operations in Milvus, the filter expression is used to define the filtering condition, and the filter_params parameter is used to specify the values for the placeholders. The filter_params dictionary contains the dynamic values that Milvus will use to substitute into the filter expression.​

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.search(​
        +    "hello_milvus",​
        +    vectors[:nq],​
        +    filter=expr,​
        +    limit=10,​
        +    output_fields=["age", "city"],​
        +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
        +    filter_params=filter_params,​
        +)​
        +
        +
        +

        In this example, Milvus will dynamically replace {age} with 25 and {city} with ["北京", "上海"] when executing the search.​

        +

        Query Operations​

        The same templating mechanism can be applied to query operations in Milvus. In the query function, you define the filter expression and use the filter_params to specify the values to substitute.​

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.query(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    output_fields=["age", "city"],​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        By using filter_params, Milvus efficiently handles the dynamic insertion of values, improving the speed of query execution.​

        +

        Delete Operations​

        You can also use filter expression templating in delete operations. Similar to search and query, the filter expression defines the conditions, and the filter_params provides the dynamic values for the placeholders.​

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.delete(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        This approach improves the performance of delete operations, especially when dealing with complex filter conditions.​

        +

        Conclusion​

        Filter expression templating is an essential tool for optimizing query performance in Milvus. By using placeholders and the filter_params dictionary, you can significantly reduce the time spent parsing complex filter expressions. This leads to faster query execution and better overall performance.​

        diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..9b5375e85 --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"JSON Operators​","href":"JSON-Operators​","type":1,"isActive":false},{"label":"Available JSON Operators​","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS​","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_CONTAINS_ALL​","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"JSON_COTAINS_ANY​","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..210172f5b --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,121 @@ +--- +id: json-operators.md +summary: >- + Milvus supports advanced operators for querying and filtering JSON fields, + making them perfect for managing complex, structured data. These operators + enable highly effective querying of JSON documents, allowing you to retrieve + entities based on specific elements, values, or conditions within the JSON + fields. This section will guide you through using JSON-specific operators in + Milvus, providing practical examples to illustrate their functionality.​ +title: JSON Operators +--- +

        JSON Operators​

        Milvus supports advanced operators for querying and filtering JSON fields, making them perfect for managing complex, structured data. These operators enable highly effective querying of JSON documents, allowing you to retrieve entities based on specific elements, values, or conditions within the JSON fields. This section will guide you through using JSON-specific operators in Milvus, providing practical examples to illustrate their functionality.​

        +
        +

        JSON fields cannot deal with complex, nested structures and treats all nested structures as plain strings. Therefore, when working with JSON fields, it is advisable to avoid excessively deep nesting and ensure that your data structures are as flat as possible for optimal performance.​

        +
        +

        Available JSON Operators​

        Milvus provides several powerful JSON operators that help filter and query JSON data, and these operators are:​

        + +

        Let’s explore these operators with examples to see how they can be applied in real-world scenarios.​

        +

        JSON_CONTAINS​

        The json_contains operator checks if a specific element or subarray exists within a JSON field. It’s useful when you want to ensure that a JSON array or object contains a particular value.​

        +

        Example

        +

        Imagine you have a collection of products, each with a tags field that contains a JSON array of strings, such as ["electronics", "sale", "new"]. You want to filter products that have the tag "sale".​

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains(tags, "sale")'​
        +
        +
        +

        In this example, Milvus will return all products where the tags field contains the element "sale".​

        +

        JSON_CONTAINS_ALL​

        The json_contains_all operator ensures that all elements of a specified JSON expression are present in the target field. It is particularly useful when you need to match multiple values within a JSON array.​

        +

        Example

        +

        Continuing with the product tags scenario, if you want to find all products that have the tags "electronics", "sale", and "new", you can use the json_contains_all operator.​

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        This query will return all products where the tags array contains all three specified elements: "electronics", "sale", and "new".​

        +

        JSON_COTAINS_ANY​

        The json_contains_any operator filters entities where at least one member of the JSON expression exists within the field. This is useful when you want to match entities based on any one of several possible values.​

        +

        Example

        +

        Let’s say you want to filter products that have at least one of the tags "electronics", "sale", or "new". You can use the json_contains_any operator to achieve this.​

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        In this case, Milvus will return all products that have at least one of the tags in the list ["electronics", "new", "clearance"]. Even if a product only has one of these tags, it will be included in the result.​

        diff --git a/localization/v2.5.x/site/en/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/en/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..0c86013f2 --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"Overview","href":"Overview","type":2,"isActive":false},{"label":"Home","href":"Home","type":2,"isActive":false},{"label":"Collections","href":"Collections","type":2,"isActive":false},{"label":"Query","href":"Query","type":2,"isActive":false},{"label":"Data","href":"Data","type":2,"isActive":false},{"label":"Tasks","href":"Tasks","type":2,"isActive":false},{"label":"Slow requests","href":"Slow-requests","type":2,"isActive":false},{"label":"Configurations","href":"Configurations","type":2,"isActive":false},{"label":"Tools","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/en/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/en/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..9c19dab6b --- /dev/null +++ b/localization/v2.5.x/site/en/userGuide/tools/milvus-webui.md @@ -0,0 +1,295 @@ +--- +id: milvus-webui.md +summary: >- + Milvus Web UI is a graphical management tool for Milvus. It enhances system + observability with a simple and intuitive interface. You can +title: Milvus WebUI +--- +

        Milvus WebUI

        Milvus Web UI is a graphical management tool for Milvus. It enhances system observability with a simple and intuitive interface. You can use Milvus Web UI to observe the statistics and metrics of the components and dependencies of Milvus, check database and collection details, and list detailed Milvus configurations.

        +

        Overview

        Milvus Web UI differs from Birdwatcher and Attu in that it is a built-in tool to provide overall system observability with a simple and intuitive interface.

        +

        The following table compares the features of Milvus Web UI and Birdwatcher/Attu:

        + + + + + + + + + + + +
        FeatureMilvus Web UIBirdwatcherAttu
        Operational formGUICLIGUI
        Target usersMaintainers, developersMaintainersDevelopers
        InstallationBuilt-inStandalone toolStandalone tool
        DependenciesMilvusMilvus / etcdMilvus
        Primary FunctionalitiesRuntime environment, database/collection details, segments, channles, tasks, and slow query requestsMetadata inspection and Milvus API executionDatabase management and operational tasks
        +

        Milvus Web UI provides the following features:

        +

        + + Milvus Web UI overview + Milvus Web UI overview + +

        +
          +
        • Home

          +

          You can find information about the current running Milvus instance, its components, connected clients, and dependencies.

        • +
        • Collections

          +

          You can view the list of databases and collections currently in Milvus and check their details.

        • +
        • Query

          +

          You can view the collected statistics of the query nodes and query coordinators in terms of segments, channels, replicas, and resource groups.

        • +
        • Data

          +

          You can view the collected statistics of the data nodes in terms of segments and channels.

        • +
        • Tasks

          +

          You can view the list of tasks running in Milvus, including Querycoord scheduler tasks, compaction tasks, index-building tasks, import tasks, and data synchronization tasks.

        • +
        • Slow requests

          +

          You can view the list of slow requests in Milvus, including the request type, request duration, and request parameters.

        • +
        • Configurations

          +

          You can view the list of Milvus configurations and their values.

        • +
        • Tools

          +

          You can access the two built-in tools, pprof and Milvus data visualzation tool, from the Web UI.

        • +
        +

        Home

        On the Home page, you can find the following information:

        +

        + + Milvus Web UI Home + Milvus Web UI Home + +

        +
          +
        • System information: View system information, including information about the deployment mode, image used in the deployment, and related information.

        • +
        • Component Information: View the status and metrics of the components in Milvus, including the status and metrics of the query nodes, data nodes, index nodes, coordinators, and proxies.

        • +
        • Connected clients: View the connected clients and their information, including the SDK type and version, user name, and their access history.

        • +
        • System dependencies: View the status and metrics of the dependencies of Milvus, including the status and metrics of the meta store, message queue, and object storage.

        • +
        +

        Collections

        On the Collections page, you can view the list of databases and collections currently in Milvus and check their details.

        +

        + + Milvus Web UI Collections + Milvus Web UI Collections + +

        +
          +
        • Database: View the list of databases currently in Milvus and their details.

        • +
        • Collection: View the list of collections in each database and their details.

        • +
        +

        Query

        + + Milvus Web UI Query Page + Milvus Web UI Query Page + +

        +
          +
        • Segments: View the list of segments and their details, including the segment ID, corresponding collection, state, size, etc.

          +

          In the From column, you can find the source of the segment. Possible sources indicators are as follows:

          +
            +
          • QN: Query node

          • +
          • CT: Current target in QueryCoord

          • +
          • NT: Next target in QueryCoord

          • +
          • DIST: Distribution in QueryCoord

          • +
        • +
        • Channels: View the list of channels and their details, including the channel name, corresponding collections, etc.

          +

          In the From column, you can find the source of the segment. Possible sources indicators are as follows:

          +
            +
          • QN: Query node

          • +
          • CT: Current target in QueryCoord

          • +
          • NT: Next target in QueryCoord

          • +
          • DIST: Distribution in QueryCoord

          • +
        • +
        • Replicas: View the list of replicas and their details, including the replica ID, corresponding collection, etc.

        • +
        • Resource groups: View the list of resource groups and their details, including the resource group name, number of query nodes in the group, and its configurations, etc.

        • +
        +

        Data

        + + Milvus Web UI Data Page + Milvus Web UI Data Page + +

        +
          +
        • Segments: View the list of segments from the data nodes/coordinators and their details, including the segment ID, corresponding collection, state, size, etc.

        • +
        • Channels: View the list of channels from the data nodes/coordinators and their details, including the channel name, corresponding collections, etc.

        • +
        +

        Tasks

        + + Milvus Web UI Tasks Page + Milvus Web UI Tasks Page + +

        +
          +
        • Tasks: View the list of tasks running in Milvus, including the task type, state, and actions.

          +
            +
          • QueryCoord Tasks: View all QueryCoord scheduler tasks, including balancer, index/segment/channel/leader checkers in the last 15 minutes.

          • +
          • Compaction Tasks: View all compaction tasks from the data coordinators in the last 15 minutes.

          • +
          • Index-Building Tasks: View all index-building tasks from the data coordinators in the last 30 minutes.

          • +
          • Import Tasks: View all import tasks from the data coordinators in the last 30 minutes.

          • +
          • Data Synchronization Tasks: View all data synchronization tasks from the data nodes in the last 15 minutes.

          • +
        • +
        +

        Slow requests

        + + Milvus Web UI Slow Requests Page + Milvus Web UI Slow Requests Page + +

        +
          +
        • Slow requests: A slow request is a search or a query that has a latency longer than the value of proxy.slowQuerySpanInSeconds specified in the configuration. The list of slow requests displays all slow requests in the last 15 minutes.
        • +
        +

        Configurations

        + + Milvus Web UI Configurations Page + Milvus Web UI Configurations Page + +

        +
          +
        • Configurations: View the list of Milvus runtime configurations and their values.
        • +
        +

        Tools

          +
        • pprof: Access the pprof tool for profiling and debugging Milvus.

        • +
        • Milvus data visualization tool: Access the Milvus data visualization tool for visualizing the data in Milvus.

        • +
        diff --git a/localization/v2.5.x/site/es/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/es/adminGuide/config_jaeger_tracing.md index 65d78e4ec..7991d9e13 100644 --- a/localization/v2.5.x/site/es/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/es/adminGuide/config_jaeger_tracing.md @@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
      -

      2. Despliegue de Jager

      La forma más sencilla de crear una instancia de Jaeger es crear un archivo YAML como el siguiente ejemplo. Esto instalará la estrategia AllInOne predeterminada, que despliega la imagen todo en uno (que combina jaeger-agent, jaeger-collector, jaeger-query y Jaeger UI) en un único pod, utilizando almacenamiento en memoria de forma predeterminada.

      +

      2. Despliegue de Jaeger

      La forma más sencilla de crear una instancia de Jaeger es crear un archivo YAML como el siguiente ejemplo. Esto instalará la estrategia AllInOne predeterminada, que despliega la imagen todo en uno (que combina jaeger-agent, jaeger-collector, jaeger-query y Jaeger UI) en un único pod, utilizando almacenamiento en memoria de forma predeterminada.

      Si desea almacenar trazas durante mucho tiempo, consulte production-strategy.

      apiVersion: jaegertracing.io/v1
       kind: Jaeger
      @@ -136,7 +136,7 @@ $ helm upgrade --install -f values.yaml my-release milvus/milvus
       NAME           CLASS    HOSTS   ADDRESS         PORTS   AGE
       jaeger-query   <none>   *       192.168.122.34  80      14m
       
      -

      Una vez que la entrada está disponible, puede acceder a la interfaz de usuario de Jaeger navegando a http://${ADDRESS}. Reemplace ${ADDRESS} con la dirección IP real del ingress.

      +

      Una vez que el ingress está disponible, puede acceder a la UI de Jaeger navegando a http://${ADDRESS}. Reemplace ${ADDRESS} con la dirección IP real del ingress.

      La siguiente captura de pantalla muestra la UI de Jaeger con las trazas de Milvus durante una operación de búsqueda y una operación de recogida de carga:

      diff --git a/localization/v2.5.x/site/es/adminGuide/configure-docker.json b/localization/v2.5.x/site/es/adminGuide/configure-docker.json index 250d55d90..a4ea04828 100644 --- a/localization/v2.5.x/site/es/adminGuide/configure-docker.json +++ b/localization/v2.5.x/site/es/adminGuide/configure-docker.json @@ -1 +1 @@ -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n standalone:\n container_name: milvus-standalone\n image: milvusdb/milvus:v2.2.13\n command: [\"milvus\", \"run\", \"standalone\"]\n environment:\n ETCD_ENDPOINTS: etcd:2379\n MINIO_ADDRESS: minio:9000\n volumes:\n - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml # Map the local path to the container path\n - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n ports:\n - \"19530:19530\"\n - \"9091:9091\"\n depends_on:\n - \"etcd\"\n - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurar Milvus con Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Descargar un archivo de configuración","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modifique el archivo de configuración","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Descargar un archivo de instalación","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modifique el archivo de instalación","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Iniciar Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"A continuación","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n standalone:\n container_name: milvus-standalone\n image: milvusdb/milvus:v2.2.13\n command: [\"milvus\", \"run\", \"standalone\"]\n environment:\n ETCD_ENDPOINTS: etcd:2379\n MINIO_ADDRESS: minio:9000\n volumes:\n - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml # Map the local path to the container path\n - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n ports:\n - \"19530:19530\"\n - \"9091:9091\"\n depends_on:\n - \"etcd\"\n - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurar Milvus con Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Descargar un archivo de configuración","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modifique el archivo de configuración","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Descargar un archivo de instalación","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modifique el archivo de instalación","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Iniciar Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"A continuación","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/configure-docker.md b/localization/v2.5.x/site/es/adminGuide/configure-docker.md index a339e6d60..8079822fa 100644 --- a/localization/v2.5.x/site/es/adminGuide/configure-docker.md +++ b/localization/v2.5.x/site/es/adminGuide/configure-docker.md @@ -38,8 +38,8 @@ En la versión actual, todos los parámetros tienen efecto sólo después de rei d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

      Descargue milvus.yaml directamente o con el siguiente comando.

      -
      $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
      +    

      Descargue milvus.yaml directamente o con el siguiente comando.

      +
      $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
       

      Modifique el archivo de configuración

      Descargue el archivo de instalación de Milvus standalone y guárdelo como docker-compose.yml.

      +

      Descargue el archivo de instalación de Milvus standalone y guárdelo como docker-compose.yml.

      También puede ejecutar el siguiente comando.

      # For Milvus standalone
      -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
      +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
       

      Modifique el archivo de instalación

      Para garantizar la seguridad de los datos, se recomienda dar de baja a los usuarios y funciones que ya no se utilicen. En esta guía se explica cómo eliminar usuarios y funciones.

      +

      Eliminar un usuario

      El siguiente ejemplo muestra cómo eliminar el usuario user_1.

      +
      +

      El usuario root no puede eliminarse.

      +
      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +# create a user​
      +client.drop_user(user_name="user_1")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig​
      +import io.milvus.v2.client.MilvusClientV2​
      +import io.milvus.v2.service.rbac.request.DropUserReq​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +        .uri("http://localhost:19530")​
      +        .token("root:Milvus")​
      +        .build();​
      +        ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +DropUserReq dropUserReq = DropUserReq.builder()​
      +        .userName("user_1")​
      +        .build();​
      +client.dropUser(dropUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +milvusClient.deleteUser({​
      +    username: 'user_1'​
      +})​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1"​
      +}'​
      +
      +
      +

      Una vez eliminado el usuario, puedes listar todos los usuarios existentes para comprobar si la operación de eliminación se ha realizado correctamente.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_users()​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.listUsersReq​
      +​
      +List<String> resp = client.listUsers();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.listUsers()​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      A continuación se muestra un ejemplo. No hay ningún user_1 en la lista. La operación de eliminación se ha realizado correctamente.

      +
      ['root']​
      +
      +
      +

      Eliminar un rol

      El siguiente ejemplo muestra cómo eliminar el rol role_a.

      +
      +

      El rol incorporado admin no puede ser eliminado.

      +
      + +
      from pymilvus import MilvusClient​
      +​
      +client.drop_role(role_name="role_a")​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.DropRoleReq​
      +​
      +DropRoleReq dropRoleReq = DropRoleReq.builder()​
      +        .roleName("role_a")​
      +        .build();​
      +client.dropRole(dropRoleReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.dropRole({​
      +   roleName: 'role_a',​
      + })​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      +

      Una vez eliminado el rol, puedes listar todos los roles existentes para comprobar si la operación de eliminación se ha realizado correctamente.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_roles()​
      +
      +
      +
      List<String> resp = client.listRoles();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.listRoles(​
      +    includeUserInfo: True​
      +)​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      A continuación se muestra un ejemplo. No hay ningún role_a en la lista. La operación de eliminación se ha realizado correctamente.

      +
      ['admin']​
      +
      +
      diff --git a/localization/v2.5.x/site/es/adminGuide/grant_privileges.json b/localization/v2.5.x/site/es/adminGuide/grant_privileges.json new file mode 100644 index 000000000..24dc69aaf --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"Conceder privilegios o grupos de privilegios a roles","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"Conceder un privilegio o un grupo de privilegios a un rol","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"Describir un rol","href":"Describe-a-role","type":2,"isActive":false},{"label":"Revocar un privilegio o un grupo de privilegios de un rol","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/grant_privileges.md b/localization/v2.5.x/site/es/adminGuide/grant_privileges.md new file mode 100644 index 000000000..9009a13de --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/grant_privileges.md @@ -0,0 +1,542 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: >- + Una vez creado un rol, puede concederle privilegios. En esta guía se explica + cómo conceder privilegios o grupos de privilegios a un rol. +title: Conceder privilegios o grupos de privilegios a roles +--- +

      Conceder privilegios o grupos de privilegios a roles

      Una vez creado un rol, puede concederle privilegios. Esta guía explica cómo conceder privilegios o grupos de privilegios a un rol.

      +

      Conceder un privilegio o un grupo de privilegios a un rol

      Milvus 2.5 introduce una nueva versión de la API que agiliza la operación de concesión. Ya no es necesario buscar el tipo de objeto cuando se concede un privilegio a un rol. A continuación se indican los parámetros y las explicaciones correspondientes.

      +
        +
      • role_name: El nombre del rol de destino al que deben concederse privilegios o grupos de privilegios.

      • +
      • Recurso: El recurso de destino de un privilegio, que puede ser una instancia, base de datos o colección específica. La siguiente tabla explica cómo especificar el recurso en el método client.grantV2().

      • +
      +

      Nivel

      +

      Recurso

      +

      Método de concesión

      +

      Notas

      +

      Colección

      +

      +

      Una colección específica

      +

      +

      client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

      +

      Introduzca el nombre de la colección de destino y el nombre de la base de datos a la que pertenece la colección de destino.

      +

      +

      Todas las colecciones bajo una base de datos específica

      +

      client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

      +

      Introduzca el nombre de la base de datos de destino y un comodín `*` como nombre de la colección.

      +

      **Base de datos

      +

      Una base de datos específica

      +

      client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

      +

      Introduzca el nombre de la base de datos de destino y un comodín `*` como nombre de la colección.

      +

      +

      Todas las bases de datos de la instancia actual

      +

      client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

      +

      Introduzca `*` como nombre de la base de datos y `*` como nombre de la colección.

      +

      **Instancia**

      +

      La instancia actual

      +

      client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

      +

      Introduzca `*` como nombre de la base de datos y `*` como nombre de la colección.

      +
      +
        +
      • Privilegio: El privilegio específico o grupo de privilegios que necesita otorgar a un rol. Actualmente, Milvus proporciona 56 tipos de privilegios que puede conceder. La siguiente tabla enumera los privilegios en Milvus.

        +

        +

        La columna de tipo en la tabla de abajo es de usuario para facilitar su búsqueda rápida de privilegios y se utiliza sólo con fines de clasificación. Cuando conceda privilegios, no necesita entender los tipos. Sólo tiene que introducir los privilegios correspondientes.

        +

      • +
      +

      **Tipo

      +

      **Privilegio

      +

      **Descripción

      +

      **Descripción de la API correspondiente en el lado del cliente.

      +

      Privilegios de base de datos

      +

      ListDatabases

      +

      Ver todas las bases de datos de la instancia actual

      +

      [Lista de bases de datos](https://milvus.io/docs/manage_databases.md)

      +

      DescribirBaseDeDatos

      +

      Ver los detalles de una base de datos

      +

      [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

      +

      CrearBaseDeDatos

      +

      Crear una base de datos

      +

      [Crear base de datos](https://milvus.io/docs/manage_databases.md)

      +

      SoltarBaseDeDatos

      +

      Eliminar una base de datos

      +

      [DropDatabase](https://milvus.io/docs/manage_databases.md)

      +

      AlterDatabase

      +

      Modificar las propiedades de una base de datos

      +

      [AlterDatabase](https://milvus.io/docs/manage_databases.md)

      +

      Privilegios de recopilación

      +

      +

      GetFlushState

      +

      Comprobar el estado de la operación de vaciado de colecciones

      +

      [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

      +

      GetLoadState

      +

      Comprueba el estado de carga de una colección

      +

      [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

      +

      GetLoadingProgress

      +

      Comprueba el progreso de carga de una colección

      +

      [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

      +

      MostrarColecciones

      +

      Ver todas las colecciones con privilegios de colección

      +

      [Mostrar colecciones](https://milvus.io/docs/view-collections.md)

      +

      ListAliases

      +

      Ver todos los alias de una colección

      +

      [Lista de alias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

      +

      DescribirColección

      +

      Ver los detalles de una colección

      +

      [DescribirColección](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

      +

      DescribirAlias

      +

      Ver los detalles de un alias

      +

      [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

      +

      ObtenerEstadísticas

      +

      Obtener las estadísticas de una colección (por ejemplo, el número de entidades de una colección)

      +

      [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

      +

      CrearColección

      +

      Crear una colección

      +

      [CrearColección](https://milvus.io/docs/create-collection.md)

      +

      SoltarColección

      +

      Soltar una colección

      +

      [Soltar colección](https://milvus.io/docs/drop-collection.md)

      +

      Cargar

      +

      Cargar una colección

      +

      [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

      +

      Liberar

      +

      Liberar una colección

      +

      [LiberarColección](https://milvus.io/docs/load-and-release.md)

      +

      Tirar de la cadena

      +

      +

      Persiste todas las entidades de una colección en un segmento sellado. Cualquier entidad insertada después de la operación de vaciado se almacenará en un nuevo segmento.

      +

      [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

      +

      Compactación

      +

      Activación manual de la compactación

      +

      [Compactar](https://milvus.io/docs/v2.0.x/compact_data.md)

      +

      RenombrarColección

      +

      Renombrar una colección

      +

      [RenombrarColección](https://milvus.io/docs/modify-collection.md)

      +

      CrearAlias

      +

      Crear un alias para una colección

      +

      [Crear alias](https://milvus.io/docs/manage-aliases.md)

      +

      SoltarAlias

      +

      Eliminar el alias de una colección

      +

      [Soltar alias](https://milvus.io/docs/manage-aliases.md)

      +

      VaciarTodas

      +

      Vaciar todas las colecciones de una base de datos

      +

      [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

      +

      Privilegios de partición

      +

      TienePartición

      +

      Comprobar si existe una partición

      +

      [TienePartición](https://milvus.io/docs/manage-partitions.md)

      +

      MostrarParticiones

      +

      Ver todas las particiones de una colección

      +

      [MostrarParticiones](https://milvus.io/docs/manage-partitions.md)

      +

      CrearPartición

      +

      Crear una partición

      +

      [CrearPartición](https://milvus.io/docs/manage-partitions.md)

      +

      SoltarPartición

      +

      Soltar una partición

      +

      [DropPartition](https://milvus.io/docs/manage-partitions.md)

      +

      Privilegios de índice

      +

      Detalle del índice

      +

      Ver los detalles de un índice

      +

      +

      [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

      +

      CrearÍndice

      +

      Crear un índice

      +

      [Crear índice](https://milvus.io/docs/index-vector-fields.md?tab=floating)

      +

      Soltar índice [DropIndex]()

      +

      Elimina un índice

      +

      [Soltar índice](https://milvus.io/docs/index-vector-fields.md?tab=floating)

      +

      Privilegios de gestión de recursos

      +

      +

      Equilibrio de carga

      +

      Lograr el equilibrio de carga

      +

      [LoadBalance](https://milvus.io/docs/resource_group.md)

      +

      CrearGrupoDeRecursos

      +

      Crear un grupo de recursos

      +

      [CrearGrupoDeRecursos](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

      +

      SoltarGrupoDeRecursos

      +

      Eliminar un grupo de recursos

      +

      [SoltarGrupoDeRecursos](https://milvus.io/docs/resource_group.md)

      +

      ActualizarGrupoDeRecursos

      +

      Actualizar un grupo de recursos

      +

      [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

      +

      DescribirGrupoDeRecursos

      +

      Ver los detalles de un grupo de recursos

      +

      [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

      +

      ListResourceGroups

      +

      Ver todos los grupos de recursos de la instancia actual

      +

      [ListResourceGroups](https://milvus.io/docs/resource_group.md)

      +

      TransferNode

      +

      Transferir nodos entre grupos de recursos

      +

      [TransferNode](https://milvus.io/docs/resource_group.md)

      +

      TransferReplica

      +

      Transferir réplicas entre grupos de recursos

      +

      [TransferReplica](https://milvus.io/docs/resource_group.md)

      +

      CopiaRBAC

      +

      Crear una copia de seguridad de todas las operaciones relacionadas con RBAC en la instancia actual

      +

      BackupRBAC

      +

      RestaurarRBAC

      +

      Restaurar una copia de seguridad de todas las operaciones relacionadas con RBAC en la instancia actual

      +

      RestaurarRBAC

      +

      Privilegios de entidad

      +

      +

      Consultar

      +

      Realizar una consulta

      +

      [Consulta](https://milvus.io/docs/get-and-scalar-query.md)

      +

      Búsqueda

      +

      Realizar una búsqueda

      +

      [Búsqueda](https://milvus.io/docs/single-vector-search.md)

      +

      Insertar

      +

      Insertar entidades

      +

      [Insertar](https://milvus.io/docs/insert-update-delete.md)

      +

      Borrar

      +

      Borrar entidades

      +

      [Borrar](https://milvus.io/docs/delete-entities.md)

      +

      Subir

      +

      Insertar entidades

      +

      [Insertar](https://milvus.io/docs/upsert-entities.md)

      +

      Importar

      +

      Insertar o importar entidades en bloque

      +

      [BulkInsert/Import](https://milvus.io/docs/import-data.md)

      +

      Privilegios RBAC

      +

      CrearPropiedad

      +

      Crear un usuario o un rol

      +

      [CrearUsuario/CrearRol](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

      +

      ActualizarUsuario

      +

      Actualizar la contraseña de un usuario

      +

      [Actualizar credencial](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

      +

      EliminarPropiedad

      +

      Dar de baja la contraseña de un usuario o un rol

      +

      [BorrarCredencial/SuprimirRol](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

      +

      SeleccionarPropiedad

      +

      Ver todos los usuarios a los que se ha concedido una función específica

      +

      [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

      +

      GestionarPropiedad

      +

      Gestionar un usuario o un rol o conceder un rol a un usuario

      +

      [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

      +

      SeleccionarUsuario

      +

      Ver todos los roles concedidos a un usuario

      +

      [SeleccionarUsuario](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

      +

      CrearGrupoDePrivilegios

      +

      Crear un grupo de privilegios

      +

      [Crear grupo de privilegios](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +

      DeshacerGrupoDePrivilegios

      +

      Eliminar un grupo de privilegios

      +

      [Grupo de privilegios](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +

      ListarGrupoDePrivilegios

      +

      Ver todos los grupos de privilegios de la instancia actual

      +

      [Lista de grupos de privilegios](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +

      OperarGrupoDePrivilegios

      +

      Añadir o eliminar privilegios de un grupo de privilegios

      +

      [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +
      +

      El siguiente ejemplo demuestra cómo conceder el privilegio PrivilegeSearch en collection_01 bajo la base de datos por defecto, así como un grupo de privilegios llamado privilege_group_1 al rol role_a.

      + +
      from pymilvus import MilvusClient
      +
      +client = MilvusClient(
      +    uri="http://localhost:19530",
      +    token="root:Milvus"
      +)
      +
      +client.grant_privilege_v2(
      +    role_name="role_a",
      +    privilege="Search"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +    
      +client.grant_privilege_v2(
      +    role_name="role_a",
      +    privilege="privilege_group_1"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +
      +client.grant_privilege_v2(
      +    role_name="role_a",
      +    privilege="ClusterReadOnly"
      +    collection_name='*'
      +    db_name='*',
      +)
      +
      +
      import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
      +
      +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("Search")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("privilege_group_1")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("ClusterReadOnly")
      +        .collectionName("*")
      +        .dbName("*")
      +        .build());
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"
      +
      +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
      +
      +const address = "http://localhost:19530";
      +const token = "root:Milvus";
      +const client = new MilvusClient({address, token});
      +
      +await milvusClient.grantPrivilege({
      +   roleName: 'role_a',
      +   object: 'Collection', 
      +   objectName: 'collection_01',
      +   privilegeName: 'Search'
      + });
      +
      +
      curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "Search",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "privilege_group_1",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "ClusterReadOnly",
      +    "collectionName": "*",
      +    "dbName":"*"
      +}'
      +
      +

      Describir un rol

      El siguiente ejemplo muestra cómo ver los privilegios otorgados al rol role_a utilizando el método describe_role.

      + +
      from pymilvus import MilvusClient
      +
      +client.describe_role(role_name="role_a")
      +
      +
      import io.milvus.v2.service.rbac.response.DescribeRoleResp;
      +import io.milvus.v2.service.rbac.request.DescribeRoleReq
      +
      +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
      +        .roleName("role_a")
      +        .build();
      +DescribeRoleResp resp = client.describeRole(describeRoleReq);
      +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"
      +
      +client.ListRoles(context.Background())
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
      +
      +await milvusClient.describeRole({roleName: 'role_a'});
      +
      +
      curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a"
      +}'
      +
      +

      A continuación se muestra un ejemplo de salida.

      +
      {
      +     "role": "role_a",
      +     "privileges": [
      +         {
      +             "collection_name": "collection_01",
      +             "db_name": "default",
      +             "role_name": "role_a",
      +             "privilege": "Search",
      +             "grantor_name": "root"
      +         },
      +         "privilege_group_1"
      +     ]
      +}
      +
      +

      Revocar un privilegio o un grupo de privilegios de un rol

      El siguiente ejemplo demuestra cómo revocar el privilegio PrivilegeSearch en collection_01 bajo la base de datos por defecto así como el grupo de privilegios privilege_group_1 que han sido concedidos al rol role_a.

      + +
      from pymilvus import MilvusClient
      +
      +client = MilvusClient(
      +    uri="http://localhost:19530",
      +    token="root:Milvus"
      +)
      +
      +client.revoke_privilege_v2(
      +    role_name="role_a",
      +    privilege="Search"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +    
      +client.revoke_privilege_v2(
      +    role_name="role_a",
      +    privilege="privilege_group_1"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +
      +client.revoke_privilege_v2(
      +    role_name="role_a",
      +    privilege="ClusterReadOnly"
      +    collection_name='*'
      +    db_name='*',
      +)
      +
      +
      import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
      +
      +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("Search")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("privilege_group_1")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("ClusterReadOnly")
      +        .collectionName("*")
      +        .dbName("*")
      +        .build());
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"
      +
      +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
      +
      +
      curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "Search",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "Search",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "ClusterReadOnly",
      +    "collectionName": "*",
      +    "dbName":"*"
      +}'
      +
      diff --git a/localization/v2.5.x/site/es/adminGuide/grant_roles.json b/localization/v2.5.x/site/es/adminGuide/grant_roles.json new file mode 100644 index 000000000..9e15550d7 --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"Conceder funciones a los usuarios","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"Conceder un rol a un usuario","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"Describir usuario","href":"Describe-user​","type":2,"isActive":false},{"label":"Revocar un rol","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/grant_roles.md b/localization/v2.5.x/site/es/adminGuide/grant_roles.md new file mode 100644 index 000000000..16f556bed --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/grant_roles.md @@ -0,0 +1,204 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + Después de crear un rol y conceder privilegios al rol, puede conceder el rol a + los usuarios para que éstos puedan acceder a los recursos y realizar las + acciones definidas por el rol. Se pueden asignar varios roles a un usuario o + asignar un rol a varios usuarios. En esta guía se explica cómo asignar + funciones a los usuarios. +title: Conceder funciones a los usuarios +--- +

      Conceder funciones a los usuarios

      Después de crear una función y conceder privilegios a la función, puede conceder la función a los usuarios para que éstos puedan acceder a los recursos y realizar las acciones definidas por la función. Se pueden asignar varios roles a un usuario o asignar un rol a varios usuarios. Esta guía presenta cómo otorgar roles a los usuarios.

      +

      Al usuario incorporado root en Milvus ya se le ha otorgado el rol admin, que tiene todos los privilegios. No necesita asignarle ningún otro rol.

      +

      Conceder un rol a un usuario

      El siguiente ejemplo muestra cómo asignar el rol role_a al usuario user_1.

      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +client.grant_role(user_name="user_1", role_name="role_a")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig;​
      +import io.milvus.v2.client.MilvusClientV2;​
      +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
      +​
      +String CLUSTER_ENDPOINT = "http://localhost:19530";​
      +String TOKEN = "root:Milvus";​
      +​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +    .uri(CLUSTER_ENDPOINT)​
      +    .token(TOKEN)​
      +    .build();​
      +    ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
      +        .roleName("role_a")​
      +        .userName("user_1")​
      +        .build();​
      +client.grantRole(grantRoleReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +milvusClient.grantRole({​
      +   username: 'user_1',​
      +   roleName: 'role_a'​
      + })​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a",​
      +    "userName": "user_1"​
      +}'​
      +
      +
      +

      Describir usuario

      Una vez que hayas otorgado un rol a un usuario, puedes comprobar si la operación de otorgamiento se ha realizado correctamente a través del método describe_user().

      +

      El siguiente ejemplo muestra cómo comprobar los roles del usuario user_1.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.describe_user(user_name="user_1")​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.DescribeUserReq;​
      +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
      +​
      +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
      +        .userName("user_1")​
      +        .build();​
      +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.describeUser({username: 'user_1'})​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1"​
      +}'​
      +
      +
      +

      A continuación se muestra un ejemplo.

      +
      {'user_name': 'user_1', 'roles': 'role_a'}​
      +
      +
      +

      Revocar un rol

      También puede revocar un rol asignado a un usuario.

      +

      El siguiente ejemplo muestra cómo revocar el rol role_a asignado al usuario user_1.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.revoke_role(​
      +    user_name='user_1',​
      +    role_name='role_a'​
      +)​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
      +​
      +client.revokeRole(RevokeRoleReq.builder()​
      +        .userName("user_1")​
      +        .roleName("role_a")​
      +        .build());​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1",​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      diff --git a/localization/v2.5.x/site/es/adminGuide/privilege_group.json b/localization/v2.5.x/site/es/adminGuide/privilege_group.json new file mode 100644 index 000000000..a90b29c70 --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"Crear grupo de privilegios","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"Grupo de privilegios frente a privilegios","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"Grupos de privilegios incorporados","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"Procedimientos","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/privilege_group.md b/localization/v2.5.x/site/es/adminGuide/privilege_group.md new file mode 100644 index 000000000..724289d1e --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/privilege_group.md @@ -0,0 +1,491 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: >- + Para agilizar el proceso de concesión de privilegios, se recomienda combinar + varios privilegios en un grupo de privilegios. +title: Crear grupo de privilegios +--- +

      Crear grupo de privilegios

      Para agilizar el proceso de concesión de privilegios, se recomienda combinar varios privilegios en un grupo de privilegios.

      +

      Grupo de privilegios frente a privilegios

      Un grupo de privilegios está formado por varios privilegios.

      +

      + + Privilege group illustrated + Ilustración de un grupo de privilegios

      +

      Como se muestra en la figura anterior, supongamos que necesita conceder tres privilegios diferentes a un rol.

      +
        +
      • Si no utiliza un grupo de privilegios, tendrá que conceder los privilegios tres veces.

      • +
      • Si utiliza un grupo de privilegios, sólo tiene que crear un grupo de privilegios y añadir los tres privilegios a este grupo de privilegios y conceder el grupo de privilegios al rol A.

      • +
      +

      Al utilizar un grupo de privilegios, puede conceder varios privilegios en bloque a un rol.

      +

      Grupos de privilegios incorporados

      Para facilitar su uso, Milvus proporciona un total de 9 privilegios incorporados a nivel de colección, base de datos e instancia: COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW y Cluster_Admin.

      +
      +

      Los tres niveles de grupos de privilegios incorporados no tienen una relación en cascada. Establecer un grupo de privilegios a nivel de instancia no establece automáticamente permisos para todas las bases de datos y colecciones bajo esa instancia. Los privilegios en los niveles de base de datos y colección deben establecerse manualmente.

      +
      +

      En las tablas siguientes se explican los privilegios incluidos en cada uno de los grupos de privilegios incorporados.

      +

      Nivel de colección

        +
      • COLL_RO: incluye privilegios para leer datos de recopilación

      • +
      • COLL_RW: incluye privilegios para leer y escribir datos de recopilación

      • +
      • COLL_ADMIN: incluye privilegios para leer y escribir datos de colecciones y gestionar colecciones.

      • +
      +

      La siguiente tabla enumera los privilegios específicos incluidos en los tres grupos de privilegios incorporados en el nivel de recopilación.

      +

      **Privilegio**

      +

      **ColecciónSóloLectura

      +

      **ColecciónLecturaEscritura

      +

      **Administrador de colecciones

      +

      Consulta

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      Búsqueda

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      ÍndiceDetalle

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      GetFlushState

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      GetLoadState

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      GetLoadingProgress

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      HasPartition

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      MostrarParticiones

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      ListAliases

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      DescribirColección

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      DescribeAlias

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      ObtenerEstadísticas

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      Crearíndice

      +

      +

      ✔️

      +

      ✔️

      +

      DropIndex

      +

      +

      ✔️

      +

      ✔️

      +

      CrearPartición

      +

      +

      ✔️

      +

      ✔️

      +

      DropPartition

      +

      +

      ✔️

      +

      ✔️

      +

      Cargar

      +

      +

      ✔️

      +

      ✔️

      +

      Liberar

      +

      +

      ✔️

      +

      ✔️

      +

      Insertar

      +

      +

      ✔️

      +

      ✔️

      +

      Borrar

      +

      +

      ✔️

      +

      ✔️

      +

      Subir

      +

      +

      ✔️

      +

      ✔️

      +

      Importar

      +

      +

      ✔️

      +

      ✔️

      +

      Descarga

      +

      +

      ✔️

      +

      ✔️

      +

      Compactación

      +

      +

      ✔️

      +

      ✔️

      +

      Balance de carga

      +

      +

      ✔️

      +

      ✔️

      +

      CrearAlias

      +

      +

      +

      ✔️

      +

      DropAlias

      +

      +

      +

      ✔️

      +
      +

      Nivel de base de datos

        +
      • DB_RO: incluye privilegios para leer datos de la base de datos

      • +
      • DB_RW: incluye privilegios para leer y escribir datos de bases de datos

      • +
      • DB_Admin: incluye privilegios para leer y escribir datos de bases de datos y gestionar bases de datos.

      • +
      +

      La siguiente tabla enumera los privilegios específicos incluidos en los tres grupos de privilegios incorporados a nivel de base de datos.

      +

      **Privilegio**

      +

      **Sólo lectura de basede datos

      +

      **Base de datosLecturaEscritura

      +

      **Administrador de base de datos

      +

      MostrarColecciones

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      DescribirBaseDeDatos

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      CrearColección

      +

      +

      +

      ✔️

      +

      SoltarColección

      +

      +

      +

      ✔️

      +

      AlterDatabase

      +

      +

      ✔️

      +

      ✔️

      +
      +

      Nivel de cluster

        +
      • Cluster_RO: incluye privilegios para leer datos de instancias

      • +
      • Cluster_RW: incluye privilegios para leer y escribir datos de instancia

      • +
      • Cluster_Admin: incluye privilegios para leer y escribir datos de instancia y gestionar instancias.

      • +
      +

      La siguiente tabla enumera los privilegios específicos incluidos en los tres grupos de privilegios incorporados a nivel de instancia.

      +

      **Privilegio**

      +

      **Sólo lectura de clúster

      +

      **ClusterReadWrite

      +

      **Administrador de clústeres

      +

      ListDatabases

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      RenombrarColección

      +

      +

      +

      ✔️

      +

      CrearPropiedad

      +

      +

      +

      ✔️

      +

      ActualizarUsuario

      +

      +

      +

      ✔️

      +

      DropOwnership

      +

      +

      +

      ✔️

      +

      SeleccionarPropiedad

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      GestionarPropiedad

      +

      +

      +

      ✔️

      +

      SeleccionarUsuario

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      BackupRBAC

      +

      +

      +

      ✔️

      +

      RestaurarRBAC

      +

      +

      +

      ✔️

      +

      CrearResourceGroup

      +

      +

      +

      ✔️

      +

      DropResourceGroup

      +

      +

      +

      ✔️

      +

      ActualizarResourceGroups

      +

      +

      ✔️

      +

      ✔️

      +

      DescribeResourceGroup

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      ListResourceGroups

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      TransferNode

      +

      +

      ✔️

      +

      ✔️

      +

      TransferReplica

      +

      +

      ✔️

      +

      ✔️

      +

      CrearBaseDeDatos

      +

      +

      +

      ✔️

      +

      DropDatabase

      +

      +

      +

      ✔️

      +

      FlushAll

      +

      +

      ✔️

      +

      ✔️

      +

      CrearGrupoDePrivilegios

      +

      +

      +

      ✔️

      +

      DropPrivilegeGroup

      +

      +

      +

      ✔️

      +

      ListPrivilegeGroups

      +

      +

      +

      ✔️

      +

      OperatePrivilegeGroup

      +

      +

      +

      ✔️

      +
      +

      Procedimientos

      Puede crear un grupo de privilegios y, a continuación, añadir privilegios al grupo de privilegios.

      +

      Creación de un grupo de privilegios

      El siguiente ejemplo muestra cómo crear un grupo de privilegios denominado privilege_group_1.

      + +
      from pymilvus import MilvusClient​
      +client.create_privileg_group(group_name='privilege_group_1')​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
      +​
      +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1"​
      +}'​
      +
      +
      +

      Adición de privilegios a un grupo de privilegios

      El siguiente ejemplo muestra cómo añadir los privilegios PrivilegeBackupRBAC y PrivilegeRestoreRBAC al grupo de privilegios privilege_group_1 que se acaba de crear.

      + +
      from pymilvus import MilvusClient​
      +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
      +​
      +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .privileges(Arrays.asList("Query", "Search"))​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1",​
      +    "privileges":["Query", "Search"]​
      +}'​
      +
      +
      +

      Eliminar privilegios de un grupo de privilegios

      El siguiente ejemplo muestra cómo eliminar el privilegio PrivilegeRestoreRBAC del grupo de privilegios privilege_group_1.

      + +
      from pymilvus import MilvusClient​
      +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
      +​
      +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .privileges(Collections.singletonList("Search"))​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1",​
      +    "privileges":["Search"]​
      +}'​
      +
      +
      +

      Listar grupos de privilegios

      El siguiente ejemplo muestra cómo listar todos los grupos de privilegios existentes.

      + +
      from pymilvus import MilvusClient​
      +client.list_privilege_groups()​
      +
      +
      +
      import io.milvus.v2.service.rbac.PrivilegeGroup;​
      +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
      +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
      +​
      +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
      +        .build());​
      +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.ListPrivilegeGroups(context.Background())​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      A continuación se muestra un ejemplo de salida.

      +
      PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
      +
      +
      +

      Eliminar un grupo de privilegios

      El siguiente ejemplo muestra cómo eliminar el grupo de privilegios privilege_group_1.

      + +
      from pymilvus import MilvusClient​
      +client.drop_privilege_group(group_name='privilege_group_1')​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
      +​
      +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1"​
      +}'​
      +
      +
      diff --git a/localization/v2.5.x/site/es/adminGuide/rbac.json b/localization/v2.5.x/site/es/adminGuide/rbac.json index 470c69eb9..a79b41643 100644 --- a/localization/v2.5.x/site/es/adminGuide/rbac.json +++ b/localization/v2.5.x/site/es/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"Habilitar RBAC","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Inicie un cliente Milvus para establecer una conexión","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. Cree un usuario","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. Crear un rol","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. 4. Conceder un privilegio a un rol","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. Conceder un rol a un usuario","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. Revocar privilegios","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"A continuación","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"Explicación de RBAC","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"Conceptos clave de RBAC","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"Procedimientos","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/rbac.md b/localization/v2.5.x/site/es/adminGuide/rbac.md index 0f50a32bc..4d6d297d8 100644 --- a/localization/v2.5.x/site/es/adminGuide/rbac.md +++ b/localization/v2.5.x/site/es/adminGuide/rbac.md @@ -1,10 +1,14 @@ --- id: rbac.md related_key: enable RBAC -summary: 'Aprenda a gestionar usuarios, funciones y privilegios.' -title: Habilitar RBAC +summary: >- + RBAC (Role-Based Access Control) es un método de control de acceso basado en + roles. Con RBAC, puedes controlar con precisión las operaciones que los + usuarios pueden realizar a nivel de colección, base de datos e instancia, lo + que mejora la seguridad de los datos. +title: Explicación de RBAC --- -

      Habilitar RBAC

      Habilitando RBAC, puede controlar el acceso a recursos específicos de Milvus (Ej. una colección o una partición) o permisos basados en el rol y privilegios del usuario. Actualmente, esta característica sólo está disponible en Python y Java.

      -

      Este tema describe cómo habilitar RBAC y gestionar usuarios y roles.

      -
      -

      Los fragmentos de código de esta página utilizan el nuevo MilvusClient (Python) para interactuar con Milvus. En futuras actualizaciones se publicarán nuevos SDK de MilvusClient para otros lenguajes.

      -
      -

      1. Inicie un cliente Milvus para establecer una conexión

      RBAC (Role-Based Access Control) es un método de control de acceso basado en roles. Con RBAC, puede controlar con precisión las operaciones que los usuarios pueden realizar a nivel de colección, base de datos e instancia, mejorando la seguridad de los datos.

      +

      A diferencia de los modelos tradicionales de control de acceso de usuarios, RBAC introduce el concepto de roles. En el modelo RBAC, se conceden privilegios a los roles y luego se otorgan esos roles a los usuarios. A continuación, los usuarios pueden obtener privilegios.

      +

      El modelo RBAC puede mejorar la eficacia de la gestión del control de acceso. Por ejemplo, si varios usuarios necesitan el mismo conjunto de privilegios, no es necesario establecer manualmente los privilegios para cada usuario. En su lugar, puede crear un rol y asignar el rol a los usuarios. Si desea ajustar los privilegios de estos usuarios, sólo tiene que ajustar los privilegios del rol y la modificación se aplicará a todos los usuarios con este rol.

      +

      Conceptos clave de RBAC

      Después de habilitar la autenticación de usuario, conéctese a su instancia Milvus utilizando token que consiste en un nombre de usuario y una contraseña. Por defecto, Milvus utiliza el usuario root con la contraseña Milvus.

      -
      from pymilvus import MilvusClient
      -
      -client = MilvusClient(
      -    uri='http://localhost:19530', # replace with your own Milvus server address
      -    token='root:Milvus' # replace with your own Milvus server token
      -)
      -
      -

      2. Cree un usuario

      Cree un usuario llamado user_1 con la contraseña P@ssw0rd:

      -
      client.create_user(
      -    user_name='user_1',
      -    password='P@ssw0rd'
      -)
      -
      -

      Después de crear un usuario, puede:

      -
        -
      • Actualizar la contraseña de un usuario. Debe proporcionar tanto la contraseña original como la nueva.
      • -
      -
      client.update_password(
      -    user_name='user_1',
      -    old_password='P@ssw0rd',
      -    new_password='P@ssw0rd123'
      -)
      -
      -
        -
      • Listar todos los usuarios.
      • -
      -
      client.list_users()
      -
      -# output:
      -# ['root', 'user_1']
      -
      -
        -
      • Comprobar el rol de un usuario en particular.
      • -
      -
      client.describe_user(user_name='user_1')
      -
      -# output:
      -# {'user_name': 'user_1', 'roles': ()}
      -
      -

      3. Crear un rol

      El siguiente ejemplo crea un rol llamado roleA.

      -
      client.create_role(
      -    role_name="roleA",
      -)
      -
      -

      Después de crear un rol, puede:

      +

      + + Users, roles, and privileges + Usuarios, roles y privilegios

      +

      Hay cuatro componentes principales en el modelo RBAC.

        -
      • Listar todos los roles.
      • +
      • **Recurso: **La entidad de recursos a la que se puede acceder. Hay tres niveles de recursos en Milvus - instancia, base de datos y colección.

      • +
      • **Privilegio: **El permiso para realizar ciertas operaciones en los recursos de Milvus (por ejemplo, crear colecciones, insertar datos, etc.).

      • +
      • **Grupo de privilegios: **Un grupo de múltiples privilegios.

      • +
      • **Rol: **Un rol consta de dos partes: privilegios y recursos. Los privilegios definen el tipo de operaciones que un rol puede realizar, mientras que los recursos definen los recursos de destino en los que se pueden realizar las operaciones. Por ejemplo, el rol de administrador de base de datos puede realizar operaciones de lectura, escritura y gestión en determinadas bases de datos.

      • +
      • **Usuario: Un usuario es alguien que utiliza Milvus. Cada usuario tiene un ID único y se le otorga un rol o múltiples roles.

      -
      client.list_roles()
      -
      -# output:
      -# ['admin', 'public', 'roleA']
      -
      -

      4. 4. Conceder un privilegio a un rol

      El siguiente ejemplo muestra cómo conceder el permiso de búsqueda en todas las colecciones al rol denominado roleA.

      -

      En object_type se especifica el tipo de objeto, que también puede entenderse como el tipo de recurso. Actualmente, los valores válidos incluyen Colección/Usuario/Global, etc., donde Global significa que no hay un tipo de recurso específico. object_name es el nombre del recurso. Si objecttypees Collection, entonces el nombre del objeto puede referirse a un nombre de colección específico, o puede utilizar * para especificar todas las colecciones. Si objecttypees Global, entonces el nombre del objeto sólo puede especificarse como *. Consulte Usuarios y roles para conocer otros tipos de privilegios que puede conceder.

      -

      Antes de gestionar privilegios de rol, asegúrese de que ha activado la autenticación de usuario. De lo contrario, puede producirse un error. Para obtener información sobre cómo activar la autenticación de usuarios, consulte Autenticar el acceso de usuarios.

      -
      # grant privilege to a role
      -
      -client.grant_privilege(
      -    role_name='roleA',
      -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
      -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
      -    privilege='SelectUser'
      -)
      -
      -

      Después de conceder un privilegio a un rol, puede:

      -
        -
      • Ver los privilegios concedidos a un rol.
      • -
      -
      client.describe_role(
      -    role_name='roleA'
      -)
      -
      -# output:
      -# {'role': 'roleA',
      -#  'privileges': [{'object_type': 'User',
      -#    'object_name': 'user_1',
      -#    'db_name': 'default',
      -#    'role_name': 'roleA',
      -#    'privilege': 'SelectUser',
      -#    'grantor_name': 'root'}]}
      -
      -

      5. Conceder un rol a un usuario

      Conceder el rol a un usuario para que éste pueda heredar todos los privilegios del rol.

      -
      # grant a role to a user
      -
      -client.grant_role(
      -    user_name='user_1',
      -    role_name='roleA'
      -)
      -
      -

      Después de conceder el rol, verificar que se ha concedido:

      -
      client.describe_user(
      -    user_name='user_1'
      -)
      -
      -# output:
      -# {'user_name': 'user_1', 'roles': ('roleA')}
      -
      -

      6. Revocar privilegios

      -

      Tenga cuidado al realizar las siguientes operaciones, ya que son irreversibles.

      -
      -
        -
      • Eliminar un privilegio de un rol. Si revoca un privilegio que no se ha concedido al rol, se producirá un error.
      • -
      -
      client.revoke_privilege(
      -    role_name='roleA',
      -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
      -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
      -    privilege='SelectUser'
      -)
      -
      -
        -
      • Eliminar un usuario de un rol. Si revoca un rol que no ha sido concedido al usuario, se producirá un error.
      • -
      -
      client.revoke_role(
      -    user_name='user_1',
      -    role_name='roleA'
      -)
      -
      -
        -
      • Eliminar un rol.
      • -
      -
      client.drop_role(role_name='roleA')
      -
      -
        -
      • Dar de baja a un usuario.
      • -
      -
      client.drop_user(user_name='user_1')
      -
      -

      A continuación

      +

      Para lograr el control de acceso a través de RBAC, es necesario seguir los siguientes pasos.

      +
        +
      1. Cree un usuario: Además del usuario predeterminado root en Milvus, puede crear nuevos usuarios y establecer contraseñas para proteger la seguridad de los datos.

      2. +
      3. Cree un rol: Puede crear roles personalizados en función de sus necesidades. Las capacidades específicas de un rol están determinadas por sus privilegios.

      4. +
      5. Crear un grupo de privilegios: Combine varios privilegios en un grupo de privilegios para agilizar el proceso de concesión de privilegios a un rol.

      6. +
      7. Conceder privilegios o grupos de privilegios a un rol: Defina las capacidades de un rol concediéndole privilegios o grupos de privilegios.

      8. +
      9. Conceder roles a usuarios: Conceda roles con ciertos privilegios a los usuarios para que los usuarios puedan tener los privilegios de un rol. Un mismo rol puede ser otorgado a múltiples usuarios.

      10. +
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.json index d0d526c49..8f1b254d6 100644 --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Actualizar Milvus Cluster con Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Actualizar Milvus Cluster con Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.md index 3d1a16ec7..60b26a9b8 100644 --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: Actualizar Milvus Cluster con Docker Compose >

      Este tema describe cómo actualizar su Milvus utilizando Docker Compose.

      -

      En casos normales, puede actualizar Milvus cambiando su imagen. Sin embargo, necesita migrar los metadatos antes de cualquier actualización de v2.1.x a v2.5.0-beta.

      +

      En casos normales, puede actualizar Milvus cambiando su imagen. Sin embargo, necesita migrar los metadatos antes de cualquier actualización de v2.1.x a v2.5.0.

      Actualizar Milvus cambiando su imagen

    4. Ejecute los siguientes comandos para realizar la actualización.

      docker compose down
      @@ -105,7 +105,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.json
      index 53dbfc7a6..f76e89933 100644
      --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.json
      +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Actualizar Milvus Cluster con Helm Chart","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Comprobar la carta Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus usando Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Actualizar Milvus Cluster con Helm Chart","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Comprobar la carta Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus usando Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.md
      index ec73afbaa..9ee187057 100644
      --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.md
      +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      Puede elegir la ruta de actualización para su Milvus de la siguiente manera:

      -
      - Realice una actualización continua](#conduct-a-rolling-upgrade) de Milvus v2.2.3 y versiones posteriores a v2.5.0-beta.
      +
      - Realice una actualización continua (#conduct-a-rolling-upgrade) de Milvus v2.2.3 y versiones posteriores a v2.5.0.

      Realizar una actualización continua

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de forma que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      +

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de modo que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      Las actualizaciones continuas requieren que los coordinadores trabajen en modo activo-espera. Puede utilizar el script que le proporcionamos para configurar los coordinadores para que trabajen en modo de espera activo e iniciar la actualización continua.

      Basándose en las capacidades de actualización continua proporcionadas por Kubernetes, el script anterior impone una actualización ordenada de los despliegues según sus dependencias. Además, Milvus implementa un mecanismo para garantizar que sus componentes sigan siendo compatibles con aquellos que dependen de ellos durante la actualización, lo que reduce significativamente el posible tiempo de inactividad del servicio.

      El script sólo se aplica a la actualización de Milvus instalado con Helm. La siguiente tabla enumera los indicadores de comando disponibles en los scripts.

      @@ -145,13 +145,13 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope oOperaciónupdateFalso -

      Una vez que se haya asegurado de que todos los despliegues en su instancia de Milvus están en su estado normal. Puede ejecutar el siguiente comando para actualizar la instancia de Milvus a 2.5.0-beta.

      -
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
      +

      Una vez que se haya asegurado de que todos los despliegues de su instancia de Milvus están en su estado normal. Puede ejecutar el siguiente comando para actualizar la instancia de Milvus a 2.5.0.

      +
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
       
      1. El script codifica el orden de actualización de los despliegues y no puede cambiarse.
      2. -
      3. El script utiliza kubectl patch para actualizar los despliegues y kubectl rollout status para ver su estado.
      4. +
      5. El script utiliza kubectl patch para actualizar los despliegues y kubectl rollout status para observar su estado.
      6. El script utiliza kubectl patch para actualizar la etiqueta app.kubernetes.io/version de los despliegues a la especificada después de la bandera -t en el comando.
      @@ -234,7 +234,7 @@ my-release-pulsar-zookeeper-2

      La siguiente tabla enumera las operaciones que puede realizar para la migración de metadatos.

      - + diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.json index 110d74830..51205cb97 100644 --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Actualizar Milvus Cluster con Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Actualice su operador Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Actualizar Milvus Cluster con Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Actualice su operador Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.md index 18b00be5e..4be789a63 100644 --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

      Una vez que haya actualizado su operador Milvus a la última versión, tiene las siguientes opciones:

      Realizar una actualización continua

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de forma que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      +

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de modo que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      Basándose en las capacidades de actualización continua proporcionadas por Kubernetes, el operador Milvus aplica una actualización ordenada de los despliegues según sus dependencias. Además, Milvus implementa un mecanismo para garantizar que sus componentes sigan siendo compatibles con aquellos que dependen de ellos durante la actualización, lo que reduce significativamente el posible tiempo de inactividad del servicio.

      La función de actualización continua está desactivada por defecto. Es necesario habilitarla explícitamente a través de un archivo de configuración.

      apiVersion: milvus.io/v1beta1
      @@ -76,7 +76,7 @@ spec:
         components:
           enableRollingUpdate: true
           imageUpdateMode: rollingUpgrade # Default value, can be omitted
      -    image: milvusdb/milvus:v2.5.0-beta
      +    image: milvusdb/milvus:v2.5.0
       

      En el archivo de configuración anterior, establezca spec.components.enableRollingUpdate en true y spec.components.image en la versión de Milvus deseada.

      Por defecto, Milvus realiza la actualización continua para los coordinadores de forma ordenada, en la que sustituye las imágenes del pod de coordinador una tras otra. Para reducir el tiempo de actualización, considere configurar spec.components.imageUpdateMode a all para que Milvus reemplace todas las imágenes de pod al mismo tiempo.

      @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      Puede configurar spec.components.imageUpdateMode a rollingDowngrade para que Milvus reemplace las imágenes de pod coordinador con una versión inferior.

      apiVersion: milvus.io/v1beta1
      @@ -128,7 +128,7 @@ metadata:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      A continuación, ejecute lo siguiente para realizar la actualización:

      kubectl patch -f milvusupgrade.yaml
      @@ -148,8 +148,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Desde Milvus 2.2.0, los metadatos son incompatibles con los de versiones anteriores. Los siguientes ejemplos suponen una actualización de Milvus 2.1.4 a Milvus 2.5.0-beta.

      -

      1. Crear un archivo .yaml para la migración de metadatos

      Cree un archivo de migración de metadatos. El siguiente es un ejemplo. Debe especificar name, sourceVersion y targetVersion en el archivo de configuración. El siguiente ejemplo establece name en my-release-upgrade, sourceVersion en v2.1.4 y targetVersion en v2.5.0-beta. Esto significa que su clúster Milvus se actualizará de v2.1.4 a v2.5.0-beta.

      +

      Desde Milvus 2.2.0, los metadatos son incompatibles con los de versiones anteriores. Los siguientes ejemplos suponen una actualización de Milvus 2.1.4 a Milvus 2.5.0.

      +

      1. Crear un archivo .yaml para la migración de metadatos

      Cree un archivo de migración de metadatos. El siguiente es un ejemplo. Debe especificar name, sourceVersion y targetVersion en el archivo de configuración. El siguiente ejemplo establece name en my-release-upgrade, sourceVersion en v2.1.4 y targetVersion en v2.5.0. Esto significa que su clúster Milvus se actualizará de v2.1.4 a v2.5.0.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -159,9 +159,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.json
      index 87383fa69..c45f480a8 100644
      --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.json
      +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.json
      @@ -1 +1 @@
      -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Actualizar Milvus Standalone con Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Actualizar Milvus Standalone con Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.md
      index 8417fb359..2b529a759 100644
      --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.md
      +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-docker.md
      @@ -24,9 +24,9 @@ title: Actualizar Milvus Standalone con Docker Compose
               >
             
           

      Este tema describe cómo actualizar su Milvus utilizando Docker Compose.

      -

      En casos normales, puede actualizar Milvus cambiando su imagen. Sin embargo, necesita migrar los metadatos antes de cualquier actualización de v2.1.x a v2.5.0-beta.

      +

      En casos normales, puede actualizar Milvus cambiando su imagen. Sin embargo, necesita migrar los metadatos antes de cualquier actualización de v2.1.x a v2.5.0.

      -

      Debido a problemas de seguridad, Milvus actualiza su MinIO a RELEASE.2023-03-20T20-16-18Z con el lanzamiento de v2.2.5. Antes de realizar cualquier actualización desde versiones anteriores de Milvus Standalone instaladas mediante Docker Compose, debe crear un despliegue de MinIO Single-Node Single-Drive y migrar la configuración y el contenido existentes de MinIO al nuevo despliegue. Para más detalles, consulte esta guía.

      +

      Por motivos de seguridad, Milvus actualiza su MinIO a RELEASE.2023-03-20T20-16-18Z con la versión v2.2.5. Antes de realizar cualquier actualización desde versiones anteriores de Milvus Standalone instaladas mediante Docker Compose, debe crear un despliegue de MinIO Single-Node Single-Drive y migrar la configuración y el contenido existentes de MinIO al nuevo despliegue. Para más detalles, consulte esta guía.

      Actualizar Milvus cambiando su imagen

    5. Ejecute los siguientes comandos para realizar la actualización.

      docker compose down
      @@ -83,7 +83,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.json
      index c1b8a3d2a..fb5d8e9fc 100644
      --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.json
      +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Actualizar Milvus Standalone con cartas Helm","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Comprobar la versión de Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus usando Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Actualizar Milvus Standalone con cartas Helm","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Comprobar la versión de Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus usando Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.md
      index b392fde2c..190b6386d 100644
      --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.md
      +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      Puede elegir la ruta de actualización para su Milvus de la siguiente manera:

      -
      - Realice una actualización continua](#conduct-a-rolling-upgrade) de Milvus v2.2.3 y versiones posteriores a v2.5.0-beta.
      +
      - Realice una actualización continua](#conduct-a-rolling-upgrade) de Milvus v2.2.3 y versiones posteriores a v2.5.0.

      Realizar una actualización continua

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de forma que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      +

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de modo que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      Las actualizaciones continuas requieren que los coordinadores trabajen en modo activo-espera. Puede utilizar el script que le proporcionamos para configurar los coordinadores para que trabajen en modo de espera activo e iniciar la actualización continua.

      Basándose en las capacidades de actualización continua proporcionadas por Kubernetes, el script anterior impone una actualización ordenada de los despliegues según sus dependencias. Además, Milvus implementa un mecanismo para garantizar que sus componentes sigan siendo compatibles con aquellos que dependen de ellos durante la actualización, lo que reduce significativamente el posible tiempo de inactividad del servicio.

      El script sólo se aplica a la actualización de Milvus instalado con Helm. La siguiente tabla enumera los indicadores de comando disponibles en los scripts.

      @@ -145,8 +145,8 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope
    6. ParámetrosDescripciónValor por defectoRequerido
      ParámetrosDescripciónValor por defectoObligatorio
      iEl nombre de instancia de Milvus.NoneVerdadero
      oOperaciónupdateFalso
      -

      Una vez que se haya asegurado de que todos los despliegues en su instancia de Milvus están en su estado normal. Puede ejecutar el siguiente comando para actualizar la instancia de Milvus a 2.5.0-beta.

      -
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
      +

      Una vez que se haya asegurado de que todos los despliegues de su instancia de Milvus están en su estado normal. Puede ejecutar el siguiente comando para actualizar la instancia de Milvus a 2.5.0.

      +
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
       
        @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
      1. Migre los metadatos de Milvus.
      2. Inicie los componentes de Milvus con una nueva imagen.
      -

      2. Actualice Milvus de v2.1.x a 2.5.0-beta

      Los siguientes comandos asumen que usted actualiza Milvus de v2.1.4 a 2.5.0-beta. Cámbielos por las versiones que se ajusten a sus necesidades.

      +

      2. Actualizar Milvus de v2.1.x a 2.5.0

      Los siguientes comandos asumen que usted actualiza Milvus de v2.1.4 a 2.5.0. Cámbielos por las versiones que se ajusten a sus necesidades.

      1. Especifique el nombre de la instancia de Milvus, la versión de Milvus de origen y la versión de Milvus de destino.

        -
        ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
        +
        ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
         
      2. Especifique el espacio de nombres con -n si su Milvus no está instalado en el espacio de nombres predeterminado de K8s.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
         
      3. Especifique la ruta raíz con -r si su Milvus está instalado con la costumbre rootpath.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
         
      4. Especifique la etiqueta de imagen con -w si su Milvus está instalado con la personalizada image.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
         
      5. Establezca -d true si desea eliminar automáticamente el pod de migración una vez finalizada la migración.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
         
      6. Retroceda y migre de nuevo si la migración falla.

        -
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
        -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
        +
        ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
        +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
         
      diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.json index e06ec7dd8..1ef4dde40 100644 --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Actualizar Milvus Standalone con Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Actualice su operador Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Actualizar Milvus Standalone con Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Actualice su operador Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Realizar una actualización continua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Actualizar Milvus cambiando su imagen","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar los metadatos","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.md index 4d47d400b..353562feb 100644 --- a/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/es/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

      Una vez que haya actualizado su operador Milvus a la última versión, tiene las siguientes opciones:

      Realizar una actualización continua

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y habilitar la función de actualización continua para ellos, de forma que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      +

      Desde Milvus 2.2.3, puede configurar los coordinadores de Milvus para que funcionen en modo activo-espera y activar la función de actualización continua para ellos, de modo que Milvus pueda responder a las solicitudes entrantes durante las actualizaciones de los coordinadores. En versiones anteriores, los coordinadores debían eliminarse y luego crearse durante una actualización, lo que podía introducir cierto tiempo de inactividad del servicio.

      Basándose en las capacidades de actualización continua proporcionadas por Kubernetes, el operador Milvus aplica una actualización ordenada de los despliegues según sus dependencias. Además, Milvus implementa un mecanismo para garantizar que sus componentes sigan siendo compatibles con aquellos que dependen de ellos durante la actualización, lo que reduce significativamente el posible tiempo de inactividad del servicio.

      La función de actualización continua está desactivada por defecto. Es necesario habilitarla explícitamente a través de un archivo de configuración.

      apiVersion: milvus.io/v1beta1
      @@ -76,7 +76,7 @@ spec:
         components:
           enableRollingUpdate: true
           imageUpdateMode: rollingUpgrade # Default value, can be omitted
      -    image: milvusdb/milvus:v2.5.0-beta
      +    image: milvusdb/milvus:v2.5.0
       

      En el archivo de configuración anterior, establezca spec.components.enableRollingUpdate en true y spec.components.image en la versión de Milvus deseada.

      Por defecto, Milvus realiza una actualización continua para los coordinadores de forma ordenada, en la que sustituye las imágenes del pod de coordinador una tras otra. Para reducir el tiempo de actualización, considere configurar spec.components.imageUpdateMode a all para que Milvus reemplace todas las imágenes de pod al mismo tiempo.

      @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      Puede configurar spec.components.imageUpdateMode a rollingDowngrade para que Milvus reemplace las imágenes de pod coordinador con una versión inferior.

      apiVersion: milvus.io/v1beta1
      @@ -130,7 +130,7 @@ labels:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      A continuación, ejecute lo siguiente para realizar la actualización:

      kubectl patch -f milvusupgrade.yaml
      @@ -150,8 +150,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Desde Milvus 2.2.0, los metadatos son incompatibles con los de versiones anteriores. Los siguientes ejemplos suponen una actualización de Milvus 2.1.4 a Milvus v2.5.0-beta.

      -

      1. Crear un archivo .yaml para la migración de metadatos

      Cree un archivo de migración de metadatos. El siguiente es un ejemplo. Debe especificar name, sourceVersion y targetVersion en el archivo de configuración. El siguiente ejemplo establece name en my-release-upgrade, sourceVersion en v2.1.4 y targetVersion en v2.5.0-beta. Esto significa que su instancia de Milvus se actualizará de v2.1.4 a v2.5.0-beta.

      +

      Desde Milvus 2.2.0, los metadatos son incompatibles con los de versiones anteriores. Los siguientes ejemplos suponen una actualización de Milvus 2.1.4 a Milvus v2.5.0.

      +

      1. Crear un archivo .yaml para la migración de metadatos

      Cree un archivo de migración de metadatos. El siguiente es un ejemplo. Debe especificar name, sourceVersion y targetVersion en el archivo de configuración. El siguiente ejemplo establece name en my-release-upgrade, sourceVersion en v2.1.4 y targetVersion en v2.5.0. Esto significa que su instancia de Milvus se actualizará de v2.1.4 a v2.5.0.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -161,9 +161,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      @@ -173,7 +173,7 @@ spec:
       

      2. Aplique la nueva configuración

      Ejecute el siguiente comando para aplicar la nueva configuración.

      $ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml
       
      -

      3. 3. Compruebe el estado de la migración de metadatos

      Ejecute el siguiente comando para comprobar el estado de la migración de metadatos.

      +

      3. Compruebe el estado de la migración de metadatos

      Ejecute el siguiente comando para comprobar el estado de la migración de metadatos.

      kubectl describe milvus release-name
       

      El estado de ready en la salida significa que la migración de metadatos se ha realizado correctamente.

      diff --git a/localization/v2.5.x/site/es/adminGuide/users_and_roles.json b/localization/v2.5.x/site/es/adminGuide/users_and_roles.json new file mode 100644 index 000000000..161460d61 --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/users_and_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(\"http://localhost:19530\")​\n .token(\"root:Milvus\")​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n .userName(\"user_1\")​\n .password(\"P@ssw0rd\")​\n .build();​\n ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n username: 'user_1',​\n password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n user_name=\"user_1\",​\n old_password=\"P@ssw0rd\",​\n new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n .userName(\"user_1\")​\n .password(\"P@ssw0rd\")​\n .newPassword(\"NewP@ssw0rd\")​\n .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n username: 'user_1',​\n newPassword: 'P@ssw0rd',​\n oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"newPassword\": \"P@ssw0rd!\",​\n \"userName\": \"user_1\",​\n \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n .roleName(\"role_a\")​\n .build();​\n ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"Crear usuarios y roles","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"Usuario","href":"User​","type":2,"isActive":false},{"label":"Rol","href":"Role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/adminGuide/users_and_roles.md b/localization/v2.5.x/site/es/adminGuide/users_and_roles.md new file mode 100644 index 000000000..415041d15 --- /dev/null +++ b/localization/v2.5.x/site/es/adminGuide/users_and_roles.md @@ -0,0 +1,261 @@ +--- +id: users_and_roles.md +related_key: 'users, roles' +summary: >- + Milvus logra un control de acceso de grano fino a través de RBAC. Puede + empezar creando usuarios y roles, luego asignar privilegios o grupos de + privilegios a los roles y, por último, gestionar el control de acceso + concediendo roles a los usuarios. Este método garantiza la eficacia y la + seguridad de la gestión de accesos. Esta página presenta cómo crear usuarios y + roles en Milvus. +title: Crear usuarios y roles +--- +

      Crear usuarios y roles

      Milvus logra un control de acceso de grano fino a través de RBAC. Puede empezar creando usuarios y roles, luego asignar privilegios o grupos de privilegios a los roles, y finalmente gestionar el control de acceso concediendo roles a los usuarios. Este método garantiza la eficacia y la seguridad de la gestión de accesos. Esta página presenta cómo crear usuarios y roles en Milvus.

      +

      Usuario

      Después de inicializar una instancia de Milvus, se genera automáticamente un usuario raíz para la autenticación cuando se conecta a Milvus por primera vez. El nombre de usuario del usuario raíz es root y la contraseña es Milvus. El rol por defecto del usuario raíz es admin, que tiene acceso a todos los recursos. Para garantizar la seguridad de los datos, mantenga a salvo las credenciales del usuario raíz para evitar accesos no autorizados.

      +

      Para las operaciones diarias, recomendamos crear usuarios en lugar de utilizar el usuario root.

      +

      Crear un usuario

      El siguiente ejemplo muestra cómo crear un usuario con el nombre de usuario user_1 y la contraseña P@ssw0rd. El nombre de usuario y la contraseña del usuario deben seguir las siguientes reglas.

      +
        +
      • Nombre de usuario: debe empezar por una letra y sólo puede incluir letras mayúsculas o minúsculas, números y guiones bajos.

      • +
      • Contraseña: Debe tener entre 8 y 64 caracteres y debe incluir tres de los siguientes: letras mayúsculas, letras minúsculas, números y caracteres especiales.

      • +
      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +client.create_user(user_name="user_1", password="P@ssw0rd")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig;​
      +import io.milvus.v2.client.MilvusClientV2;​
      +import io.milvus.v2.service.rbac.request.CreateUserReq;​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +        .uri("http://localhost:19530")​
      +        .token("root:Milvus")​
      +        .build();​
      +        ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +CreateUserReq createUserReq = CreateUserReq.builder()​
      +        .userName("user_1")​
      +        .password("P@ssw0rd")​
      +        .build();​
      +        ​
      +client.createUser(createUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +await milvusClient.createUser({​
      +   username: 'user_1',​
      +   password: 'P@ssw0rd',​
      + });​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1",​
      +    "password": "P@ssw0rd"​
      +}'​
      +
      +
      +

      Actualizar contraseña

      Después de crear un usuario, puede actualizar la contraseña si la olvida.

      +

      La nueva contraseña también debe seguir la siguiente regla.

      +
        +
      • Debe tener entre 8 y 64 caracteres e incluir tres de los siguientes: letras mayúsculas, letras minúsculas, números y caracteres especiales.
      • +
      +

      El siguiente ejemplo muestra cómo actualizar la contraseña del usuario user_1 a NewP@ssw0rd.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.update_password(​
      +    user_name="user_1",​
      +    old_password="P@ssw0rd",​
      +    new_password="NewP@ssw0rd"​
      +)​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
      +​
      +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
      +        .userName("user_1")​
      +        .password("P@ssw0rd")​
      +        .newPassword("NewP@ssw0rd")​
      +        .build();​
      +client.updatePassword(updatePasswordReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.updateUser({​
      +   username: 'user_1',​
      +   newPassword: 'P@ssw0rd',​
      +   oldPassword: 'NewP@ssw0rd',​
      +});​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "newPassword": "P@ssw0rd!",​
      +    "userName": "user_1",​
      +    "password": "P@ssw0rd"​
      +}'​
      +
      +
      +

      Listar usuarios

      Después de crear varios usuarios, puedes listar y ver todos los usuarios existentes.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_users()​
      +
      +
      +
      List<String> resp = client.listUsers();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.listUsers();​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      A continuación se muestra un ejemplo de salida. root es el usuario por defecto generado automáticamente en Milvus. user_1 es el nuevo usuario que se acaba de crear.

      +
      ['root', 'user_1']​
      +
      +
      +

      Rol

      Milvus proporciona un rol incorporado llamado admin, que es un rol de administrador que puede acceder a recursos bajo todas las instancias y tiene privilegios para todas las operaciones. Para una gestión de acceso más detallada y una mayor seguridad de los datos, se recomienda crear roles personalizados en función de sus necesidades.

      +

      Creación de un rol

      El siguiente ejemplo muestra cómo crear un rol denominado role_a.

      +

      El nombre del rol debe seguir la siguiente regla

      +
        +
      • Debe empezar por una letra y sólo puede incluir letras mayúsculas o minúsculas, números y guiones bajos."
      • +
      + +
      from pymilvus import MilvusClient​
      +​
      +client.create_role(role_name="role_a")​
      +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
      +
      +
      +
      CreateRoleReq createRoleReq = CreateRoleReq.builder()​
      +        .roleName("role_a")​
      +        .build();​
      +       ​
      +
      +
      +
      client.createRole(createRoleReq);​
      +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.createRole({​
      +   roleName: 'role_a',​
      +});​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      +

      Listar roles

      Después de crear varios roles, puedes listar y ver todos los roles existentes.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_roles()​
      +
      +
      +
      List<String> roles = client.listRoles();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.listRoles(​
      +    includeUserInfo: True​
      +);​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      A continuación se muestra un ejemplo de salida. admin es el rol por defecto en Milvus. role_a es el nuevo rol que se acaba de crear.

      +
      ['admin', 'role_a']​
      +
      +
      diff --git a/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.json index e67cb191d..79b4809f2 100644 --- a/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Ejecutar Milvus con Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instale Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Ejecutar Milvus con Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instale Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.md index d2a92fc9e..9328ed393 100644 --- a/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/es/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Ejecutar Milvus con Docker Compose (Linux)

      Milvus proporciona un archivo de configuración Docker Compose en el repositorio Milvus. Para instalar Milvus utilizando Docker Compose, simplemente ejecute

      # Download the configuration file
      -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
      +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
       
       # Start Milvus
       $ sudo docker compose up -d
      diff --git a/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
      index 1fbc21168..96ecd5c50 100644
      --- a/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
      +++ b/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
      @@ -1 +1 @@
      -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Ejecutar Milvus con soporte GPU usando Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instalar Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configurar el pool de memoria","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Ejecutar Milvus con soporte GPU usando Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Requisitos previos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instalar Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configurar el pool de memoria","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Lo que sigue","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
      index 5c7f36f0f..b220c74ac 100644
      --- a/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
      +++ b/localization/v2.5.x/site/es/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
      @@ -41,7 +41,7 @@ title: Ejecutar Milvus con soporte GPU usando Docker Compose
       
    7. Compruebe los requisitos de hardware y software antes de la instalación.
    8. -

      Si encuentra algún problema al arrancar la imagen, póngase en contacto con nosotros en community@zilliz.com con detalles sobre el problema, y le proporcionaremos el soporte necesario.

      +

      Si encuentra algún problema al arrancar la imagen, contacte con nosotros en community@zilliz.com con detalles sobre el problema, y le proporcionaremos el soporte necesario.

      Instalar Milvus

      Para instalar Milvus con soporte GPU utilizando Docker Compose, siga estos pasos.

      -

      1. Descargue y configure el archivo YAML

      Descarga milvus-standalone-docker-compose-gpu.yml y guárdelo como docker-compose.yml manualmente, o con el siguiente comando.

      -
      $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
      +

      1. Descargue y configure el archivo YAML

      Descarga milvus-standalone-docker-compose-gpu.yml y guárdelo como docker-compose.yml manualmente, o con el siguiente comando.

      +
      $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
       

      Es necesario realizar algunos cambios en las variables de entorno del servicio autónomo en el archivo YAML como se indica a continuación:

        diff --git a/localization/v2.5.x/site/es/menuStructure/es.json b/localization/v2.5.x/site/es/menuStructure/es.json index a08151a52..188bec7c1 100644 --- a/localization/v2.5.x/site/es/menuStructure/es.json +++ b/localization/v2.5.x/site/es/menuStructure/es.json @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "Filtrado", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "Explicación del filtrado", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "Operadores básicos", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "Filtrado Plantillas", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "Operadores JSON", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "Operadores de matrices", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "Búsqueda de texto completo", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "Coincidencia de texto", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "Iteradores de búsqueda", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "Utilizar clave de partición", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "Filtrado de metadatos", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "Nueva clasificación", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -994,7 +1025,7 @@ "children": [] }, { - "label": "Despliegue en GCP", + "label": "Implantación en GCP", "id": "gcp.md", "order": 2, "children": [] @@ -1309,7 +1340,7 @@ "isMenu": true, "children": [ { - "label": "Rastreo de Jaeger", + "label": "Seguimiento de Jaeger", "id": "config_jaeger_tracing.md", "order": 0, "children": [] @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "Usuarios, privilegios y funciones", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "Activar RBAC", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "Explicación de RBAC", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "Crear usuarios y funciones", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "Crear grupo de privilegios", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "Conceder privilegios", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "Funciones de las subvenciones", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "Eliminar usuarios y funciones", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "Cifrado en tránsito", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Herramienta de dimensionamiento Milvus", "id": "sizing", diff --git a/localization/v2.5.x/site/es/release_notes.json b/localization/v2.5.x/site/es/release_notes.json index 7ef22a1a1..2705fa4ff 100644 --- a/localization/v2.5.x/site/es/release_notes.json +++ b/localization/v2.5.x/site/es/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Notas de la versión","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Notas de la versión","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/release_notes.md b/localization/v2.5.x/site/es/release_notes.md index a880725c3..2b4591564 100644 --- a/localization/v2.5.x/site/es/release_notes.md +++ b/localization/v2.5.x/site/es/release_notes.md @@ -19,7 +19,7 @@ title: Notas de la versión >

        Descubra las novedades de Milvus. Esta página resume las nuevas características, mejoras, problemas conocidos y correcciones de errores de cada versión. Puede encontrar las notas de la versión para cada versión publicada después de la v2.5.0 en esta sección. Le sugerimos que visite regularmente esta página para conocer las actualizaciones.

        -

        v2.5.0-beta

        Fecha de lanzamiento: 26 de noviembre de 2024

        +

        Fecha de lanzamiento: 23 de diciembre de 2024

        - +
        Versión de MilvusVersión del SDK de PythonVersión del SDK de Node.jsVersión del SDK de Java
        2.5.0-beta2.5.02.5.02.5.0
        2.5.02.5.12.5.22.5.2
        -

        Milvus 2.5.0-beta aporta avances significativos para mejorar la facilidad de uso, la escalabilidad y el rendimiento para los usuarios que se ocupan de la búsqueda vectorial y la gestión de datos a gran escala. Con esta versión, Milvus integra nuevas y potentes funciones como la búsqueda basada en términos, la compactación de clústeres para optimizar las consultas y la compatibilidad versátil con métodos de búsqueda vectorial dispersa y densa. Las mejoras en la gestión de clusters, indexación y manejo de datos introducen nuevos niveles de flexibilidad y facilidad de uso, haciendo de Milvus una base de datos vectorial aún más robusta y fácil de usar.

        +

        Milvus 2.5.0 aporta avances significativos para mejorar la facilidad de uso, la escalabilidad y el rendimiento para los usuarios que se ocupan de la búsqueda vectorial y la gestión de datos a gran escala. Con esta versión, Milvus integra nuevas y potentes funciones como la búsqueda basada en términos, la compactación de clústeres para optimizar las consultas y la compatibilidad versátil con métodos de búsqueda vectorial dispersa y densa. Las mejoras en la gestión de clusters, indexación y manejo de datos introducen nuevos niveles de flexibilidad y facilidad de uso, haciendo de Milvus una base de datos vectorial aún más robusta y fácil de usar.

        Características principales

        Milvus 2.5 es compatible con la búsqueda de texto completo implementada con Sparse-BM25. Esta función es un complemento importante de las potentes capacidades de búsqueda semántica de Milvus, especialmente en situaciones en las que intervienen palabras raras o términos técnicos. En versiones anteriores, Milvus soportaba vectores dispersos para ayudar en escenarios de búsqueda de palabras clave. Estos vectores dispersos se generaban fuera de Milvus mediante modelos neuronales como SPLADEv2/BGE-M3 o modelos estadísticos como el algoritmo BM25.

        Desarrollado por Tantivy, Milvus 2.5 incorpora analizadores y extracción de vectores dispersos, ampliando la API de sólo recibir vectores como entrada a aceptar directamente texto. La información estadística de BM25 se actualiza en tiempo real a medida que se introducen los datos, lo que mejora la facilidad de uso y la precisión. Además, los vectores dispersos basados en algoritmos de aproximación al vecino más cercano (RNA) ofrecen un rendimiento más potente que los sistemas estándar de búsqueda por palabras clave.

        Para obtener más información, consulte Visión general del analizador y Búsqueda de texto completo.

        @@ -80,4 +80,7 @@ title: Notas de la versión

        Almacenamiento local V2

        Introdujo un nuevo formato de archivo local en Milvus 2.5, mejorando la eficiencia de carga y consulta para datos escalares, reduciendo la sobrecarga de memoria y sentando las bases para futuras optimizaciones.

        Optimización del análisis sintáctico de expresiones

        Se ha mejorado el análisis sintáctico de expresiones implementando el almacenamiento en caché para expresiones repetidas, actualizando ANTLR y optimizando el rendimiento de las cláusulas NOT IN.

        Mejora del rendimiento de la concurrencia de DDL

        Se ha optimizado el rendimiento de la concurrencia de las operaciones del lenguaje de definición de datos (DDL).

        -

        Alineación de las funciones de la API RESTful

        Alineación de las funcionalidades de la API RESTful con otros SDK en aras de la coherencia.

        +

        Alineación de las funciones de la API RESTful

        Alineación de las funcionalidades de la API RESTful con otros SDK para mayor coherencia.

        +

        Actualizaciones de seguridad y configuración

        Soporte de TLS para asegurar la comunicación entre nodos en entornos más complejos o empresariales. Para obtener más información, consulte Configuración de seguridad.

        +

        Mejoras en el rendimiento de la compactación

        Se han eliminado las limitaciones de segmentos máximos en la compactación mixta y ahora se da prioridad a los segmentos más pequeños, lo que mejora la eficacia y acelera las consultas en conjuntos de datos grandes o fragmentados.

        +

        Equilibrio de canales basado en la puntuación

        Se ha introducido una política que equilibra dinámicamente las cargas entre canales, lo que mejora la utilización de los recursos y la estabilidad general en las implantaciones a gran escala.

        diff --git a/localization/v2.5.x/site/es/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/es/userGuide/collections/modify-collection.json index eb65d5bc6..15c1f3172 100644 --- a/localization/v2.5.x/site/es/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/es/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modificar colección","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Cambiar el nombre de una colección","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Establecer TTL de colección","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modificar colección","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Cambiar el nombre de una colección","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Establecer TTL de colección","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/es/userGuide/collections/modify-collection.md index 69099fbc7..f61d4d4fc 100644 --- a/localization/v2.5.x/site/es/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/es/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

        Si una colección necesita ser eliminada durante un periodo específico, considere establecer su tiempo de vida (TTL) en segundos. Una vez que el TTL se agota, Milvus elimina las entidades de la colección y elimina la colección. El borrado es asíncrono, lo que indica que las búsquedas y consultas siguen siendo posibles antes de que se complete el borrado.

        +

        Si una colección necesita ser eliminada durante un periodo específico, considere establecer su tiempo de vida (TTL) en segundos. Una vez que el TTL se agota, Milvus elimina las entidades de la colección. El borrado es asíncrono, lo que indica que las búsquedas y consultas siguen siendo posibles antes de que se complete el borrado.

        El siguiente fragmento de código muestra cómo cambiar el TTL de una colección.

        -
        # Currently not available for Python
        +
        from pymilvus import MilvusClient
         
        +client.alter_collection_properties(
        +  collection_name="collection_name",
        +  properties = {"collection.ttl.seconds": 500}
        +)
         
        import io.milvus.v2.service.collection.request.AlterCollectionReq;​
         import java.util.HashMap;​
        diff --git a/localization/v2.5.x/site/es/userGuide/schema/string.md b/localization/v2.5.x/site/es/userGuide/schema/string.md
        index 97b08d105..889655796 100644
        --- a/localization/v2.5.x/site/es/userGuide/schema/string.md
        +++ b/localization/v2.5.x/site/es/userGuide/schema/string.md
        @@ -5,7 +5,7 @@ summary: >-
           En Milvus, VARCHAR es el tipo de datos utilizado para almacenar datos de tipo
           cadena, adecuado para almacenar cadenas de longitud variable. Puede almacenar
           cadenas con caracteres de uno o varios bytes, con una longitud máxima de hasta
        -  60.535 caracteres. Al definir un campo VARCHAR, debe especificar también el
        +  65.535 caracteres. Al definir un campo VARCHAR, debe especificar también el
           parámetro de longitud máxima max_length. El tipo de cadena VARCHAR ofrece una
           forma eficaz y flexible de almacenar y gestionar datos de texto, por lo que es
           ideal para aplicaciones que manejan cadenas de longitudes variables.
        @@ -25,7 +25,7 @@ summary: >-
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        En Milvus, VARCHAR es el tipo de datos utilizado para almacenar datos de tipo cadena, adecuado para almacenar cadenas de longitud variable. Puede almacenar cadenas con caracteres de uno o varios bytes, con una longitud máxima de hasta 60.535 caracteres. Al definir un campo VARCHAR, también debe especificar el parámetro de longitud máxima max_length. El tipo de cadena VARCHAR ofrece una forma eficaz y flexible de almacenar y gestionar datos de texto, por lo que es ideal para aplicaciones que manejan cadenas de longitudes variables.

        +

        En Milvus, VARCHAR es el tipo de datos utilizado para almacenar datos de tipo cadena, adecuado para almacenar cadenas de longitud variable. Puede almacenar cadenas con caracteres de uno o varios bytes, con una longitud máxima de hasta 65.535 caracteres. Al definir un campo VARCHAR, también debe especificar el parámetro de longitud máxima max_length. El tipo de cadena VARCHAR ofrece una forma eficaz y flexible de almacenar y gestionar datos de texto, por lo que es ideal para aplicaciones que manejan cadenas de longitudes variables.

        Añadir campo VARCHAR

        Milvus proporciona potentes operadores para consultar campos de matrices, permitiéndole filtrar y recuperar entidades basándose en el contenido de las matrices.

        +
        +

        Todos los elementos de una matriz deben ser del mismo tipo, y las estructuras anidadas dentro de las matrices se tratan como cadenas simples. Por lo tanto, cuando se trabaja con campos ARRAY, es aconsejable evitar el anidamiento excesivamente profundo y asegurarse de que sus estructuras de datos son tan planas como sea posible para un rendimiento óptimo.

        +
        +

        Operadores ARRAY disponibles

        Los operadores ARRAY permiten una consulta detallada de los campos array en Milvus. Estos operadores son.

        + +

        ARRAY_CONTAINS

        El operador ARRAY_CONTAINS comprueba si existe un elemento específico en un campo de matriz. Resulta útil cuando se desea encontrar entidades en las que un elemento determinado está presente en la matriz.

        +

        Ejemplo

        +

        Suponga que tiene un campo de matriz history_temperatures, que contiene las temperaturas mínimas registradas en diferentes años. Para encontrar todas las entidades en las que la matriz contiene el valor 23, puede utilizar la siguiente expresión de filtro.

        +
        filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
        +
        +
        +

        Esto devolverá todas las entidades en las que la matriz history_temperatures contenga el valor 23.

        +

        MATRIZ_CONTIENE_TODOS

        El operador ARRAY_CONTAINS_ALL garantiza que todos los elementos de la lista especificada están presentes en el campo de la matriz. Este operador resulta útil cuando se desea buscar entidades que contienen varios valores en la matriz.

        +

        Ejemplo

        +

        Si desea encontrar todas las entidades en las que la matriz history_temperatures contiene tanto 23 como 24, puede utilizar.

        +
        filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
        +
        +
        +

        Esto devolverá todas las entidades en las que la matriz history_temperatures contenga los dos valores especificados.

        +

        MATRIZ_CONTIENE_CUALQUIERA

        El operador ARRAY_CONTAINS_ANY comprueba si alguno de los elementos de la lista especificada está presente en el campo de la matriz. Resulta útil cuando se desea buscar entidades que contengan al menos uno de los valores especificados en la matriz.

        +

        Ejemplo

        +

        Para encontrar todas las entidades en las que la matriz history_temperatures contiene 23 o 24, puede utilizar.

        +
        filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
        +
        +
        +

        Esto devolverá todas las entidades en las que la matriz history_temperatures contenga al menos uno de los valores 23 o 24.

        +

        ARRAY_LENGTH

        El operador ARRAY_LENGTH permite filtrar entidades en función del número de elementos de un campo de matriz. Esto resulta útil cuando se necesita encontrar entidades con matrices de una longitud determinada.

        +

        Ejemplo

        +

        Si desea encontrar todas las entidades en las que la matriz history_temperatures tiene menos de 10 elementos, puede utilizar.

        +
        filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
        +
        +
        +

        Esto devolverá todas las entidades en las que la matriz history_temperatures tenga menos de 10 elementos.

        diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..cb638bb20 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"Operadores básicos","href":"Basic-Operators​","type":1,"isActive":false},{"label":"Operadores de comparación","href":"Comparison-operators​","type":2,"isActive":false},{"label":"Operadores de rango","href":"Range-operators​","type":2,"isActive":false},{"label":"Operadores aritméticos","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"Operadores lógicos","href":"Logical-Operators​","type":2,"isActive":false},{"label":"Consejos sobre el uso de operadores básicos con campos JSON y ARRAY","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"Conclusión","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..682b0e338 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,237 @@ +--- +id: basic-operators.md +summary: >- + Milvus proporciona un rico conjunto de operadores básicos para ayudarle a + filtrar y consultar datos de forma eficiente. Estos operadores le permiten + refinar sus condiciones de búsqueda basándose en campos escalares, cálculos + numéricos, condiciones lógicas y mucho más. Entender cómo utilizar estos + operadores es crucial para construir consultas precisas y maximizar la + eficiencia de sus búsquedas. +title: Operadores básicos +--- +

        Operadores básicos

        Milvus proporciona un amplio conjunto de operadores básicos para ayudarle a filtrar y consultar datos de forma eficiente. Estos operadores le permiten refinar sus condiciones de búsqueda basándose en campos escalares, cálculos numéricos, condiciones lógicas y mucho más. Entender cómo utilizar estos operadores es crucial para construir consultas precisas y maximizar la eficiencia de sus búsquedas.

        +

        Operadores de comparación

        Los operadores de comparación se utilizan para filtrar datos en función de la igualdad, la desigualdad o el tamaño. Son aplicables a campos numéricos, de texto y de fecha.

        +

        Operadores de comparación admitidos.

          +
        • == (Igual a)

        • +
        • != (No igual a)

        • +
        • > (Mayor que)

        • +
        • < (Menor que)

        • +
        • >= (Mayor o igual que)

        • +
        • <= (Menor o igual que)

        • +
        +

        Ejemplo 1: Filtrado con Igual a (==)

        Suponga que tiene un campo llamado status y quiere encontrar todas las entidades en las que status es "activo". Puede utilizar el operador de igualdad ==.

        +
        filter = 'status == "active"'​
        +
        +
        +

        Ejemplo 2: Filtrado con no igual a (!=)

        Para encontrar entidades donde status no sea "inactivo".

        +
        filter = 'status != "inactive"'​
        +
        +
        +

        Ejemplo 3: Filtrado con Mayor que (>)

        Si desea encontrar todas las entidades con un age mayor que 30.

        +
        filter = 'age > 30'​
        +
        +
        +

        Ejemplo 4: Filtrado con menor que (<)

        Para encontrar las entidades en las que price es inferior a 100.

        +
        filter = 'price < 100'​
        +
        +
        +

        Ejemplo 5: Filtrado con mayor o igual que (>=)

        Si desea encontrar todas las entidades con rating mayor o igual a 4.

        +
        filter = 'rating >= 4'​
        +
        +
        +

        Ejemplo 6: Filtrado con menor o igual que (<=)

        Para encontrar entidades con discount menor o igual que 10%.

        +
        filter = 'discount <= 10'​
        +
        +
        +

        Operadores de rango

        Los operadores de rango ayudan a filtrar datos basándose en conjuntos o rangos de valores específicos.

        +

        Operadores de rango admitidos.

          +
        • IN: Se utilizan para buscar valores dentro de un conjunto o rango específico.

        • +
        • LIKE: Se utiliza para coincidir con un patrón (principalmente para campos de texto).

        • +
        +

        Ejemplo 1: Uso de IN para buscar varios valores

        Si desea encontrar todas las entidades en las que color sea "rojo", "verde" o "azul".

        +
        filter = 'color in ["red", "green", "blue"]'​
        +
        +
        +

        Esto es útil cuando se quiere comprobar la pertenencia a una lista de valores.

        +

        Ejemplo 2: Utilización de LIKE para la búsqueda de patrones

        El operador LIKE se utiliza para la comparación de patrones en campos de cadena. Puede coincidir con subcadenas en distintas posiciones dentro del texto: como prefijo, infijo o sufijo. El operador LIKE utiliza el símbolo % como comodín, que puede coincidir con cualquier número de caracteres (incluido el cero).

        +

        Coincidencia de prefijo (empieza por)

        Para realizar una coincidencia de prefijo, en la que la cadena comienza con un patrón determinado, puede colocar el patrón al principio y utilizar % para que coincida con los caracteres que le siguen. Por ejemplo, para buscar todos los productos cuyo name empiece por "Prod".

        +
        filter = 'name LIKE "Prod%"'​
        +
        +
        +

        Esto coincidirá con cualquier producto cuyo nombre empiece por "Prod", como "Producto A", "Producto B", etc.

        +

        Coincidencia de sufijo (termina con)

        Para una coincidencia de sufijo, en la que la cadena termina con un patrón dado, coloque el símbolo % al principio del patrón. Por ejemplo, para buscar todos los productos cuyo name termine en "XYZ".

        +
        filter = 'name LIKE "%XYZ"'​
        +
        +
        +

        Esto coincidirá con cualquier producto cuyo nombre termine en "XYZ", como "ProductXYZ", "SampleXYZ", etc.

        +

        Coincidencia infija (contiene)

        Para realizar una coincidencia infija, en la que el patrón puede aparecer en cualquier lugar de la cadena, puede colocar el símbolo % tanto al principio como al final del patrón. Por ejemplo, para buscar todos los productos cuyo name contenga la palabra "Pro".

        +
        filter = 'name LIKE "%Pro%"'​
        +
        +
        +

        Esto coincidirá con cualquier producto cuyo nombre contenga la subcadena "Pro", como "Product", "ProLine" o "SuperPro".

        +

        Operadores aritméticos

        Los operadores aritméticos le permiten crear condiciones basadas en cálculos que implican campos numéricos.

        +

        Operadores aritméticos admitidos.

          +
        • + (Suma)

        • +
        • - (Resta)

        • +
        • * (Multiplicación)

        • +
        • / (División)

        • +
        • % (Módulo)

        • +
        • ** (Exponenciación)

        • +
        +

        Ejemplo 1: Utilización de la suma (+)

        Para encontrar entidades en las que el precio total es la suma de base_price y tax.

        +
        filter = 'total == base_price + tax'​
        +
        +
        +

        Ejemplo 2: Sustracción (-)

        Para encontrar entidades donde quantity es mayor que 50 y quantity_sold es menor que 30.

        +
        filter = 'quantity - quantity_sold > 50'​
        +
        +
        +

        Ejemplo 3: Multiplicación (*)

        Para encontrar entidades donde price es mayor que 100 y quantity es mayor que 10, multiplicado.

        +
        filter = 'price * quantity > 1000'​
        +
        +
        +

        Ejemplo 4: Uso de la división (/)

        Para encontrar productos donde total_price dividido por quantity es menor que 50.

        +
        filter = 'total_price / quantity < 50'​
        +
        +
        +

        Ejemplo 5: Uso del módulo (%)

        Para encontrar entidades donde id es un número par (es decir, divisible por 2).

        +
        filter = 'id % 2 == 0'​
        +
        +
        +

        Ejemplo 6: Uso de la exponenciación (**)

        Para encontrar entidades donde price elevado a la potencia de 2 es mayor que 1000.

        +
        filter = 'price ** 2 > 1000'​
        +
        +
        +

        Operadores lógicos

        Los operadores lógicos se utilizan para combinar varias condiciones en una expresión de filtro más compleja. Entre ellos se incluyen AND, OR y NOT.

        +

        Operadores lógicos admitidos.

          +
        • AND: Combina varias condiciones que deben ser todas verdaderas.

        • +
        • OR: Combina condiciones donde al menos una debe ser verdadera.

        • +
        • NOT: Niega una condición.

        • +
        +

        Ejemplo 1: Uso de AND para combinar condiciones

        Para encontrar todos los productos donde price es mayor que 100 y stock es mayor que 50.

        +
        filter = 'price > 100 AND stock > 50'​
        +
        +
        +

        Ejemplo 2: Uso de OR para combinar condiciones

        Para encontrar todos los productos donde color es "rojo" o "azul".

        +
        filter = 'color == "red" OR color == "blue"'​
        +
        +
        +

        Ejemplo 3: Uso de NOT para excluir una condición

        Para encontrar todos los productos donde color no es "verde".

        +
        filter = 'NOT color == "green"'​
        +
        +
        +

        Consejos sobre el uso de operadores básicos con campos JSON y ARRAY

        Aunque los operadores básicos de Milvus son versátiles y pueden aplicarse a campos escalares, también pueden utilizarse eficazmente con las claves y los índices de los campos JSON y ARRAY.

        +

        Por ejemplo, si tiene un campo product que contiene múltiples claves como price, model, y tags, siempre haga referencia a la clave directamente.

        +
        filter = 'product["price"] > 1000'​
        +
        +
        +

        Para buscar registros en los que la primera temperatura de una matriz de temperaturas registradas supere un valor determinado, utilice.

        +
        filter = 'history_temperatures[0] > 30'​
        +
        +
        +

        Conclusión

        Milvus ofrece una serie de operadores básicos que le proporcionan flexibilidad a la hora de filtrar y consultar sus datos. Combinando operadores de comparación, de rango, aritméticos y lógicos, puede crear potentes expresiones de filtrado para acotar los resultados de búsqueda y recuperar los datos que necesita de forma eficaz.

        diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..fc2b98865 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"Explicación del filtrado","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"Operadores básicos","href":"Basic-operators​","type":2,"isActive":false},{"label":"Plantillas de expresiones de filtrado","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"Operadores específicos de tipos de datos","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..fa5092f0a --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,147 @@ +--- +id: boolean.md +summary: >- + Milvus proporciona potentes funciones de filtrado que permiten una consulta + precisa de sus datos. Las expresiones de filtrado le permiten dirigirse a + campos escalares específicos y refinar los resultados de la búsqueda con + diferentes condiciones. Esta guía explica cómo utilizar las expresiones de + filtrado en Milvus, con ejemplos centrados en las operaciones de consulta. + También puede aplicar estos filtros en solicitudes de búsqueda y eliminación. +title: Explicación del filtrado +--- +

        Explicación del filtrado

        Milvus proporciona potentes capacidades de filtrado que permiten una consulta precisa de sus datos. Las expresiones de filtrado le permiten dirigirse a campos escalares específicos y refinar los resultados de la búsqueda con diferentes condiciones. Esta guía explica cómo utilizar las expresiones de filtrado en Milvus, con ejemplos centrados en las operaciones de consulta. También puede aplicar estos filtros en solicitudes de búsqueda y eliminación.

        +

        Operadores básicos

        Milvus admite varios operadores básicos para filtrar datos.

        +
          +
        • Operadores de comparación: ==, !=, >, <, >=, y <= permiten filtrar basándose en campos numéricos, de texto o de fecha.

        • +
        • Filtros de rango: IN y LIKE ayudan a coincidir con rangos o conjuntos de valores específicos.

        • +
        • Operadores aritméticos: +, -, *, /, %, y ** se utilizan para cálculos que implican campos numéricos.

        • +
        • Operadores lógicos: AND, OR, y NOT combinan múltiples condiciones en expresiones complejas.

        • +
        +

        Ejemplo: Filtrar por color

        Para encontrar entidades con colores primarios (rojo, verde o azul) en un campo escalar color, utilice la siguiente expresión de filtro.

        +
        filter='color in ["red", "green", "blue"]'​
        +
        +
        +

        Ejemplo: Filtrado de campos JSON

        Milvus permite referenciar claves en campos JSON. Por ejemplo, si tiene un campo JSON product con las claves price y model, y desea encontrar productos con un modelo específico y un precio inferior a 1.850, utilice esta expresión de filtro.

        +
        filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
        +
        +
        +

        Ejemplo: Filtrado de campos de matriz

        Si tiene un campo de matriz history_temperatures que contiene registros de temperatura y desea encontrar observatorios en los que la décima temperatura registrada supere los 23°C, utilice esta expresión.

        +
        filter='history_temperatures[10] > 23'​
        +
        +
        +

        Para obtener más información sobre estos operadores básicos, consulte Operadores básicos.

        +

        Plantillas de expresiones de filtrado

        Al filtrar utilizando caracteres CJK, el procesamiento puede ser más complejo debido a sus mayores conjuntos de caracteres y diferencias de codificación. Esto puede dar lugar a un rendimiento más lento, especialmente con el operador IN.

        +

        Milvus introduce plantillas de expresiones de filtrado para optimizar el rendimiento cuando se trabaja con caracteres CJK. Al separar los valores dinámicos de la expresión de filtro, el motor de consulta gestiona la inserción de parámetros de forma más eficiente.

        +

        Ejemplo

        Para buscar personas mayores de 25 años que vivan en "北京" (Pekín) o "上海" (Shanghai), utilice la siguiente expresión de plantilla.

        +
        filter = "age > 25 AND city IN ['北京', '上海']"​
        +
        +
        +

        Para mejorar el rendimiento, utilice esta variación con parámetros.

        +
        filter = "age > {age} AND city in {city}",​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        Este enfoque reduce la sobrecarga de análisis sintáctico y mejora la velocidad de consulta. Para obtener más información, consulte Plantillas de filtros.

        +

        Operadores específicos de tipos de datos

        Milvus proporciona operadores de filtrado avanzados para tipos de datos específicos, como los campos JSON, ARRAY y VARCHAR.

        +

        Operadores específicos de campo JSON

        Milvus ofrece operadores avanzados para consultar campos JSON, permitiendo un filtrado preciso dentro de estructuras JSON complejas.

        +

        **JSON_CONTAINS(identifier, jsonExpr)**: Comprueba si existe una expresión JSON en el campo.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains(tags, "sale")'​
        +
        +
        +

        **JSON_CONTAINS_ALL(identifier, jsonExpr)**: Comprueba que todos los elementos de la expresión JSON están presentes.

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        **JSON_CONTAINS_ANY(identifier, jsonExpr)**: Filtra las entidades en las que existe al menos un elemento en la expresión JSON.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        Para obtener más información sobre los operadores JSON, consulte Operadores JSON.

        +

        Operadores específicos de campo ARRAY

        Milvus proporciona operadores de filtrado avanzados para campos de array, como ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY, y ARRAY_LENGTH, que permiten un control detallado de los datos de array.

        +

        **ARRAY_CONTAINS**: Filtra entidades que contienen un elemento específico.

        +
        filter="ARRAY_CONTAINS(history_temperatures, 23)"​
        +
        +
        +

        **ARRAY_CONTAINS_ALL**: Filtra entidades en las que están presentes todos los elementos de una lista.

        +
        filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_CONTAINS_ANY**: Filtra entidades que contienen cualquier elemento de la lista.

        +
        filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_LENGTH**: Filtra en función de la longitud de la matriz.

        +
        filter="ARRAY_LENGTH(history_temperatures) < 10"​
        +
        +
        +

        Para obtener más información sobre los operadores de matrices, consulte Operadores ARRAY.

        +

        Operadores específicos de campo VARCHAR

        El operador **Text_Match** permite recuperar documentos con precisión basándose en términos de consulta específicos. Es especialmente útil para búsquedas filtradas que combinan filtros escalares con búsquedas de similitud vectorial. A diferencia de las búsquedas semánticas, Text Match se centra en las ocurrencias exactas de los términos.

        +

        Milvus utiliza Tantivy para soportar la indexación invertida y la búsqueda de texto basada en términos. El proceso implica.

        +
          +
        1. Analizador: Tokeniza y procesa el texto de entrada.

        2. +
        3. Indexación: Crea un índice invertido que asigna tokens únicos a documentos.

        4. +
        +

        Para más información, consulte Text Match.

        diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..5e67fea3c --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"Plantillas de filtro","href":"Filter-Templating​","type":1,"isActive":false},{"label":"Descripción general","href":"Overview​","type":2,"isActive":false},{"label":"Operaciones de búsqueda","href":"Search-Operations​","type":2,"isActive":false},{"label":"Operaciones de consulta","href":"Query-Operations​","type":2,"isActive":false},{"label":"Operaciones de eliminación","href":"Delete-Operations​","type":2,"isActive":false},{"label":"Conclusión","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..b58163ab2 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,156 @@ +--- +id: filtering-templating.md +summary: >- + En Milvus, las expresiones de filtro complejas con numerosos elementos, + especialmente las que implican caracteres no ASCII como los caracteres CJK, + pueden afectar significativamente al rendimiento de la consulta. Para + solucionar este problema, Milvus introduce un mecanismo de plantillas de + expresiones de filtro diseñado para mejorar la eficacia reduciendo el tiempo + empleado en analizar expresiones complejas. Esta página explica el uso de + plantillas de expresiones de filtro en operaciones de búsqueda, consulta y + eliminación. +title: Filtrado Plantillas +--- +

        Plantillas de filtro

        En Milvus, las expresiones de filtro complejas con numerosos elementos, especialmente las que implican caracteres no ASCII como los caracteres CJK, pueden afectar significativamente al rendimiento de la consulta. Para solucionar este problema, Milvus introduce un mecanismo de plantillas de expresiones de filtro diseñado para mejorar la eficacia reduciendo el tiempo empleado en analizar expresiones complejas. Esta página explica el uso de plantillas de expresiones de filtro en operaciones de búsqueda, consulta y eliminación.

        +

        Descripción general

        Las plantillas de expresiones de filtrado permiten crear expresiones de filtrado con marcadores de posición que pueden sustituirse dinámicamente por valores durante la ejecución de la consulta. El uso de plantillas permite evitar la incrustación de matrices de gran tamaño o expresiones complejas directamente en el filtro, lo que reduce el tiempo de análisis y mejora el rendimiento de las consultas.

        +

        Supongamos que tiene una expresión de filtro que incluye dos campos, age y city, y desea encontrar a todas las personas cuya edad sea superior a 25 años y que vivan en "北京" (Pekín) o "上海" (Shanghái). En lugar de incrustar directamente los valores en la expresión del filtro, puede utilizar una plantilla.

        +
        filter = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        Aquí, {age} y {city} son marcadores de posición que se sustituirán por los valores reales en filter_params cuando se ejecute la consulta.

        +

        El uso de plantillas de expresión de filtro en Milvus tiene varias ventajas clave.

        +
          +
        • Reducción del tiempo de análisis: Al sustituir expresiones de filtro grandes o complejas por marcadores de posición, el sistema emplea menos tiempo en analizar y procesar el filtro.

        • +
        • Mejora del rendimiento de las consultas: Al reducirse la sobrecarga de análisis sintáctico, mejora el rendimiento de las consultas, lo que se traduce en mayores QPS y tiempos de respuesta más rápidos.

        • +
        • Escalabilidad: A medida que sus conjuntos de datos crecen y las expresiones de filtro se vuelven más complejas, la creación de plantillas garantiza que el rendimiento siga siendo eficiente y escalable.

        • +
        +

        Operaciones de búsqueda

        Para las operaciones de búsqueda en Milvus, la expresión filter se utiliza para definir la condición de filtrado, y el parámetro filter_params se utiliza para especificar los valores de los marcadores de posición. El diccionario filter_params contiene los valores dinámicos que Milvus utilizará para sustituir en la expresión de filtrado.

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.search(​
        +    "hello_milvus",​
        +    vectors[:nq],​
        +    filter=expr,​
        +    limit=10,​
        +    output_fields=["age", "city"],​
        +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
        +    filter_params=filter_params,​
        +)​
        +
        +
        +

        En este ejemplo, Milvus sustituirá dinámicamente {age} por 25 y {city} por ["北京", "上海"] al ejecutar la búsqueda.

        +

        Operaciones de consulta

        El mismo mecanismo de plantillas puede aplicarse a las operaciones de consulta en Milvus. En la función query, se define la expresión de filtro y se utiliza filter_params para especificar los valores a sustituir.

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.query(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    output_fields=["age", "city"],​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        Utilizando filter_params, Milvus maneja eficientemente la inserción dinámica de valores, mejorando la velocidad de ejecución de la consulta.

        +

        Operaciones de eliminación

        También puede utilizar plantillas de expresiones de filtrado en operaciones de eliminación. De forma similar a la búsqueda y la consulta, la expresión filter define las condiciones y filter_params proporciona los valores dinámicos para los marcadores de posición.

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.delete(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        Este enfoque mejora el rendimiento de las operaciones de eliminación, especialmente cuando se trata de condiciones de filtro complejas.

        +

        Conclusión

        Las plantillas de expresiones de filtro son una herramienta esencial para optimizar el rendimiento de las consultas en Milvus. Utilizando marcadores de posición y el diccionario filter_params, puede reducir significativamente el tiempo empleado en analizar expresiones de filtro complejas. Esto conduce a una ejecución más rápida de la consulta y a un mejor rendimiento general.

        diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..a4f935b30 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"Operadores JSON","href":"JSON-Operators​","type":1,"isActive":false},{"label":"Operadores JSON disponibles","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_CONTAINS_ALL","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"JSON_COTAINS_ANY","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..2edbe7784 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,122 @@ +--- +id: json-operators.md +summary: >- + Milvus admite operadores avanzados para consultar y filtrar campos JSON, lo + que los hace perfectos para gestionar datos complejos y estructurados. Estos + operadores permiten una consulta altamente efectiva de documentos JSON, + permitiéndole recuperar entidades basadas en elementos específicos, valores o + condiciones dentro de los campos JSON. Esta sección le guiará a través del uso + de operadores específicos JSON en Milvus, proporcionando ejemplos prácticos + para ilustrar su funcionalidad. +title: Operadores JSON +--- +

        Operadores JSON

        Milvus soporta operadores avanzados para consultar y filtrar campos JSON, haciéndolos perfectos para gestionar datos complejos y estructurados. Estos operadores permiten una consulta altamente efectiva de documentos JSON, permitiéndole recuperar entidades basadas en elementos específicos, valores o condiciones dentro de los campos JSON. Esta sección le guiará a través del uso de operadores específicos JSON en Milvus, proporcionando ejemplos prácticos para ilustrar su funcionalidad.

        +
        +

        Los campos JSON no pueden manejar estructuras anidadas complejas y tratan todas las estructuras anidadas como cadenas simples. Por lo tanto, cuando se trabaja con campos JSON, es aconsejable evitar el anidamiento excesivamente profundo y asegurarse de que sus estructuras de datos son tan planas como sea posible para un rendimiento óptimo.

        +
        +

        Operadores JSON disponibles

        Milvus proporciona varios potentes operadores JSON que ayudan a filtrar y consultar datos JSON, y estos operadores son.

        + +

        Exploremos estos operadores con ejemplos para ver cómo se pueden aplicar en situaciones reales.

        +

        JSON_CONTAINS

        El operador json_contains comprueba si existe un elemento o subarray específico dentro de un campo JSON. Es útil cuando quieres asegurarte de que un array u objeto JSON contiene un valor concreto.

        +

        Ejemplo

        +

        Imagine que tiene una colección de productos, cada uno con un campo tags que contiene una matriz JSON de cadenas, como ["electronics", "sale", "new"]. Quiere filtrar los productos que tienen la etiqueta "sale".

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains(tags, "sale")'​
        +
        +
        +

        En este ejemplo, Milvus devolverá todos los productos cuyo campo tags contenga el elemento "sale".

        +

        JSON_CONTAINS_ALL

        El operador json_contains_all garantiza que todos los elementos de una expresión JSON especificada estén presentes en el campo de destino. Resulta especialmente útil cuando es necesario buscar múltiples valores dentro de una matriz JSON.

        +

        Ejemplo

        +

        Siguiendo con el escenario de las etiquetas de producto, si desea encontrar todos los productos que tengan las etiquetas "electronics", "sale", y "new", puede utilizar el operador json_contains_all.

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        Esta consulta devolverá todos los productos cuya matriz tags contenga los tres elementos especificados: "electronics", "sale", y "new".

        +

        JSON_COTAINS_ANY

        El operador json_contains_any filtra las entidades en las que existe al menos un miembro de la expresión JSON dentro del campo. Resulta útil cuando se desea buscar entidades en función de uno de varios valores posibles.

        +

        Ejemplo

        +

        Supongamos que desea filtrar productos que tengan al menos una de las etiquetas "electronics", "sale", o "new". Puede utilizar el operador json_contains_any para conseguirlo.

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        En este caso, Milvus le devolverá todos los productos que tengan al menos una de las etiquetas de la lista ["electronics", "new", "clearance"]. Incluso si un producto sólo tiene una de estas etiquetas, se incluirá en el resultado.

        diff --git a/localization/v2.5.x/site/es/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/es/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..1a85834e8 --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"Visión general","href":"Overview","type":2,"isActive":false},{"label":"Inicio","href":"Home","type":2,"isActive":false},{"label":"Colecciones","href":"Collections","type":2,"isActive":false},{"label":"Consulta","href":"Query","type":2,"isActive":false},{"label":"Datos","href":"Data","type":2,"isActive":false},{"label":"Tareas","href":"Tasks","type":2,"isActive":false},{"label":"Solicitudes lentas","href":"Slow-requests","type":2,"isActive":false},{"label":"Configuraciones","href":"Configurations","type":2,"isActive":false},{"label":"Herramientas","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/es/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/es/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..8f177567e --- /dev/null +++ b/localization/v2.5.x/site/es/userGuide/tools/milvus-webui.md @@ -0,0 +1,279 @@ +--- +id: milvus-webui.md +summary: >- + Milvus Web UI es una herramienta de gestión gráfica para Milvus. Mejora la + observabilidad del sistema con una interfaz sencilla e intuitiva. Puede +title: Milvus WebUI +--- +

        Milvus WebUI

        Milvus Web UI es una herramienta de gestión gráfica para Milvus. Mejora la observabilidad del sistema con una interfaz sencilla e intuitiva. Puede utilizar Milvus Web UI para observar las estadísticas y métricas de los componentes y dependencias de Milvus, comprobar los detalles de la base de datos y la colección, y listar las configuraciones detalladas de Milvus.

        +

        Visión general

        Milvus Web UI difiere de Birdwatcher y Attu en que es una herramienta incorporada para proporcionar una observabilidad general del sistema con una interfaz sencilla e intuitiva.

        +

        La siguiente tabla compara las características de Milvus Web UI y Birdwatcher/Attu:

        + + + + + + + + + + + +
        CaracterísticaMilvus Web UIBirdwatcherAttu
        Forma operativaGUICLIGUI
        Usuarios objetivoResponsables de mantenimiento, desarrolladoresResponsablesDesarrolladores
        InstalaciónIntegrado enHerramienta independienteHerramienta independiente
        DependenciasMilvusMilvus / etcdMilvus
        Funciones principalesEntorno de ejecución, detalles de la base de datos/colección, segmentos, canales, tareas y solicitudes de consultas lentasInspección de metadatos y ejecución de la API de MilvusGestión de bases de datos y tareas operativas
        +

        Milvus Web UI proporciona las siguientes funciones:

        +

        + + Milvus Web UI overview + Visión general de Milvus Web UI

        +
          +
        • Inicio

          +

          Puede encontrar información sobre la instancia de Milvus que se está ejecutando actualmente, sus componentes, los clientes conectados y las dependencias.

        • +
        • Colecciones

          +

          Puede ver la lista de bases de datos y colecciones actualmente en Milvus y comprobar sus detalles.

        • +
        • Consulta

          +

          Puede ver las estadísticas recopiladas de los nodos de consulta y los coordinadores de consulta en términos de segmentos, canales, réplicas y grupos de recursos.

        • +
        • Datos

          +

          Puede ver las estadísticas recopiladas de los nodos de datos en términos de segmentos y canales.

        • +
        • Tareas

          +

          Puede ver la lista de tareas que se ejecutan en Milvus, incluidas las tareas del programador de Querycoord, las tareas de compactación, las tareas de creación de índices, las tareas de importación y las tareas de sincronización de datos.

        • +
        • Peticiones lentas

          +

          Puede ver la lista de peticiones lentas en Milvus, incluyendo el tipo de petición, la duración de la petición y los parámetros de la petición.

        • +
        • Configuraciones

          +

          Puede ver la lista de configuraciones de Milvus y sus valores.

        • +
        • Herramientas

          +

          Puede acceder a las dos herramientas integradas, pprof y la herramienta de visualización de datos de Milvus, desde la interfaz web.

        • +
        +

        Inicio

        En la página de Inicio, puede encontrar la siguiente información:

        +

        + + Milvus Web UI Home + Inicio de Milvus Web UI

        +
          +
        • Información del sistema: Ver información del sistema, incluida información sobre el modo de despliegue, la imagen utilizada en el despliegue e información relacionada.

        • +
        • Información del componente: Ver el estado y las métricas de los componentes en Milvus, incluyendo el estado y las métricas de los nodos de consulta, nodos de datos, nodos de índice, coordinadores y proxies.

        • +
        • Clientes conectados: Vea los clientes conectados y su información, incluido el tipo y la versión del SDK, el nombre de usuario y su historial de acceso.

        • +
        • Dependencias del sistema: Vea el estado y las métricas de las dependencias de Milvus, incluidos el estado y las métricas del metaalmacén, la cola de mensajes y el almacenamiento de objetos.

        • +
        +

        Colecciones

        En la página Colecciones, puede ver la lista de bases de datos y colecciones actualmente en Milvus y comprobar sus detalles.

        +

        + + Milvus Web UI Collections + Colecciones de Milvus Web UI

        +
          +
        • Base de datos: Vea la lista de bases de datos actualmente en Milvus y sus detalles.

        • +
        • Colecciones: Ver la lista de colecciones en cada base de datos y sus detalles.

        • +
        +

        Consulta

        + + Milvus Web UI Query Page + Página de consulta de la interfaz web de Milvus

        +
          +
        • Segmentos: Ver la lista de segmentos y sus detalles, incluido el ID del segmento, la colección correspondiente, el estado, el tamaño, etc.

          +

          En la columna Desde, puede encontrar la fuente del segmento. Los posibles indicadores de origen son los siguientes

          +
            +
          • QN: Nodo de consulta

          • +
          • CT: Objetivo actual en QueryCoord

          • +
          • NT: Objetivo siguiente en QueryCoord

          • +
          • DIST: Distribución en QueryCoord

          • +
        • +
        • Canales: Vea la lista de canales y sus detalles, incluido el nombre del canal, las colecciones correspondientes, etc.

          +

          En la columna Desde, puede encontrar la fuente del segmento. Los posibles indicadores de origen son los siguientes

          +
            +
          • QN: Nodo de consulta

          • +
          • CT: Objetivo actual en QueryCoord

          • +
          • NT: Objetivo siguiente en QueryCoord

          • +
          • DIST: Distribución en QueryCoord

          • +
        • +
        • Réplicas: Ver la lista de réplicas y sus detalles, incluyendo el ID de la réplica, la colección correspondiente, etc.

        • +
        • Grupos de recursos: Ver la lista de grupos de recursos y sus detalles, incluyendo el nombre del grupo de recursos, el número de nodos de consulta en el grupo, y sus configuraciones, etc.

        • +
        +

        Datos

        + + Milvus Web UI Data Page + Página de datos de Milvus Web UI

        +
          +
        • Segmentos: Ver la lista de segmentos de los nodos de datos/coordinadores y sus detalles, incluido el ID del segmento, la colección correspondiente, el estado, el tamaño, etc.

        • +
        • Canales: Vea la lista de canales de los nodos/coordinadores de datos y sus detalles, incluido el nombre del canal, las colecciones correspondientes, etc.

        • +
        +

        Tareas

        + + Milvus Web UI Tasks Page + Página de tareas de Milvus Web UI

        +
          +
        • Tareas: Ver la lista de tareas en ejecución en Milvus, incluyendo el tipo de tarea, estado y acciones.

          +
            +
          • Tareas QueryCoord: Ver todas las tareas del programador QueryCoord, incluidos los verificadores de equilibrador, índice/segmento/canal/líder en los últimos 15 minutos.

          • +
          • Tareas decompactación: Ver todas las tareas de compactación de los coordinadores de datos en los últimos 15 minutos.

          • +
          • Tareas decreación de índices: Ver todas las tareas de creación de índices de los coordinadores de datos en los últimos 30 minutos.

          • +
          • Tareas deimportación: Ver todas las tareas de importación de los coordinadores de datos en los últimos 30 minutos.

          • +
          • Tareas desincronización de datos: Ver todas las tareas de sincronización de datos de los nodos de datos en los últimos 15 minutos.

          • +
        • +
        +

        Solicitudes lentas

        + + Milvus Web UI Slow Requests Page + Página de solicitudes lentas de Milvus Web UI

        +
          +
        • Peticiones lentas: Una solicitud lenta es una búsqueda o una consulta que tiene una latencia superior al valor de proxy.slowQuerySpanInSeconds especificado en la configuración. La lista de peticiones lentas muestra todas las peticiones lentas de los últimos 15 minutos.
        • +
        +

        Configuraciones

        + + Milvus Web UI Configurations Page + Página de configuraciones de Milvus Web UI

        +
          +
        • Configuraciones: Vea la lista de configuraciones de tiempo de ejecución de Milvus y sus valores.
        • +
        +

        Herramientas

          +
        • pprof: Acceda a la herramienta pprof para perfilar y depurar Milvus.

        • +
        • Herramienta de visualización de datos de Milvus: Acceda a la herramienta de visualización de datos de Milvus para visualizar los datos en Milvus.

        • +
        diff --git a/localization/v2.5.x/site/fr/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/fr/adminGuide/config_jaeger_tracing.md index 87c6b5006..ec89d5e3a 100644 --- a/localization/v2.5.x/site/fr/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/fr/adminGuide/config_jaeger_tracing.md @@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
        -

        2. Déployer Jager

        La manière la plus simple de créer une instance de Jaeger est de créer un fichier YAML comme dans l'exemple suivant. Cela installera la stratégie AllInOne par défaut, qui déploie l'image tout-en-un (combinant jaeger-agent, jaeger-collector, jaeger-query, et Jaeger UI) dans un seul pod, en utilisant le stockage en mémoire par défaut.

        +

        2. Déployer Jaeger

        La manière la plus simple de créer une instance de Jaeger est de créer un fichier YAML comme dans l'exemple suivant. Cela installera la stratégie AllInOne par défaut, qui déploie l'image tout-en-un (combinant jaeger-agent, jaeger-collector, jaeger-query, et Jaeger UI) dans un seul pod, en utilisant le stockage en mémoire par défaut.

        Si vous souhaitez stocker des traces pendant une longue période, veuillez vous référer à production-strategy.

        apiVersion: jaegertracing.io/v1
         kind: Jaeger
        diff --git a/localization/v2.5.x/site/fr/adminGuide/configure-docker.json b/localization/v2.5.x/site/fr/adminGuide/configure-docker.json
        index dffab2a61..46a74efc1 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/configure-docker.json
        +++ b/localization/v2.5.x/site/fr/adminGuide/configure-docker.json
        @@ -1 +1 @@
        -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurer Milvus avec Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Télécharger un fichier de configuration","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modifier le fichier de configuration","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Télécharger un fichier d'installation","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modifier le fichier d'installation","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Démarrer Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurer Milvus avec Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Télécharger un fichier de configuration","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modifier le fichier de configuration","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Télécharger un fichier d'installation","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modifier le fichier d'installation","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Démarrer Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/fr/adminGuide/configure-docker.md b/localization/v2.5.x/site/fr/adminGuide/configure-docker.md
        index f0e5d7ce3..5483fef38 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/configure-docker.md
        +++ b/localization/v2.5.x/site/fr/adminGuide/configure-docker.md
        @@ -38,8 +38,8 @@ Dans la version actuelle, tous les paramètres ne prennent effet qu'après le re
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        Téléchargez milvus.yaml directement ou à l'aide de la commande suivante.

        -
        $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
        +    

        Téléchargez milvus.yaml directement ou à l'aide de la commande suivante.

        +
        $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
         

        Modifier le fichier de configuration

        Téléchargez le fichier d'installation de Milvus standalone et enregistrez-le sous docker-compose.yml.

        +

        Téléchargez le fichier d'installation de Milvus standalone et enregistrez-le sous docker-compose.yml.

        Vous pouvez également exécuter la commande suivante.

        # For Milvus standalone
        -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
        +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
         

        Modifier le fichier d'installation

        Pour garantir la sécurité des données, il est recommandé de supprimer les utilisateurs et les rôles qui ne sont plus utilisés. Ce guide explique comment supprimer des utilisateurs et des rôles.

        +

        Supprimer un utilisateur

        L'exemple suivant montre comment supprimer l'utilisateur user_1.

        +
        +

        L'utilisateur root ne peut pas être supprimé.

        +
        + +
        from pymilvus import MilvusClient​
        +​
        +client = MilvusClient(​
        +    uri="http://localhost:19530",​
        +    token="root:Milvus"​
        +)​
        +​
        +# create a user​
        +client.drop_user(user_name="user_1")​
        +
        +
        +
        import io.milvus.v2.client.ConnectConfig​
        +import io.milvus.v2.client.MilvusClientV2​
        +import io.milvus.v2.service.rbac.request.DropUserReq​
        +​
        +ConnectConfig connectConfig = ConnectConfig.builder()​
        +        .uri("http://localhost:19530")​
        +        .token("root:Milvus")​
        +        .build();​
        +        ​
        +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
        +​
        +DropUserReq dropUserReq = DropUserReq.builder()​
        +        .userName("user_1")​
        +        .build();​
        +client.dropUser(dropUserReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +const address = "http://localhost:19530";​
        +const token = "root:Milvus";​
        +const client = new MilvusClient({address, token});​
        +​
        +milvusClient.deleteUser({​
        +    username: 'user_1'​
        +})​
        +
        +
        +
        export CLUSTER_ENDPOINT="http://localhost:19530"​
        +export TOKEN="root:Milvus"​
        +​
        +curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1"​
        +}'​
        +
        +
        +

        Une fois l'utilisateur supprimé, vous pouvez dresser la liste de tous les utilisateurs existants pour vérifier si l'opération de suppression a réussi.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_users()​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.listUsersReq​
        +​
        +List<String> resp = client.listUsers();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.listUsers()​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Voici un exemple de résultat. Il n'y a pas de user_1 dans la liste. L'opération d'abandon est réussie.

        +
        ['root']​
        +
        +
        +

        Abandonner un rôle

        L'exemple suivant montre comment supprimer le rôle role_a.

        +
        +

        Le rôle intégré admin ne peut pas être supprimé.

        +
        + +
        from pymilvus import MilvusClient​
        +​
        +client.drop_role(role_name="role_a")​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.DropRoleReq​
        +​
        +DropRoleReq dropRoleReq = DropRoleReq.builder()​
        +        .roleName("role_a")​
        +        .build();​
        +client.dropRole(dropRoleReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.dropRole({​
        +   roleName: 'role_a',​
        + })​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "roleName": "role_a"​
        +}'​
        +
        +
        +

        Une fois le rôle supprimé, vous pouvez dresser la liste de tous les rôles existants pour vérifier si l'opération de suppression a réussi.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_roles()​
        +
        +
        +
        List<String> resp = client.listRoles();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.listRoles(​
        +    includeUserInfo: True​
        +)​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Voici un exemple de résultat. Il n'y a pas de role_a dans la liste. L'opération de suppression est réussie.

        +
        ['admin']​
        +
        +
        diff --git a/localization/v2.5.x/site/fr/adminGuide/grant_privileges.json b/localization/v2.5.x/site/fr/adminGuide/grant_privileges.json new file mode 100644 index 000000000..ea3e99b3e --- /dev/null +++ b/localization/v2.5.x/site/fr/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"Octroi de privilèges ou de groupes de privilèges à des rôles","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"Octroi d'un privilège ou d'un groupe de privilèges à un rôle","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"Décrire un rôle","href":"Describe-a-role","type":2,"isActive":false},{"label":"Révoquer un privilège ou un groupe de privilèges d'un rôle","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/grant_privileges.md b/localization/v2.5.x/site/fr/adminGuide/grant_privileges.md new file mode 100644 index 000000000..1b0bbc8f0 --- /dev/null +++ b/localization/v2.5.x/site/fr/adminGuide/grant_privileges.md @@ -0,0 +1,543 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: >- + Une fois qu'un rôle est créé, vous pouvez lui accorder des privilèges. Ce + guide explique comment accorder des privilèges ou des groupes de privilèges à + un rôle. +title: Octroi de privilèges ou de groupes de privilèges à des rôles +--- +

        Octroi de privilèges ou de groupes de privilèges à des rôles

        Une fois qu'un rôle est créé, vous pouvez lui accorder des privilèges. Ce guide explique comment accorder des privilèges ou des groupes de privilèges à un rôle.

        +

        Octroi d'un privilège ou d'un groupe de privilèges à un rôle

        Milvus 2.5 introduit une nouvelle version de l'API qui rationalise l'opération d'octroi. Il n'est plus nécessaire de rechercher le type d'objet lors de l'octroi d'un privilège à un rôle. Voici les paramètres et les explications correspondantes.

        +
          +
        • role_name : Le nom du rôle cible auquel le(s) privilège(s) ou le(s) groupe(s) de privilèges doit(vent) être accordé(s).

        • +
        • Ressource: La ressource cible d'un privilège, qui peut être une instance, une base de données ou une collection spécifique. Le tableau suivant explique comment spécifier la ressource dans la méthode client.grantV2().

        • +
        +

        Niveau

        +

        Ressource

        +

        Méthode d'octroi

        +

        Notes

        +

        Collecte

        +

        +

        Une collection spécifique

        +

        +

        client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

        +

        Saisissez le nom de votre collection cible et le nom de la base de données à laquelle la collection cible appartient.

        +

        +

        Toutes les collections d'une base de données spécifique

        +

        client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

        +

        Saisissez le nom de votre base de données cible et un caractère générique `*` comme nom de collection.

        +

        **Base de données**

        +

        Une base de données spécifique

        +

        client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

        +

        Saisissez le nom de votre base de données cible et un caractère générique `*` comme nom de collection.

        +

        +

        Toutes les bases de données de l'instance actuelle

        +

        client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

        +

        Saisissez `*` comme nom de base de données et `*` comme nom de collection.

        +

        **Instance**

        +

        L'instance actuelle

        +

        client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

        +

        Saisissez `*` comme nom de base de données et `*` comme nom de collection.

        +
        +
          +
        • Privilège: Le privilège spécifique ou le groupe de privilèges que vous devez accorder à un rôle. Actuellement, Milvus propose 56 types de privilèges que vous pouvez accorder. Le tableau ci-dessous répertorie les privilèges dans Milvus.

          +

          +

          La colonne "type" du tableau ci-dessous est utilisée pour faciliter la recherche rapide des privilèges et n'est utilisée qu'à des fins de classification. Lors de l'octroi de privilèges, il n'est pas nécessaire de comprendre les types. Il vous suffit de saisir les privilèges correspondants.

          +

        • +
        +

        **Type **

        +

        **Privilège**

        +

        **Description

        +

        **Description de l'API correspondante du côté du client.

        +

        Privilèges relatifs aux bases de données

        +

        Liste des bases de données

        +

        Affiche toutes les bases de données de l'instance actuelle

        +

        [ListDatabases](https://milvus.io/docs/manage_databases.md)

        +

        DescribeDatabase

        +

        Affiche les détails d'une base de données

        +

        [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

        +

        CreateDatabase (Créer une base de données)

        +

        Créer une base de données

        +

        [CreateDatabase](https://milvus.io/docs/manage_databases.md)

        +

        DropDatabase

        +

        Supprimer une base de données

        +

        [DropDatabase](https://milvus.io/docs/manage_databases.md)

        +

        AlterDatabase

        +

        Modifier les propriétés d'une base de données

        +

        [AlterDatabase](https://milvus.io/docs/manage_databases.md)

        +

        Privilèges de collecte

        +

        +

        GetFlushState

        +

        Vérifier l'état de l'opération de vidage de la collection

        +

        [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

        +

        GetLoadState

        +

        Vérifie l'état de chargement d'une collection

        +

        [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

        +

        GetLoadingProgress

        +

        Vérifier la progression du chargement d'une collection

        +

        [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

        +

        ShowCollections

        +

        Afficher toutes les collections avec les privilèges de collection

        +

        [ShowCollections](https://milvus.io/docs/view-collections.md)

        +

        ListAliases

        +

        Affiche tous les alias d'une collection

        +

        [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

        +

        DescribeCollection

        +

        Affiche les détails d'une collection

        +

        [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

        +

        DescribeAlias

        +

        Affiche les détails d'un alias

        +

        [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

        +

        Obtenir des statistiques

        +

        Obtenir les statistiques d'une collection (par exemple, le nombre d'entités dans une collection).

        +

        [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

        +

        CreateCollection (Créer une collection)

        +

        Créer une collection

        +

        [CreateCollection](https://milvus.io/docs/create-collection.md)

        +

        DropCollection

        +

        Déposer une collection

        +

        [DropCollection](https://milvus.io/docs/drop-collection.md)

        +

        Charger

        +

        Charger une collection

        +

        [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

        +

        Libération

        +

        Libérer une collection

        +

        [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

        +

        Flush

        +

        +

        Persiste toutes les entités d'une collection dans un segment scellé. Toute entité insérée après l'opération de vidage sera stockée dans un nouveau segment.

        +

        [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

        +

        Compactage

        +

        Déclencher manuellement le compactage

        +

        [Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

        +

        Renommer une collection

        +

        Renommer une collection

        +

        [RenameCollection](https://milvus.io/docs/modify-collection.md)

        +

        CreateAlias

        +

        Créer un alias pour une collection

        +

        [CreateAlias](https://milvus.io/docs/manage-aliases.md)

        +

        DropAlias

        +

        Supprimer l'alias d'une collection

        +

        [DropAlias](https://milvus.io/docs/manage-aliases.md)

        +

        FlushAll

        +

        Vide toutes les collections d'une base de données

        +

        [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

        +

        Privilèges des partitions

        +

        HasPartition

        +

        Vérifier l'existence d'une partition

        +

        [HasPartition](https://milvus.io/docs/manage-partitions.md)

        +

        ShowPartitions

        +

        Afficher toutes les partitions d'une collection

        +

        [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

        +

        Créer une partition

        +

        Créer une partition

        +

        [CreatePartition](https://milvus.io/docs/manage-partitions.md)

        +

        Déposer une partition

        +

        Déposer une partition

        +

        [DropPartition](https://milvus.io/docs/manage-partitions.md)

        +

        Privilèges de l'index

        +

        Détails de l'index

        +

        Voir les détails d'un index

        +

        +

        [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

        +

        Créer un index

        +

        Créer un index

        +

        [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

        +

        DropIndex

        +

        Supprimer un index

        +

        [DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

        +

        Privilèges de gestion des ressources

        +

        +

        Équilibre de charge

        +

        Réaliser l'équilibre de la charge

        +

        [LoadBalance](https://milvus.io/docs/resource_group.md)

        +

        CreateResourceGroup

        +

        Créer un groupe de ressources

        +

        [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

        +

        DropResourceGroup

        +

        Supprimer un groupe de ressources

        +

        [DropResourceGroup](https://milvus.io/docs/resource_group.md)

        +

        UpdateResourceGroups (Mise à jour des groupes de ressources)

        +

        Mettre à jour un groupe de ressources

        +

        [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

        +

        DescribeResourceGroup

        +

        Affiche les détails d'un groupe de ressources

        +

        [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

        +

        ListResourceGroups

        +

        Affiche tous les groupes de ressources de l'instance actuelle

        +

        [ListResourceGroups](https://milvus.io/docs/resource_group.md)

        +

        TransferNode

        +

        Transférer des nœuds entre les groupes de ressources

        +

        [TransferNode](https://milvus.io/docs/resource_group.md)

        +

        TransferReplica

        +

        Transférer les répliques entre les groupes de ressources

        +

        [TransferReplica](https://milvus.io/docs/resource_group.md)

        +

        BackupRBAC

        +

        Créer une sauvegarde de toutes les opérations liées à RBAC dans l'instance courante.

        +

        BackupRBAC

        +

        RestoreRBAC

        +

        Restaurer une sauvegarde de toutes les opérations liées à RBAC dans l'instance actuelle

        +

        RestoreRBAC

        +

        Privilèges de l'entité

        +

        +

        Requête

        +

        Effectuer une requête

        +

        [Requête](https://milvus.io/docs/get-and-scalar-query.md)

        +

        Recherche

        +

        Effectuer une recherche

        +

        [Recherche](https://milvus.io/docs/single-vector-search.md)

        +

        Insérer

        +

        Insérer des entités

        +

        [Insérer](https://milvus.io/docs/insert-update-delete.md)

        +

        Supprimer

        +

        Supprimer des entités

        +

        [Supprimer](https://milvus.io/docs/delete-entities.md)

        +

        Insérer

        +

        Insérer des entités

        +

        [Upsert](https://milvus.io/docs/upsert-entities.md)

        +

        Importer

        +

        Insérer ou importer des entités en masse

        +

        [BulkInsert/Import](https://milvus.io/docs/import-data.md)

        +

        Privilèges RBAC

        +

        Créer un propriétaire

        +

        Créer un utilisateur ou un rôle

        +

        Créer un utilisateurou un rôle [CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

        +

        UpdateUser

        +

        Mettre à jour le mot de passe d'un utilisateur

        +

        [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

        +

        DropOwnership

        +

        Supprimer le mot de passe d'un utilisateur ou d'un rôle

        +

        [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

        +

        Sélectionner la propriété

        +

        Afficher tous les utilisateurs auxquels un rôle spécifique a été attribué

        +

        [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

        +

        ManageOwnership

        +

        Gérer un utilisateur ou un rôle ou accorder un rôle à un utilisateur

        +

        [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

        +

        SelectUser

        +

        Voir tous les rôles accordés à un utilisateur

        +

        [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

        +

        CreatePrivilegeGroup

        +

        Créer un groupe de privilèges

        +

        [CreatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +

        DropPrivilegeGroup

        +

        Supprimer un groupe de privilèges

        +

        [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +

        ListPrivilegeGroups

        +

        Affiche tous les groupes de privilèges dans l'instance actuelle

        +

        [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +

        OperatePrivilegeGroup

        +

        Ajouter ou supprimer des privilèges à un groupe de privilèges

        +

        [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

        +
        +

        L'exemple suivant montre comment accorder le privilège PrivilegeSearch à collection_01 sous la base de données par défaut ainsi qu'un groupe de privilèges nommé privilege_group_1 au rôle role_a.

        + +
        from pymilvus import MilvusClient
        +
        +client = MilvusClient(
        +    uri="http://localhost:19530",
        +    token="root:Milvus"
        +)
        +
        +client.grant_privilege_v2(
        +    role_name="role_a",
        +    privilege="Search"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +    
        +client.grant_privilege_v2(
        +    role_name="role_a",
        +    privilege="privilege_group_1"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +
        +client.grant_privilege_v2(
        +    role_name="role_a",
        +    privilege="ClusterReadOnly"
        +    collection_name='*'
        +    db_name='*',
        +)
        +
        +
        import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
        +
        +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("Search")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("privilege_group_1")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("ClusterReadOnly")
        +        .collectionName("*")
        +        .dbName("*")
        +        .build());
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"
        +
        +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
        +
        +const address = "http://localhost:19530";
        +const token = "root:Milvus";
        +const client = new MilvusClient({address, token});
        +
        +await milvusClient.grantPrivilege({
        +   roleName: 'role_a',
        +   object: 'Collection', 
        +   objectName: 'collection_01',
        +   privilegeName: 'Search'
        + });
        +
        +
        curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "Search",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "privilege_group_1",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "ClusterReadOnly",
        +    "collectionName": "*",
        +    "dbName":"*"
        +}'
        +
        +

        Décrire un rôle

        L'exemple suivant montre comment afficher les privilèges accordés au rôle role_a à l'aide de la méthode describe_role.

        + +
        from pymilvus import MilvusClient
        +
        +client.describe_role(role_name="role_a")
        +
        +
        import io.milvus.v2.service.rbac.response.DescribeRoleResp;
        +import io.milvus.v2.service.rbac.request.DescribeRoleReq
        +
        +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
        +        .roleName("role_a")
        +        .build();
        +DescribeRoleResp resp = client.describeRole(describeRoleReq);
        +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"
        +
        +client.ListRoles(context.Background())
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
        +
        +await milvusClient.describeRole({roleName: 'role_a'});
        +
        +
        curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a"
        +}'
        +
        +

        Voici un exemple de résultat.

        +
        {
        +     "role": "role_a",
        +     "privileges": [
        +         {
        +             "collection_name": "collection_01",
        +             "db_name": "default",
        +             "role_name": "role_a",
        +             "privilege": "Search",
        +             "grantor_name": "root"
        +         },
        +         "privilege_group_1"
        +     ]
        +}
        +
        +

        Révoquer un privilège ou un groupe de privilèges d'un rôle

        L'exemple suivant montre comment révoquer le privilège PrivilegeSearch sur collection_01 sous la base de données par défaut ainsi que le groupe de privilèges privilege_group_1 qui ont été accordés au rôle role_a.

        + +
        from pymilvus import MilvusClient
        +
        +client = MilvusClient(
        +    uri="http://localhost:19530",
        +    token="root:Milvus"
        +)
        +
        +client.revoke_privilege_v2(
        +    role_name="role_a",
        +    privilege="Search"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +    
        +client.revoke_privilege_v2(
        +    role_name="role_a",
        +    privilege="privilege_group_1"
        +    collection_name='collection_01'
        +    db_name='default',
        +)
        +
        +client.revoke_privilege_v2(
        +    role_name="role_a",
        +    privilege="ClusterReadOnly"
        +    collection_name='*'
        +    db_name='*',
        +)
        +
        +
        import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
        +
        +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("Search")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("privilege_group_1")
        +        .collectionName("collection_01")
        +        .dbName("default")
        +        .build());
        +
        +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
        +        .roleName("role_a")
        +        .privilege("ClusterReadOnly")
        +        .collectionName("*")
        +        .dbName("*")
        +        .build());
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"
        +
        +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
        +
        +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
        +
        +
        curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "Search",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "Search",
        +    "collectionName": "collection_01",
        +    "dbName":"default"
        +}'
        +
        +curl --request POST \
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
        +--header "Authorization: Bearer ${TOKEN}" \
        +--header "Content-Type: application/json" \
        +-d '{
        +    "roleName": "role_a",
        +    "privilege": "ClusterReadOnly",
        +    "collectionName": "*",
        +    "dbName":"*"
        +}'
        +
        diff --git a/localization/v2.5.x/site/fr/adminGuide/grant_roles.json b/localization/v2.5.x/site/fr/adminGuide/grant_roles.json new file mode 100644 index 000000000..f5abbc9c2 --- /dev/null +++ b/localization/v2.5.x/site/fr/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"Attribution de rôles aux utilisateurs","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"Attribution d'un rôle à un utilisateur","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"Décrire l'utilisateur","href":"Describe-user​","type":2,"isActive":false},{"label":"Révoquer un rôle","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/grant_roles.md b/localization/v2.5.x/site/fr/adminGuide/grant_roles.md new file mode 100644 index 000000000..48b5fb646 --- /dev/null +++ b/localization/v2.5.x/site/fr/adminGuide/grant_roles.md @@ -0,0 +1,204 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + Après avoir créé un rôle et lui avoir accordé des privilèges, vous pouvez + attribuer le rôle à des utilisateurs afin qu'ils puissent accéder aux + ressources et effectuer les actions définies par le rôle. Vous pouvez + attribuer plusieurs rôles à un utilisateur ou attribuer un rôle à plusieurs + utilisateurs. Ce guide explique comment attribuer des rôles aux utilisateurs. +title: Attribution de rôles aux utilisateurs +--- +

        Attribution de rôles aux utilisateurs

        Après avoir créé un rôle et lui avoir accordé des privilèges, vous pouvez attribuer le rôle aux utilisateurs afin qu'ils puissent accéder aux ressources et effectuer les actions définies par le rôle. Vous pouvez attribuer plusieurs rôles à un utilisateur ou attribuer un rôle à plusieurs utilisateurs. Ce guide explique comment attribuer des rôles aux utilisateurs.

        +

        L'utilisateur intégré root dans Milvus s'est déjà vu attribuer le rôle admin, qui dispose de tous les privilèges. Il n'est pas nécessaire de lui attribuer d'autres rôles.

        +

        Attribution d'un rôle à un utilisateur

        L'exemple suivant montre comment attribuer le rôle role_a à l'utilisateur user_1.

        + +
        from pymilvus import MilvusClient​
        +​
        +client = MilvusClient(​
        +    uri="http://localhost:19530",​
        +    token="root:Milvus"​
        +)​
        +​
        +client.grant_role(user_name="user_1", role_name="role_a")​
        +
        +
        +
        import io.milvus.v2.client.ConnectConfig;​
        +import io.milvus.v2.client.MilvusClientV2;​
        +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
        +​
        +String CLUSTER_ENDPOINT = "http://localhost:19530";​
        +String TOKEN = "root:Milvus";​
        +​
        +​
        +ConnectConfig connectConfig = ConnectConfig.builder()​
        +    .uri(CLUSTER_ENDPOINT)​
        +    .token(TOKEN)​
        +    .build();​
        +    ​
        +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
        +​
        +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
        +        .roleName("role_a")​
        +        .userName("user_1")​
        +        .build();​
        +client.grantRole(grantRoleReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +const address = "http://localhost:19530";​
        +const token = "root:Milvus";​
        +const client = new MilvusClient({address, token});​
        +​
        +milvusClient.grantRole({​
        +   username: 'user_1',​
        +   roleName: 'role_a'​
        + })​
        +
        +
        +
        export CLUSTER_ENDPOINT="http://localhost:19530"​
        +export TOKEN="root:Milvus"​
        +​
        +curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "roleName": "role_a",​
        +    "userName": "user_1"​
        +}'​
        +
        +
        +

        Décrire l'utilisateur

        Une fois que vous avez attribué un rôle à un utilisateur, vous pouvez vérifier si l'opération d'attribution a réussi via la méthode describe_user().

        +

        L'exemple suivant montre comment vérifier le(s) rôle(s) de l'utilisateur user_1.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.describe_user(user_name="user_1")​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.DescribeUserReq;​
        +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
        +​
        +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
        +        .userName("user_1")​
        +        .build();​
        +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +milvusClient.describeUser({username: 'user_1'})​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1"​
        +}'​
        +
        +
        +

        Vous trouverez ci-dessous un exemple de résultat.

        +
        {'user_name': 'user_1', 'roles': 'role_a'}​
        +
        +
        +

        Révoquer un rôle

        Vous pouvez également révoquer un rôle attribué à un utilisateur.

        +

        L'exemple suivant montre comment révoquer le rôle role_a attribué à l'utilisateur user_1.

        + +
        from pymilvus import MilvusClient​
        +​
        +client.revoke_role(​
        +    user_name='user_1',​
        +    role_name='role_a'​
        +)​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
        +​
        +client.revokeRole(RevokeRoleReq.builder()​
        +        .userName("user_1")​
        +        .roleName("role_a")​
        +        .build());​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1",​
        +    "roleName": "role_a"​
        +}'​
        +
        +
        diff --git a/localization/v2.5.x/site/fr/adminGuide/privilege_group.json b/localization/v2.5.x/site/fr/adminGuide/privilege_group.json new file mode 100644 index 000000000..d1b2c5a9d --- /dev/null +++ b/localization/v2.5.x/site/fr/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"Créer un groupe de privilèges","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"Groupe de privilèges et privilèges","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"Groupes de privilèges intégrés","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"Procédures","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/privilege_group.md b/localization/v2.5.x/site/fr/adminGuide/privilege_group.md new file mode 100644 index 000000000..dcb82388d --- /dev/null +++ b/localization/v2.5.x/site/fr/adminGuide/privilege_group.md @@ -0,0 +1,491 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: >- + Pour rationaliser le processus d'octroi des privilèges, il est recommandé de + regrouper plusieurs privilèges dans un groupe de privilèges. +title: Créer un groupe de privilèges +--- +

        Créer un groupe de privilèges

        Pour rationaliser le processus d'octroi des privilèges, il est recommandé de regrouper plusieurs privilèges dans un groupe de privilèges.

        +

        Groupe de privilèges et privilèges

        Un groupe de privilèges se compose de plusieurs privilèges.

        +

        + + Privilege group illustrated + Illustration d'un groupe de privilèges

        +

        Comme le montre la figure ci-dessus, supposons que vous deviez accorder trois privilèges différents à un rôle.

        +
          +
        • Si vous n'utilisez pas de groupe de privilèges, vous devez accorder les privilèges trois fois.

        • +
        • Si vous utilisez un groupe de privilèges, il vous suffit de créer un groupe de privilèges, d'y ajouter les trois privilèges et d'accorder le groupe de privilèges au rôle A.

        • +
        +

        L'utilisation d'un groupe de privilèges permet d'accorder plusieurs privilèges en bloc à un rôle.

        +

        Groupes de privilèges intégrés

        Pour faciliter l'utilisation, Milvus fournit un total de 9 privilèges intégrés au niveau de la collection, de la base de données et de l'instance : COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW et Cluster_Admin.

        +
        +

        Les trois niveaux de groupes de privilèges intégrés n'ont pas de relation en cascade. La définition d'un groupe de privilèges au niveau de l'instance ne définit pas automatiquement les autorisations pour toutes les bases de données et collections de cette instance. Les privilèges au niveau de la base de données et de la collection doivent être définis manuellement.

        +
        +

        Les tableaux suivants expliquent les privilèges inclus dans chacun des groupes de privilèges intégrés.

        +

        Niveau de collection

          +
        • COLL_RO: comprend les privilèges de lecture des données de la collection.

        • +
        • COLL_RW: comprend les privilèges de lecture et d'écriture des données de la collection.

        • +
        • COLL_ADMIN: comprend les privilèges de lecture et d'écriture des données de collecte et de gestion des collections.

        • +
        +

        Le tableau ci-dessous répertorie les privilèges spécifiques inclus dans les trois groupes de privilèges intégrés au niveau de la collecte.

        +

        **Privilège**

        +

        CollecteLectureSeulement** **CollectionReadOnly**

        +

        **CollecteLectureEcriture**

        +

        **Administrateur de collection

        +

        Requête

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        Recherche

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        Détails de l'index

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        GetFlushState

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        GetLoadState

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        GetLoadingProgress

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        HasPartition

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        ShowPartitions

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        ListAliases

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        DescribeCollection

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        DescribeAlias

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        Obtenir des statistiques

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        CreateIndex

        +

        +

        ✔️

        +

        ✔️

        +

        DropIndex

        +

        +

        ✔️

        +

        ✔️

        +

        CreatePartition

        +

        +

        ✔️

        +

        ✔️

        +

        DropPartition

        +

        +

        ✔️

        +

        ✔️

        +

        Chargement

        +

        +

        ✔️

        +

        ✔️

        +

        Release

        +

        +

        ✔️

        +

        ✔️

        +

        Insert

        +

        +

        ✔️

        +

        ✔️

        +

        Supprimer

        +

        +

        ✔️

        +

        ✔️

        +

        Upsert

        +

        +

        ✔️

        +

        ✔️

        +

        Importation

        +

        +

        ✔️

        +

        ✔️

        +

        Flush

        +

        +

        ✔️

        +

        ✔️

        +

        Compaction

        +

        +

        ✔️

        +

        ✔️

        +

        Équilibre des charges

        +

        +

        ✔️

        +

        ✔️

        +

        CreateAlias

        +

        +

        +

        ✔️

        +

        DropAlias

        +

        +

        +

        ✔️

        +
        +

        Niveau de la base de données

          +
        • DB_RO: comprend les privilèges de lecture des données de la base de données

        • +
        • DB_RW: comprend les privilèges de lecture et d'écriture des données de la base de données.

        • +
        • DB_Admin: comprend les privilèges de lecture et d'écriture des données de la base et de gestion des bases de données.

        • +
        +

        Le tableau ci-dessous répertorie les privilèges spécifiques inclus dans les trois groupes de privilèges intégrés au niveau de la base de données.

        +

        **Privilège**

        +

        **Lecture de la base de données uniquement **Lecture de la base de données en écriture

        +

        Base de données en lecture seule** **Base de données en lecture-écriture**

        +

        **Base de donnéesAdmin**

        +

        Afficher les collections

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        DescribeDatabase

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        CreateCollection

        +

        +

        +

        ✔️

        +

        DropCollection

        +

        +

        +

        ✔️

        +

        AlterDatabase

        +

        +

        ✔️

        +

        ✔️

        +
        +

        Niveau du cluster

          +
        • Cluster_RO: inclut les privilèges de lecture des données d'instance

        • +
        • Cluster_RW: comprend les privilèges de lecture et d'écriture des données d'instance.

        • +
        • Cluster_Admin: comprend les privilèges de lecture et d'écriture des données d'instance et de gestion des instances.

        • +
        +

        Le tableau ci-dessous répertorie les privilèges spécifiques inclus dans les trois groupes de privilèges intégrés au niveau de l'instance.

        +

        **Privilège**

        +

        ClusterReadOnly **ClusterReadWrite**

        +

        ClusterReadWrite **ClusterReadOnly **ClusterReadWrite **ClusterAdmin **ClusterAdmin

        +

        **ClusterAdmin**

        +

        ListDatabases

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        RenameCollection

        +

        +

        +

        ✔️

        +

        Créer une propriété

        +

        +

        +

        ✔️

        +

        UpdateUser

        +

        +

        +

        ✔️

        +

        DropOwnership

        +

        +

        +

        ✔️

        +

        Sélectionner la propriété

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        Gérer la propriété

        +

        +

        +

        ✔️

        +

        SelectUser

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        BackupRBAC

        +

        +

        +

        ✔️

        +

        RestoreRBAC

        +

        +

        +

        ✔️

        +

        Créer un groupe de ressources

        +

        +

        +

        ✔️

        +

        DropResourceGroup

        +

        +

        +

        ✔️

        +

        UpdateResourceGroups

        +

        +

        ✔️

        +

        ✔️

        +

        DescribeResourceGroup

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        ListResourceGroups

        +

        ✔️

        +

        ✔️

        +

        ✔️

        +

        TransferNode

        +

        +

        ✔️

        +

        ✔️

        +

        TransferReplica

        +

        +

        ✔️

        +

        ✔️

        +

        CreateDatabase

        +

        +

        +

        ✔️

        +

        DropDatabase

        +

        +

        +

        ✔️

        +

        FlushAll

        +

        +

        ✔️

        +

        ✔️

        +

        CreatePrivilegeGroup

        +

        +

        +

        ✔️

        +

        DropPrivilegeGroup

        +

        +

        +

        ✔️

        +

        ListPrivilegeGroups

        +

        +

        +

        ✔️

        +

        OperatePrivilegeGroup

        +

        +

        +

        ✔️

        +
        +

        Procédures

        Vous pouvez créer un groupe de privilèges, puis ajouter des privilèges au groupe de privilèges.

        +

        Création d'un groupe de privilèges

        L'exemple suivant montre comment créer un groupe d'autorisations d'accès nommé privilege_group_1.

        + +
        from pymilvus import MilvusClient​
        +client.create_privileg_group(group_name='privilege_group_1')​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
        +​
        +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1"​
        +}'​
        +
        +
        +

        Ajouter des privilèges à un groupe de privilèges

        L'exemple suivant montre comment ajouter les privilèges PrivilegeBackupRBAC et PrivilegeRestoreRBAC au groupe de privilèges privilege_group_1 qui vient d'être créé.

        + +
        from pymilvus import MilvusClient​
        +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
        +​
        +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .privileges(Arrays.asList("Query", "Search"))​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1",​
        +    "privileges":["Query", "Search"]​
        +}'​
        +
        +
        +

        Supprimer des privilèges d'un groupe de privilèges

        L'exemple suivant montre comment supprimer le privilège PrivilegeRestoreRBAC du groupe de privilèges privilege_group_1.

        + +
        from pymilvus import MilvusClient​
        +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
        +​
        +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .privileges(Collections.singletonList("Search"))​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1",​
        +    "privileges":["Search"]​
        +}'​
        +
        +
        +

        Répertorier les groupes de privilèges

        L'exemple suivant montre comment dresser la liste de tous les groupes de privilèges existants.

        + +
        from pymilvus import MilvusClient​
        +client.list_privilege_groups()​
        +
        +
        +
        import io.milvus.v2.service.rbac.PrivilegeGroup;​
        +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
        +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
        +​
        +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
        +        .build());​
        +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.ListPrivilegeGroups(context.Background())​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        Voici un exemple de résultat.

        +
        PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
        +
        +
        +

        Supprimer un groupe de privilèges

        L'exemple suivant montre comment supprimer le groupe de privilèges privilege_group_1.

        + +
        from pymilvus import MilvusClient​
        +client.drop_privilege_group(group_name='privilege_group_1')​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
        +​
        +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
        +        .groupName("privilege_group_1")​
        +        .build());​
        +
        +
        +
        import "github.com/milvus-io/milvus-sdk-go/v2/client"​
        +​
        +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "privilegeGroupName":"privilege_group_1"​
        +}'​
        +
        +
        diff --git a/localization/v2.5.x/site/fr/adminGuide/rbac.json b/localization/v2.5.x/site/fr/adminGuide/rbac.json index 310ba5ff9..cc55f0e1a 100644 --- a/localization/v2.5.x/site/fr/adminGuide/rbac.json +++ b/localization/v2.5.x/site/fr/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"Activer RBAC","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Lancer un client Milvus pour établir une connexion","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. Créer un utilisateur","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. Créez un rôle","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. Accorder un privilège à un rôle","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. Accorder un rôle à un utilisateur","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. Révoquer des privilèges","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBAC expliqué","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"Concepts clés de RBAC","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"Procédures","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/rbac.md b/localization/v2.5.x/site/fr/adminGuide/rbac.md index 10c070c71..27ca7107c 100644 --- a/localization/v2.5.x/site/fr/adminGuide/rbac.md +++ b/localization/v2.5.x/site/fr/adminGuide/rbac.md @@ -1,10 +1,14 @@ --- id: rbac.md related_key: enable RBAC -summary: 'Apprendre à gérer les utilisateurs, les rôles et les privilèges.' -title: Activer RBAC +summary: >- + Le RBAC (Role-Based Access Control) est une méthode de contrôle d'accès basée + sur les rôles. Avec le RBAC, vous pouvez contrôler finement les opérations que + les utilisateurs peuvent effectuer au niveau de la collection, de la base de + données et de l'instance, ce qui renforce la sécurité des données. +title: RBAC expliqué --- -

        Activer RBAC

        En activant RBAC, vous pouvez contrôler l'accès à des ressources Milvus spécifiques (par exemple, une collection ou une partition) ou les autorisations en fonction du rôle et des privilèges de l'utilisateur. Actuellement, cette fonctionnalité n'est disponible qu'en Python et Java.

        -

        Cette rubrique décrit comment activer RBAC et gérer les utilisateurs et les rôles.

        -
        -

        Les extraits de code de cette page utilisent le nouveau MilvusClient (Python) pour interagir avec Milvus. De nouveaux SDK MilvusClient pour d'autres langages seront publiés dans de futures mises à jour.

        -
        -

        1. Lancer un client Milvus pour établir une connexion

        Le RBAC (Role-Based Access Control) est une méthode de contrôle d'accès basée sur les rôles. Avec le RBAC, vous pouvez contrôler finement les opérations que les utilisateurs peuvent effectuer au niveau de la collection, de la base de données et de l'instance, ce qui renforce la sécurité des données.

        +

        Contrairement aux modèles traditionnels de contrôle d'accès des utilisateurs, le RBAC introduit le concept de rôles. Dans le modèle RBAC, vous accordez des privilèges à des rôles, puis vous accordez ces rôles à des utilisateurs. Les utilisateurs peuvent ensuite obtenir des privilèges.

        +

        Le modèle RBAC peut améliorer l'efficacité de la gestion du contrôle d'accès. Par exemple, si plusieurs utilisateurs ont besoin du même ensemble de privilèges, il n'est pas nécessaire de définir manuellement les privilèges de chaque utilisateur. Au lieu de cela, vous pouvez créer un rôle et l'attribuer aux utilisateurs. Si vous souhaitez modifier les privilèges de ces utilisateurs, il vous suffit de modifier les privilèges du rôle et la modification sera appliquée à tous les utilisateurs ayant ce rôle.

        +

        Concepts clés de RBAC

        Après avoir activé l'authentification utilisateur, connectez-vous à votre instance Milvus à l'aide de token qui se compose d'un nom d'utilisateur et d'un mot de passe. Par défaut, Milvus utilise l'utilisateur root avec le mot de passe Milvus.

        -
        from pymilvus import MilvusClient
        -
        -client = MilvusClient(
        -    uri='http://localhost:19530', # replace with your own Milvus server address
        -    token='root:Milvus' # replace with your own Milvus server token
        -)
        -
        -

        2. Créer un utilisateur

        Créez un utilisateur nommé user_1 avec le mot de passe P@ssw0rd:

        -
        client.create_user(
        -    user_name='user_1',
        -    password='P@ssw0rd'
        -)
        -
        -

        Après avoir créé un utilisateur, vous pouvez :

        -
          -
        • Mettre à jour le mot de passe d'un utilisateur. Vous devez fournir le mot de passe original et le nouveau mot de passe.
        • -
        -
        client.update_password(
        -    user_name='user_1',
        -    old_password='P@ssw0rd',
        -    new_password='P@ssw0rd123'
        -)
        -
        -
          -
        • Dresser la liste de tous les utilisateurs.
        • -
        -
        client.list_users()
        -
        -# output:
        -# ['root', 'user_1']
        -
        -
          -
        • Vérifier le rôle d'un utilisateur particulier.
        • -
        -
        client.describe_user(user_name='user_1')
        -
        -# output:
        -# {'user_name': 'user_1', 'roles': ()}
        -
        -

        3. Créez un rôle

        L'exemple suivant crée un rôle nommé roleA.

        -
        client.create_role(
        -    role_name="roleA",
        -)
        -
        -

        Après avoir créé un rôle, vous pouvez

        +

        + + Users, roles, and privileges + Utilisateurs, rôles et privilèges

        +

        Le modèle RBAC se compose de quatre éléments principaux.

          -
        • dresser la liste de tous les rôles.
        • +
        • **La ressource : **L'entité ressource à laquelle on peut accéder. Il existe trois niveaux de ressources dans Milvus - instance, base de données et collection.

        • +
        • **Privilège : **L'autorisation d'effectuer certaines opérations sur les ressources Milvus (par exemple, créer des collections, insérer des données, etc.)

        • +
        • **Groupe de privilèges : **Un groupe de privilèges multiples.

        • +
        • **Rôle : **Un rôle se compose de deux parties : les privilèges et les ressources. Les privilèges définissent le type d'opérations qu'un rôle peut effectuer, tandis que les ressources définissent les ressources cibles sur lesquelles les opérations peuvent être effectuées. Par exemple, le rôle d'administrateur de base de données peut effectuer des opérations de lecture, d'écriture et de gestion sur certaines bases de données.

        • +
        • **Utilisateur : **Un utilisateur est une personne qui utilise Milvus. Chaque utilisateur a un identifiant unique et se voit attribuer un ou plusieurs rôles.

        -
        client.list_roles()
        -
        -# output:
        -# ['admin', 'public', 'roleA']
        -
        -

        4. Accorder un privilège à un rôle

        L'exemple suivant montre comment accorder l'autorisation de rechercher toutes les collections au rôle nommé roleA.

        -

        L'adresse object_type spécifie le type d'objet, qui peut également être considéré comme le type de ressource. Actuellement, les valeurs valables sont Collection/User/Global, etc., où Global signifie qu'il n'y a pas de type de ressource spécifique. L'adresse object_name est le nom de la ressource. Si objecttypeest Collection, le nom de l'objet peut faire référence à un nom de collection spécifique, ou vous pouvez utiliser * pour spécifier toutes les collections. Sile type d'objet est Global, le nom de l'objet ne peut être spécifié que par *. Voir Utilisateurs et rôles pour connaître les autres types de privilèges que vous pouvez accorder.

        -

        Avant de gérer les privilèges des rôles, assurez-vous d'avoir activé l'authentification des utilisateurs. Dans le cas contraire, une erreur risque de se produire. Pour plus d'informations sur l'activation de l'authentification des utilisateurs, reportez-vous à la section Authentifier l'accès des utilisateurs.

        -
        # grant privilege to a role
        -
        -client.grant_privilege(
        -    role_name='roleA',
        -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
        -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
        -    privilege='SelectUser'
        -)
        -
        -

        Après avoir accordé un privilège à un rôle, vous pouvez

        -
          -
        • Afficher les privilèges accordés à un rôle.
        • -
        -
        client.describe_role(
        -    role_name='roleA'
        -)
        -
        -# output:
        -# {'role': 'roleA',
        -#  'privileges': [{'object_type': 'User',
        -#    'object_name': 'user_1',
        -#    'db_name': 'default',
        -#    'role_name': 'roleA',
        -#    'privilege': 'SelectUser',
        -#    'grantor_name': 'root'}]}
        -
        -

        5. Accorder un rôle à un utilisateur

        Accorder le rôle à un utilisateur afin que celui-ci puisse hériter de tous les privilèges du rôle.

        -
        # grant a role to a user
        -
        -client.grant_role(
        -    user_name='user_1',
        -    role_name='roleA'
        -)
        -
        -

        Après avoir accordé le rôle, vérifiez qu'il a bien été accordé :

        -
        client.describe_user(
        -    user_name='user_1'
        -)
        -
        -# output:
        -# {'user_name': 'user_1', 'roles': ('roleA')}
        -
        -

        6. Révoquer des privilèges

        -

        Soyez prudent lorsque vous effectuez les opérations suivantes, car elles sont irréversibles.

        -
        -
          -
        • Supprimer un privilège d'un rôle. Si vous révoquez un privilège qui n'a pas été accordé au rôle, une erreur se produit.
        • -
        -
        client.revoke_privilege(
        -    role_name='roleA',
        -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
        -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
        -    privilege='SelectUser'
        -)
        -
        -
          -
        • Supprimer un utilisateur d'un rôle. Si vous révoquez un rôle qui n'a pas été accordé à l'utilisateur, une erreur se produit.
        • -
        -
        client.revoke_role(
        -    user_name='user_1',
        -    role_name='roleA'
        -)
        -
        -
          -
        • Supprimer un rôle.
        • -
        -
        client.drop_role(role_name='roleA')
        -
        -
          -
        • Supprimer un utilisateur.
        • -
        -
        client.drop_user(user_name='user_1')
        -
        -

        Prochaines étapes

        +

        Pour réaliser le contrôle d'accès via RBAC, vous devez suivre les étapes ci-dessous.

        +
          +
        1. Créer un utilisateur: Outre l'utilisateur par défaut root dans Milvus, vous pouvez créer de nouveaux utilisateurs et définir des mots de passe pour protéger la sécurité des données.

        2. +
        3. Créer un rôle: Vous pouvez créer des rôles personnalisés en fonction de vos besoins. Les capacités spécifiques d'un rôle sont déterminées par ses privilèges.

        4. +
        5. Créer un groupe de privilèges: Combinez plusieurs privilèges en un seul groupe de privilèges afin de rationaliser le processus d'octroi de privilèges à un rôle.

        6. +
        7. Accorder des privilèges ou des groupes de privilèges à un rôle: Définir les capacités d'un rôle en lui accordant des privilèges ou des groupes de privilèges.

        8. +
        9. Attribuer des rôles aux utilisateurs: Accorder des rôles avec certains privilèges aux utilisateurs afin que ces derniers puissent bénéficier des privilèges d'un rôle. Un même rôle peut être attribué à plusieurs utilisateurs.

        10. +
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.json index 5ff8bf4be..2fcf06acb 100644 --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Mise à niveau du cluster Milvus avec Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Mise à niveau de Milvus en modifiant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migration des métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Suite de l'article","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Mise à niveau du cluster Milvus avec Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Mise à niveau de Milvus en modifiant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migration des métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Suite de l'article","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.md index 7251dc155..791734746 100644 --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: Mise à niveau du cluster Milvus avec Docker Compose >

        Cette rubrique décrit comment mettre à niveau votre Milvus à l'aide de Docker Compose.

        -

        Dans les cas normaux, vous pouvez mettre à niveau Milvus en modifiant son image. Cependant, vous devez migrer les métadonnées avant toute mise à niveau de la version 2.1.x vers la version 2.5.0-beta.

        +

        Dans les cas normaux, vous pouvez mettre à niveau Milvus en modifiant son image. Cependant, vous devez migrer les métadonnées avant toute mise à niveau de la version 2.1.x à la version 2.5.0.

        Mise à niveau de Milvus en modifiant son image

      • Exécutez les commandes suivantes pour effectuer la mise à niveau.

        docker compose down
        @@ -105,7 +105,7 @@ cmd:
           runWithBackup: true
         config:
           sourceVersion: 2.1.4   # Specify your milvus version
        -  targetVersion: 2.5.0-beta
        +  targetVersion: 2.5.0
           backupFilePath: /tmp/migration.bak
         metastore:
           type: etcd
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.json
        index 14d6252b0..4b8b30bdd 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.json
        +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.json
        @@ -1 +1 @@
        -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Mise à niveau du cluster Milvus avec les cartes Helm","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Vérifier la carte Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Effectuer une mise à niveau continue","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mise à niveau de Milvus à l'aide de Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Mise à niveau du cluster Milvus avec les cartes Helm","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Vérifier la carte Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Effectuer une mise à niveau continue","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mise à niveau de Milvus à l'aide de Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.md
        index 3390e481c..0d83a12b5 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.md
        +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-helm.md
        @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
         zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
         

        Vous pouvez choisir le chemin de mise à niveau pour votre Milvus comme suit :

        -
        - [Effectuer une mise à niveau continue](#conduct-a-rolling-upgrade) de Milvus v2.2.3 et versions ultérieures vers v2.5.0-beta.
        +
        - [Effectuer une mise à niveau continue](#conduct-a-rolling-upgrade) de Milvus v2.2.3 et versions ultérieures vers v2.5.0.

        Effectuer une mise à niveau continue

        Depuis Milvus 2.2.3, vous pouvez configurer les coordinateurs Milvus pour qu'ils fonctionnent en mode actif-veille et activer la fonction de mise à niveau continue pour eux, afin que Milvus puisse répondre aux demandes entrantes pendant les mises à niveau des coordinateurs. Dans les versions précédentes, les coordinateurs doivent être supprimés puis créés lors d'une mise à niveau, ce qui peut entraîner certains temps d'arrêt du service.

        -

        Les mises à niveau en continu exigent que les coordinateurs fonctionnent en mode actif-veille. Vous pouvez utiliser le script que nous fournissons pour configurer les coordinateurs afin qu'ils travaillent en mode veille active et lancer la mise à jour continue.

        +

        Les mises à niveau en continu exigent que les coordinateurs fonctionnent en mode actif-veille. Vous pouvez utiliser le script que nous fournissons pour configurer les coordinateurs afin qu'ils travaillent en mode de veille active et lancer la mise à jour continue.

        Basé sur les capacités de mise à jour continue fournies par Kubernetes, le script ci-dessus applique une mise à jour ordonnée des déploiements en fonction de leurs dépendances. En outre, Milvus met en œuvre un mécanisme garantissant que ses composants restent compatibles avec ceux qui en dépendent pendant la mise à niveau, ce qui réduit considérablement les temps d'arrêt potentiels des services.

        Le script s'applique uniquement à la mise à niveau de Milvus installé avec Helm. Le tableau suivant répertorie les drapeaux de commande disponibles dans les scripts.

        @@ -145,8 +145,8 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope
        oFonctionnementupdateFaux
        -

        Une fois que vous vous êtes assuré que tous les déploiements de votre instance Milvus sont dans leur état normal. Vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers 2.5.0-beta.

        -
        sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
        +

        Une fois que vous vous êtes assuré que tous les déploiements de votre instance Milvus sont dans leur état normal, vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers la version 2.5.0. Vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers 2.5.0.

        +
        sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
         
          diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.json index 20fa4449a..b5f0819a7 100644 --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Mise à niveau du cluster Milvus avec Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Mise à niveau de l'opérateur Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Effectuer une mise à niveau continue","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mettre à niveau Milvus en changeant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Mise à niveau du cluster Milvus avec Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Mise à niveau de l'opérateur Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Effectuer une mise à niveau en continu","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mettre à niveau Milvus en changeant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.md index 08ec96faa..ace5302d3 100644 --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,11 +46,11 @@ helm -n milvus-operator upgrade milvus-

        Une fois que vous avez mis à niveau votre opérateur Milvus vers la dernière version, vous avez le choix entre les options suivantes :

        -

        Effectuer une mise à niveau continue

      • Dans le fichier de configuration ci-dessus, définissez spec.components.enableRollingUpdate comme true et spec.components.image comme la version souhaitée de Milvus.

        Par défaut, Milvus effectue une mise à niveau continue pour les coordinateurs de manière ordonnée, c'est-à-dire qu'il remplace les images des pods des coordinateurs l'une après l'autre. Pour réduire le temps de mise à niveau, envisagez de définir spec.components.imageUpdateMode sur all afin que Milvus remplace toutes les images de pods en même temps.

        @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

        Vous pouvez définir spec.components.imageUpdateMode sur rollingDowngrade pour que Milvus remplace les images de pods coordinateurs par une version inférieure.

        apiVersion: milvus.io/v1beta1
        @@ -128,7 +128,7 @@ metadata:
         spec:
           # Omit other fields ...
           components:
        -   image: milvusdb/milvus:v2.5.0-beta
        +   image: milvusdb/milvus:v2.5.0
         

        Exécutez ensuite ce qui suit pour effectuer la mise à niveau :

        kubectl patch -f milvusupgrade.yaml
        @@ -148,8 +148,8 @@ spec:
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        Depuis Milvus 2.2.0, les métadonnées sont incompatibles avec celles des versions précédentes. Les exemples suivants supposent une mise à niveau de Milvus 2.1.4 vers Milvus 2.5.0-beta.

        -

        1. Création d'un fichier .yaml pour la migration des métadonnées

        Créer un fichier de migration des métadonnées. Voici un exemple. Vous devez spécifier les fichiers name, sourceVersion, et targetVersion dans le fichier de configuration. L'exemple suivant définit name en my-release-upgrade, sourceVersion en v2.1.4, et targetVersion en v2.5.0-beta. Cela signifie que votre cluster Milvus sera mis à niveau de la v2.1.4 à la v2.5.0-beta.

        +

        Depuis Milvus 2.2.0, les métadonnées sont incompatibles avec celles des versions précédentes. Les exemples suivants supposent une mise à niveau de Milvus 2.1.4 vers Milvus 2.5.0.

        +

        1. Création d'un fichier .yaml pour la migration des métadonnées

        Créer un fichier de migration des métadonnées. Voici un exemple. Vous devez spécifier les fichiers name, sourceVersion et targetVersion dans le fichier de configuration. L'exemple suivant définit name en my-release-upgrade, sourceVersion en v2.1.4, et targetVersion en v2.5.0. Cela signifie que votre cluster Milvus sera mis à niveau de la v2.1.4 à la v2.5.0.

        apiVersion: milvus.io/v1beta1
         kind: MilvusUpgrade
         metadata:
        @@ -159,9 +159,9 @@ spec:
             namespace: default
             name: my-release
           sourceVersion: "v2.1.4"
        -  targetVersion: "v2.5.0-beta"
        +  targetVersion: "v2.5.0"
           # below are some omit default values:
        -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
        +  # targetImage: "milvusdb/milvus:v2.5.0"
           # toolImage: "milvusdb/meta-migration:v2.2.0"
           # operation: upgrade
           # rollbackIfFailed: true
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.json
        index 23c946228..c7616f877 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.json
        +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.json
        @@ -1 +1 @@
        -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Mise à niveau de Milvus Standalone avec Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Mettre à niveau Milvus en modifiant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migration des métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Suite de l'article","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Mise à niveau de Milvus Standalone avec Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Mettre à niveau Milvus en modifiant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migration des métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Suite de l'article","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.md
        index c2174c1e4..f0d084fb5 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.md
        +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-docker.md
        @@ -24,9 +24,9 @@ title: Mise à niveau de Milvus Standalone avec Docker Compose
                 >
               
             

        Cette rubrique décrit comment mettre à niveau votre Milvus à l'aide de Docker Compose.

        -

        Dans les cas normaux, vous pouvez mettre à niveau Milvus en modifiant son image. Cependant, vous devez migrer les métadonnées avant toute mise à niveau de la version 2.1.x à la version 2.5.0-beta.

        +

        Dans les cas normaux, vous pouvez mettre à niveau Milvus en modifiant son image. Cependant, vous devez migrer les métadonnées avant toute mise à niveau de la version 2.1.x à la version 2.5.0.

        -

        Pour des raisons de sécurité, Milvus met à niveau son MinIO vers RELEASE.2023-03-20T20-16-18Z avec la publication de la v2.2.5. Avant toute mise à niveau à partir des versions précédentes de Milvus Standalone installées à l'aide de Docker Compose, vous devez créer un déploiement MinIO Single-Node Single-Drive et migrer les paramètres et le contenu MinIO existants vers le nouveau déploiement. Pour plus de détails, reportez-vous à ce guide.

        +

        Pour des raisons de sécurité, Milvus met à niveau son MinIO vers RELEASE.2023-03-20T20-16-18Z avec la sortie de la v2.2.5. Avant toute mise à niveau à partir des versions précédentes de Milvus Standalone installées à l'aide de Docker Compose, vous devez créer un déploiement MinIO Single-Node Single-Drive et migrer les paramètres et le contenu MinIO existants vers le nouveau déploiement. Pour plus de détails, reportez-vous à ce guide.

        Mettre à niveau Milvus en modifiant son image

      • Exécutez les commandes suivantes pour effectuer la mise à niveau.

        docker compose down
        @@ -83,7 +83,7 @@ cmd:
           runWithBackup: true
         config:
           sourceVersion: 2.1.4   # Specify your milvus version
        -  targetVersion: 2.5.0-beta
        +  targetVersion: 2.5.0
           backupFilePath: /tmp/migration.bak
         metastore:
           type: etcd
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.json
        index 7144d6b67..d787ee5f8 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.json
        +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.json
        @@ -1 +1 @@
        -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Mise à niveau de Milvus Standalone avec la carte Helm","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Vérifier la version de Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Effectuer une mise à niveau continue","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mise à niveau de Milvus à l'aide de Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Mise à niveau de Milvus Standalone avec la carte Helm","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Vérifier la version de Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Effectuer une mise à niveau continue","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mise à niveau de Milvus à l'aide de Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.md
        index e01591ea9..1396644f3 100644
        --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.md
        +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-helm.md
        @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
         zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
         

        Vous pouvez choisir le chemin de mise à niveau pour votre Milvus comme suit :

        -
        - [Effectuer une mise à niveau continue](#conduct-a-rolling-upgrade) de Milvus v2.2.3 et versions ultérieures vers v2.5.0-beta.
        +
        - [Effectuer une mise à niveau continue](#conduct-a-rolling-upgrade) de Milvus v2.2.3 et versions ultérieures vers v2.5.0.

        Effectuer une mise à niveau continue

        Depuis Milvus 2.2.3, vous pouvez configurer les coordinateurs Milvus pour qu'ils fonctionnent en mode actif-veille et activer la fonction de mise à niveau continue pour eux, afin que Milvus puisse répondre aux demandes entrantes pendant les mises à niveau des coordinateurs. Dans les versions précédentes, les coordinateurs doivent être supprimés puis créés lors d'une mise à niveau, ce qui peut entraîner certains temps d'arrêt du service.

        -

        Les mises à niveau en continu exigent que les coordinateurs fonctionnent en mode actif-veille. Vous pouvez utiliser le script que nous fournissons pour configurer les coordinateurs afin qu'ils travaillent en mode veille active et lancer la mise à jour continue.

        +

        Les mises à niveau en continu exigent que les coordinateurs fonctionnent en mode actif-veille. Vous pouvez utiliser le script que nous fournissons pour configurer les coordinateurs afin qu'ils travaillent en mode de veille active et lancer la mise à jour continue.

        Basé sur les capacités de mise à jour continue fournies par Kubernetes, le script ci-dessus applique une mise à jour ordonnée des déploiements en fonction de leurs dépendances. En outre, Milvus met en œuvre un mécanisme garantissant que ses composants restent compatibles avec ceux qui en dépendent pendant la mise à niveau, ce qui réduit considérablement les temps d'arrêt potentiels des services.

        Le script s'applique uniquement à la mise à niveau de Milvus installé avec Helm. Le tableau suivant répertorie les drapeaux de commande disponibles dans les scripts.

        @@ -145,8 +145,8 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope
        oFonctionnementupdateFaux
        -

        Une fois que vous vous êtes assuré que tous les déploiements de votre instance Milvus sont dans leur état normal, vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers 2.5.0-beta. Vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers la version 2.5.0-beta.

        -
        sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
        +

        Une fois que vous vous êtes assuré que tous les déploiements de votre instance Milvus sont dans leur état normal, vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers la version 2.5.0. Vous pouvez exécuter la commande suivante pour mettre à niveau l'instance Milvus vers la version 2.5.0.

        +
        sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
         
          @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
        1. Migrer les métadonnées Milvus.
        2. Démarrer les composants Milvus avec une nouvelle image.
        -

        2. Mise à niveau de Milvus de la version 2.1.x vers la version 2.5.0-beta

        Les commandes suivantes supposent que vous mettez à niveau Milvus de la version 2.1.4 à la version 2.5.0-beta. Modifiez-les pour obtenir les versions qui répondent à vos besoins.

        +

        2. Mise à niveau de Milvus de la version 2.1.x à la version 2.5.0

        Les commandes suivantes supposent que vous mettez à niveau Milvus de la version 2.1.4 à la version 2.5.0. Modifiez-les pour obtenir les versions qui répondent à vos besoins.

          -
        1. Spécifiez le nom de l'instance Milvus, la version source de Milvus et la version cible de Milvus.

          -
          ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
          +
        2. Spécifier le nom de l'instance Milvus, la version source de Milvus et la version cible de Milvus.

          +
          ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
           
        3. Spécifiez l'espace de noms avec -n si votre Milvus n'est pas installé dans l'espace de noms K8s par défaut.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
           
        4. Spécifiez le chemin d'accès à la racine avec -r si votre Milvus est installé avec le chemin d'accès personnalisé rootpath.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
           
        5. Spécifier la balise d'image avec -w si votre Milvus est installé avec une balise personnalisée image.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
           
        6. Définissez -d true si vous souhaitez supprimer automatiquement le pod de migration une fois la migration terminée.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
           
        7. Revenir en arrière et migrer à nouveau si la migration échoue.

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
          -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
          +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
           
        diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.json index 511d74a94..e49d7a94f 100644 --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Mise à niveau de Milvus Standalone avec Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Mise à niveau de l'opérateur Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Effectuer une mise à niveau continue","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mettre à niveau Milvus en changeant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Mise à niveau de Milvus Standalone avec Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Mise à niveau de l'opérateur Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Effectuer une mise à niveau en continu","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Mettre à niveau Milvus en changeant son image","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrer les métadonnées","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.md index 272af46e4..68f4bb174 100644 --- a/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/fr/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,11 +46,11 @@ helm -n milvus-operator upgrade milvus-

        Une fois que vous avez mis à niveau votre opérateur Milvus vers la dernière version, vous avez le choix entre les options suivantes :

        -

        Effectuer une mise à niveau continue

      • Dans le fichier de configuration ci-dessus, définissez spec.components.enableRollingUpdate comme true et spec.components.image comme la version souhaitée de Milvus.

        Par défaut, Milvus effectue une mise à niveau continue pour les coordinateurs de manière ordonnée, en remplaçant les images des pods des coordinateurs l'une après l'autre. Pour réduire le temps de mise à niveau, envisagez de définir spec.components.imageUpdateMode sur all afin que Milvus remplace toutes les images de pods en même temps.

        @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      Vous pouvez définir spec.components.imageUpdateMode sur rollingDowngrade pour que Milvus remplace les images de pods coordinateurs par une version inférieure.

      apiVersion: milvus.io/v1beta1
      @@ -119,7 +119,7 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Dans les cas normaux, vous pouvez simplement mettre à jour votre Milvus en changeant son image. Toutefois, il convient de noter qu'il y aura un certain temps d'arrêt lors de la mise à niveau de Milvus de cette manière.

      +

      Dans les cas normaux, vous pouvez simplement mettre à jour votre Milvus en changeant son image. Notez toutefois qu'il y aura un certain temps d'arrêt lors de la mise à niveau de Milvus de cette manière.

      Composez un fichier de configuration comme suit et enregistrez-le sous milvusupgrade.yaml:

      apiVersion: milvus.io/v1beta1
       kind: Milvus
      @@ -130,7 +130,7 @@ labels:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      Exécutez ensuite ce qui suit pour effectuer la mise à niveau :

      kubectl patch -f milvusupgrade.yaml
      @@ -150,8 +150,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Depuis Milvus 2.2.0, les métadonnées sont incompatibles avec celles des versions précédentes. Les exemples suivants supposent une mise à niveau de Milvus 2.1.4 vers Milvus v2.5.0-beta.

      -

      1. Créer un fichier .yaml pour la migration des métadonnées

      Créer un fichier de migration des métadonnées. Voici un exemple. Vous devez spécifier les fichiers name, sourceVersion, et targetVersion dans le fichier de configuration. L'exemple suivant définit name en my-release-upgrade, sourceVersion en v2.1.4, et targetVersion en v2.5.0-beta. Cela signifie que votre instance Milvus sera mise à niveau de la v2.1.4 à la v2.5.0-beta.

      +

      Depuis Milvus 2.2.0, les métadonnées sont incompatibles avec celles des versions précédentes. Les exemples suivants supposent une mise à niveau de Milvus 2.1.4 vers Milvus v2.5.0.

      +

      1. Création d'un fichier .yaml pour la migration des métadonnées

      Créer un fichier de migration des métadonnées. Voici un exemple. Vous devez spécifier les fichiers name, sourceVersion et targetVersion dans le fichier de configuration. L'exemple suivant définit name en my-release-upgrade, sourceVersion en v2.1.4, et targetVersion en v2.5.0. Cela signifie que votre instance Milvus sera mise à niveau de la v2.1.4 à la v2.5.0.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -161,9 +161,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      diff --git a/localization/v2.5.x/site/fr/adminGuide/users_and_roles.json b/localization/v2.5.x/site/fr/adminGuide/users_and_roles.json
      new file mode 100644
      index 000000000..ef1b280f4
      --- /dev/null
      +++ b/localization/v2.5.x/site/fr/adminGuide/users_and_roles.json
      @@ -0,0 +1 @@
      +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"Créer des utilisateurs et des rôles","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"Utilisateur","href":"User​","type":2,"isActive":false},{"label":"Rôle","href":"Role​","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/fr/adminGuide/users_and_roles.md b/localization/v2.5.x/site/fr/adminGuide/users_and_roles.md
      new file mode 100644
      index 000000000..6816438b3
      --- /dev/null
      +++ b/localization/v2.5.x/site/fr/adminGuide/users_and_roles.md
      @@ -0,0 +1,261 @@
      +---
      +id: users_and_roles.md
      +related_key: 'users, roles'
      +summary: >-
      +  Milvus permet un contrôle d'accès précis par le biais de RBAC. Vous pouvez
      +  commencer par créer des utilisateurs et des rôles, puis attribuer des
      +  privilèges ou des groupes de privilèges aux rôles, et enfin gérer le contrôle
      +  d'accès en accordant des rôles aux utilisateurs. Cette méthode garantit
      +  l'efficacité et la sécurité de la gestion des accès. Cette page explique
      +  comment créer des utilisateurs et des rôles dans Milvus.
      +title: Créer des utilisateurs et des rôles
      +---
      +

      Créer des utilisateurs et des rôles

      Milvus permet un contrôle d'accès précis grâce à la méthode RBAC. Vous pouvez commencer par créer des utilisateurs et des rôles, puis attribuer des privilèges ou des groupes de privilèges aux rôles, et enfin gérer le contrôle d'accès en accordant des rôles aux utilisateurs. Cette méthode garantit l'efficacité et la sécurité de la gestion des accès. Cette page présente la création d'utilisateurs et de rôles dans Milvus.

      +

      Utilisateur

      Après l'initialisation d'une instance Milvus, un utilisateur racine est automatiquement généré pour l'authentification lors de la première connexion à Milvus. Le nom d'utilisateur de l'utilisateur racine est root et le mot de passe est Milvus. Le rôle par défaut de l'utilisateur racine est admin, qui a accès à toutes les ressources. Pour garantir la sécurité des données, veuillez conserver les informations d'identification de l'utilisateur racine afin d'éviter tout accès non autorisé.

      +

      Pour les opérations quotidiennes, nous recommandons de créer des utilisateurs au lieu d'utiliser l'utilisateur racine.

      +

      Créer un utilisateur

      L'exemple suivant montre comment créer un utilisateur avec le nom d'utilisateur user_1 et le mot de passe P@ssw0rd. Le nom d'utilisateur et le mot de passe de l'utilisateur doivent respecter les règles suivantes.

      +
        +
      • Nom d'utilisateur : doit commencer par une lettre et ne peut inclure que des lettres majuscules ou minuscules, des chiffres et des traits de soulignement.

      • +
      • Mot de passe : il doit être composé de 8 à 64 caractères et doit inclure trois des éléments suivants : lettres majuscules, lettres minuscules, chiffres et caractères spéciaux.

      • +
      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +client.create_user(user_name="user_1", password="P@ssw0rd")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig;​
      +import io.milvus.v2.client.MilvusClientV2;​
      +import io.milvus.v2.service.rbac.request.CreateUserReq;​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +        .uri("http://localhost:19530")​
      +        .token("root:Milvus")​
      +        .build();​
      +        ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +CreateUserReq createUserReq = CreateUserReq.builder()​
      +        .userName("user_1")​
      +        .password("P@ssw0rd")​
      +        .build();​
      +        ​
      +client.createUser(createUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +await milvusClient.createUser({​
      +   username: 'user_1',​
      +   password: 'P@ssw0rd',​
      + });​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1",​
      +    "password": "P@ssw0rd"​
      +}'​
      +
      +
      +

      Mise à jour du mot de passe

      Après avoir créé un utilisateur, vous pouvez mettre à jour le mot de passe en cas d'oubli.

      +

      Le nouveau mot de passe doit également respecter la règle suivante.

      +
        +
      • Il doit être composé de 8 à 64 caractères et inclure trois des éléments suivants : lettres majuscules, lettres minuscules, chiffres et caractères spéciaux.
      • +
      +

      L'exemple suivant montre comment mettre à jour le mot de passe de l'utilisateur user_1 en NewP@ssw0rd.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.update_password(​
      +    user_name="user_1",​
      +    old_password="P@ssw0rd",​
      +    new_password="NewP@ssw0rd"​
      +)​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
      +​
      +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
      +        .userName("user_1")​
      +        .password("P@ssw0rd")​
      +        .newPassword("NewP@ssw0rd")​
      +        .build();​
      +client.updatePassword(updatePasswordReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.updateUser({​
      +   username: 'user_1',​
      +   newPassword: 'P@ssw0rd',​
      +   oldPassword: 'NewP@ssw0rd',​
      +});​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "newPassword": "P@ssw0rd!",​
      +    "userName": "user_1",​
      +    "password": "P@ssw0rd"​
      +}'​
      +
      +
      +

      Lister les utilisateurs

      Après avoir créé plusieurs utilisateurs, vous pouvez dresser la liste de tous les utilisateurs existants et les afficher.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_users()​
      +
      +
      +
      List<String> resp = client.listUsers();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.listUsers();​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Voici un exemple de résultat. root est l'utilisateur par défaut généré automatiquement dans Milvus. user_1 est le nouvel utilisateur qui vient d'être créé.

      +
      ['root', 'user_1']​
      +
      +
      +

      Rôle

      Milvus fournit un rôle intégré appelé admin, qui est un rôle d'administrateur pouvant accéder aux ressources sous toutes les instances et disposant de privilèges pour toutes les opérations. Pour une gestion plus fine des accès et une meilleure sécurité des données, il est recommandé de créer des rôles personnalisés en fonction de vos besoins.

      +

      Créer un rôle

      L'exemple suivant montre comment créer un rôle nommé role_a.

      +

      Le nom du rôle doit respecter la règle suivante.

      +
        +
      • Il doit commencer par une lettre et ne peut comprendre que des lettres majuscules ou minuscules, des chiffres et des traits de soulignement."
      • +
      + +
      from pymilvus import MilvusClient​
      +​
      +client.create_role(role_name="role_a")​
      +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
      +
      +
      +
      CreateRoleReq createRoleReq = CreateRoleReq.builder()​
      +        .roleName("role_a")​
      +        .build();​
      +       ​
      +
      +
      +
      client.createRole(createRoleReq);​
      +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.createRole({​
      +   roleName: 'role_a',​
      +});​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      +

      Lister les rôles

      Après avoir créé plusieurs rôles, vous pouvez lister et visualiser tous les rôles existants.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_roles()​
      +
      +
      +
      List<String> roles = client.listRoles();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +await milvusClient.listRoles(​
      +    includeUserInfo: True​
      +);​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Voici un exemple de sortie. admin est le rôle par défaut dans Milvus. role_a est le nouveau rôle qui vient d'être créé.

      +
      ['admin', 'role_a']​
      +
      +
      diff --git a/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 1d7e03b42..ebb8a4c94 100644 --- a/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Exécuter Milvus avec Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Installer Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Exécuter Milvus avec Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Installer Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.md index b631d0f19..d2566aada 100644 --- a/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/fr/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Exécuter Milvus avec Docker Compose (Linux)

      Milvus fournit un fichier de configuration Docker Compose dans le référentiel Milvus. Pour installer Milvus à l'aide de Docker Compose, il suffit d'exécuter la commande suivante

      # Download the configuration file
      -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
      +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
       
       # Start Milvus
       $ sudo docker compose up -d
      @@ -69,7 +69,7 @@ Creating milvus-standalone ... done
       
      • Si vous n'avez pas réussi à exécuter la commande ci-dessus, veuillez vérifier si Docker Compose V1 est installé sur votre système. Si c'est le cas, il est conseillé de migrer vers Docker Compose V2 en raison des notes sur cette page.

      • -
      • Si vous rencontrez des problèmes en tirant l'image, contactez-nous à l'adresse community@zilliz.com en détaillant le problème, et nous vous fournirons l'assistance nécessaire.

      • +
      • Si vous rencontrez des problèmes lors de l'extraction de l'image, contactez-nous à l'adresse community@zilliz.com en détaillant le problème, et nous vous fournirons l'assistance nécessaire.

      Après le démarrage de Milvus,

      diff --git a/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json index d56b950e1..8ce1be4b8 100644 --- a/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json +++ b/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json @@ -1 +1 @@ -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Exécution de Milvus avec prise en charge du GPU à l'aide de Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Installer Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configuration du pool de mémoire","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Exécution de Milvus avec prise en charge du GPU à l'aide de Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Conditions préalables","href":"Prerequisites","type":2,"isActive":false},{"label":"Installer Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configuration du pool de mémoire","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Prochaines étapes","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md index 4057d32aa..25170d913 100644 --- a/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md +++ b/localization/v2.5.x/site/fr/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md @@ -59,8 +59,8 @@ title: Exécution de Milvus avec prise en charge du GPU à l'aide de Docker Comp >

      Pour installer Milvus avec prise en charge du GPU à l'aide de Docker Compose, procédez comme suit.

      -

      1. Téléchargez et configurez le fichier YAML

      Télécharger milvus-standalone-docker-compose-gpu.yml et enregistrez-le sous docker-compose.yml manuellement ou à l'aide de la commande suivante.

      -
      $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
      +

      1. Téléchargez et configurez le fichier YAML

      Télécharger milvus-standalone-docker-compose-gpu.yml et enregistrez-le sous docker-compose.yml manuellement ou à l'aide de la commande suivante.

      +
      $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
       

      Vous devez apporter quelques modifications aux variables d'environnement du service autonome dans le fichier YAML, comme suit :

        @@ -119,7 +119,7 @@ milvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 23 milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp milvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp
      -

      Si vous avez affecté plusieurs périphériques GPU à Milvus dans docker-compose.yml, vous pouvez spécifier quel périphérique GPU est visible ou disponible pour l'utilisation.

      +

      Si vous avez affecté plusieurs périphériques GPU à Milvus dans docker-compose.yml, vous pouvez spécifier quel périphérique GPU est visible ou disponible pour utilisation.

      Rendez le dispositif GPU 0 visible pour Milvus :

      $ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone
       
      diff --git a/localization/v2.5.x/site/fr/menuStructure/fr.json b/localization/v2.5.x/site/fr/menuStructure/fr.json index c47069d62..6f2f2e46e 100644 --- a/localization/v2.5.x/site/fr/menuStructure/fr.json +++ b/localization/v2.5.x/site/fr/menuStructure/fr.json @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "Filtrage", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "Le filtrage expliqué", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "Opérateurs de base", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "Filtrage Templating", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "Opérateurs JSON", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "Opérateurs de tableau", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "Recherche en texte intégral", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "Correspondance des textes", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "Recherche d'itérateurs", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "Utiliser la clé de partition", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "Filtrage des métadonnées", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "Reranking", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "Utilisateurs, privilèges et rôles", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "Activer RBAC", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "RBAC expliqué", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "Créer des utilisateurs et des rôles", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "Créer un groupe de privilèges", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "Accorder des privilèges", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "Rôles des subventions", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "Supprimer des utilisateurs et des rôles", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "Chiffrement en transit", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Outil de dimensionnement Milvus", "id": "sizing", @@ -2081,7 +2149,7 @@ "children": [] }, { - "label": "FAQ opérationnelles", + "label": "FAQ opérationnelle", "id": "operational_faq.md", "order": 2, "children": [] diff --git a/localization/v2.5.x/site/fr/release_notes.json b/localization/v2.5.x/site/fr/release_notes.json index e8256ab8a..abc9b6602 100644 --- a/localization/v2.5.x/site/fr/release_notes.json +++ b/localization/v2.5.x/site/fr/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Notes de mise à jour","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Notes de mise à jour","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/release_notes.md b/localization/v2.5.x/site/fr/release_notes.md index 5dd54bc13..076178eee 100644 --- a/localization/v2.5.x/site/fr/release_notes.md +++ b/localization/v2.5.x/site/fr/release_notes.md @@ -19,7 +19,7 @@ title: Notes de mise à jour >

      Découvrez les nouveautés de Milvus ! Cette page résume les nouvelles fonctionnalités, les améliorations, les problèmes connus et les corrections de bogues de chaque version. Vous trouverez dans cette section les notes de version pour chaque version publiée après la v2.5.0. Nous vous conseillons de consulter régulièrement cette page pour prendre connaissance des mises à jour.

      -

      v2.5.0-beta

      Date de publication : 26 novembre 2024

      +

      Date de publication : 23 décembre 2024

      - +
      Version de MilvusVersion du SDK PythonVersion du SDK Node.jsVersion du SDK Java
      2.5.0-beta2.5.02.5.02.5.0
      2.5.02.5.12.5.22.5.2
      -

      Milvus 2.5.0-beta apporte des avancées significatives pour améliorer la convivialité, l'évolutivité et les performances pour les utilisateurs traitant de la recherche vectorielle et de la gestion de données à grande échelle. Avec cette version, Milvus intègre de nouvelles fonctionnalités puissantes telles que la recherche basée sur les termes, le compactage des clusters pour des requêtes optimisées et la prise en charge polyvalente des méthodes de recherche vectorielle dense et éparse. Les améliorations apportées à la gestion des clusters, à l'indexation et au traitement des données introduisent de nouveaux niveaux de flexibilité et de facilité d'utilisation, faisant de Milvus une base de données vectorielles encore plus robuste et conviviale.

      +

      Milvus 2.5.0 apporte des avancées significatives pour améliorer la convivialité, l'évolutivité et les performances pour les utilisateurs traitant de la recherche vectorielle et de la gestion de données à grande échelle. Avec cette version, Milvus intègre de nouvelles fonctionnalités puissantes telles que la recherche basée sur les termes, le compactage des grappes pour des requêtes optimisées et la prise en charge polyvalente des méthodes de recherche vectorielle dense et éparse. Les améliorations apportées à la gestion des clusters, à l'indexation et au traitement des données introduisent de nouveaux niveaux de flexibilité et de facilité d'utilisation, faisant de Milvus une base de données vectorielles encore plus robuste et conviviale.

      Caractéristiques principales

      Milvus 2.5 prend en charge la recherche plein texte mise en œuvre avec Sparse-BM25 ! Cette fonctionnalité est un complément important aux solides capacités de recherche sémantique de Milvus, en particulier dans les scénarios impliquant des mots rares ou des termes techniques. Dans les versions précédentes, Milvus prenait en charge les vecteurs épars pour faciliter les scénarios de recherche par mot-clé. Ces vecteurs épars étaient générés en dehors de Milvus par des modèles neuronaux tels que SPLADEv2/BGE-M3 ou des modèles statistiques tels que l'algorithme BM25.

      Alimenté par Tantivy, Milvus 2.5 dispose d'analyseurs intégrés et d'une extraction de vecteurs épars, étendant l'API de la simple réception de vecteurs en entrée à l'acceptation directe de texte. Les informations statistiques de l'algorithme BM25 sont mises à jour en temps réel au fur et à mesure de l'insertion des données, ce qui améliore la convivialité et la précision. En outre, les vecteurs épars basés sur les algorithmes de voisinage le plus proche (ANN) offrent des performances plus puissantes que les systèmes de recherche par mots clés standard.

      Pour plus d'informations, reportez-vous aux sections Vue d'ensemble de l'analyseur et Recherche en texte intégral.

      @@ -81,3 +81,6 @@ title: Notes de mise à jour

      Optimisation de l'analyse des expressions

      Amélioration de l'analyse des expressions par la mise en place d'un cache pour les expressions répétées, la mise à niveau d'ANTLR et l'optimisation des performances des clauses NOT IN.

      Amélioration des performances en matière de simultanéité des DDL

      Optimisation des performances de simultanéité des opérations DDL (Data Definition Language).

      Alignement des fonctionnalités de l'API RESTful

      Alignement des fonctionnalités de l'API RESTful avec d'autres SDK pour plus de cohérence.

      +

      Mises à jour de la sécurité et de la configuration

      Prise en charge de TLS pour sécuriser les communications entre nœuds dans les environnements plus complexes ou d'entreprise. Pour plus de détails, voir Configuration de la sécurité.

      +

      Amélioration des performances de compactage

      Suppression des limites maximales de segments dans le compactage mixte et priorité aux segments plus petits, ce qui améliore l'efficacité et accélère les requêtes sur les ensembles de données volumineux ou fragmentés.

      +

      Équilibrage des canaux basé sur le score

      Introduction d'une politique qui équilibre dynamiquement les charges entre les canaux, ce qui améliore l'utilisation des ressources et la stabilité globale dans les déploiements à grande échelle.

      diff --git a/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.json index 51d958d15..a72338456 100644 --- a/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modifier une collection","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Renommer une collection","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Définir le TTL d'une collection","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modifier une collection","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Renommer une collection","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Définir le TTL d'une collection","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.md index f392f8f5f..4808a31e3 100644 --- a/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/fr/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

      Si une collection doit être abandonnée pendant une période spécifique, envisagez de définir son délai de vie (TTL) en secondes. Une fois le TTL dépassé, Milvus supprime les entités de la collection et abandonne la collection. La suppression est asynchrone, ce qui signifie que les recherches et les requêtes sont toujours possibles avant que la suppression ne soit terminée.

      +

      Si une collection doit être abandonnée pendant une période spécifique, envisagez de définir son délai de vie (TTL) en secondes. Une fois le TTL dépassé, Milvus supprime les entités de la collection. La suppression est asynchrone, ce qui signifie que les recherches et les requêtes sont toujours possibles avant que la suppression ne soit terminée.

      L'extrait de code suivant montre comment modifier le TTL d'une collection.

      -
      # Currently not available for Python
      +
      from pymilvus import MilvusClient
       
      +client.alter_collection_properties(
      +  collection_name="collection_name",
      +  properties = {"collection.ttl.seconds": 500}
      +)
       
      import io.milvus.v2.service.collection.request.AlterCollectionReq;​
       import java.util.HashMap;​
      diff --git a/localization/v2.5.x/site/fr/userGuide/schema/string.md b/localization/v2.5.x/site/fr/userGuide/schema/string.md
      index 2fd2b8b17..6f487b229 100644
      --- a/localization/v2.5.x/site/fr/userGuide/schema/string.md
      +++ b/localization/v2.5.x/site/fr/userGuide/schema/string.md
      @@ -5,7 +5,7 @@ summary: >-
         Dans Milvus, VARCHAR est le type de données utilisé pour stocker des données
         de type chaîne, adapté au stockage de chaînes de longueur variable. Il permet
         de stocker des chaînes de caractères à un ou plusieurs octets, avec une
      -  longueur maximale de 60 535 caractères. Lorsque vous définissez un champ
      +  longueur maximale de 65 535 caractères. Lorsque vous définissez un champ
         VARCHAR, vous devez également spécifier le paramètre de longueur maximale
         max_length. Le type de chaîne VARCHAR offre un moyen efficace et flexible de
         stocker et de gérer des données textuelles, ce qui le rend idéal pour les
      @@ -26,7 +26,7 @@ summary: >-
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      Dans Milvus, VARCHAR est le type de données utilisé pour stocker des données de type chaîne de caractères, adaptées au stockage de chaînes de caractères de longueur variable. Il permet de stocker des chaînes de caractères à un ou plusieurs octets, avec une longueur maximale de 60 535 caractères. Lorsque vous définissez un champ VARCHAR, vous devez également spécifier le paramètre de longueur maximale max_length. Le type de chaîne VARCHAR offre un moyen efficace et flexible de stocker et de gérer des données textuelles, ce qui le rend idéal pour les applications qui gèrent des chaînes de différentes longueurs.

      +

      Dans Milvus, VARCHAR est le type de données utilisé pour stocker des données de type chaîne, adaptées au stockage de chaînes de longueur variable. Il permet de stocker des chaînes de caractères à un ou plusieurs octets, avec une longueur maximale de 65 535 caractères. Lorsque vous définissez un champ VARCHAR, vous devez également spécifier le paramètre de longueur maximale max_length. Le type de chaîne VARCHAR offre un moyen efficace et flexible de stocker et de gérer des données textuelles, ce qui le rend idéal pour les applications qui gèrent des chaînes de différentes longueurs.

      Ajout d'un champ VARCHAR

      Milvus fournit des opérateurs puissants pour interroger les champs de tableau, ce qui vous permet de filtrer et d'extraire des entités en fonction du contenu des tableaux.

      +
      +

      Tous les éléments d'un tableau doivent être du même type et les structures imbriquées dans les tableaux sont traitées comme des chaînes simples. Par conséquent, lorsque vous travaillez avec des champs ARRAY, il est conseillé d'éviter une imbrication trop profonde et de veiller à ce que vos structures de données soient aussi plates que possible pour des performances optimales.

      +
      +

      Opérateurs ARRAY disponibles

      Les opérateurs ARRAY permettent une interrogation fine des champs de type tableau dans Milvus. Ces opérateurs sont les suivants

      + +

      ARRAY_CONTAINS

      L'opérateur ARRAY_CONTAINS vérifie si un élément spécifique existe dans un champ de tableau. Il est utile lorsque vous souhaitez trouver des entités dans lesquelles un élément donné est présent dans le tableau.

      +

      Exemple

      +

      Supposons que vous disposiez d'un champ de tableau history_temperatures, qui contient les températures les plus basses enregistrées pour différentes années. Pour trouver toutes les entités dont le tableau contient la valeur 23, vous pouvez utiliser l'expression de filtre suivante.

      +
      filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
      +
      +
      +

      Cette expression renverra toutes les entités dont le tableau history_temperatures contient la valeur 23.

      +

      ARRAY_CONTAINS_ALL

      L'opérateur ARRAY_CONTAINS_ALL garantit que tous les éléments de la liste spécifiée sont présents dans le champ du tableau. Cet opérateur est utile lorsque vous souhaitez faire correspondre des entités qui contiennent plusieurs valeurs dans le tableau.

      +

      Exemple

      +

      Si vous souhaitez trouver toutes les entités dont le tableau history_temperatures contient à la fois 23 et 24, vous pouvez utiliser.

      +
      filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
      +
      +
      +

      Vous obtiendrez toutes les entités dont le tableau history_temperatures contient les deux valeurs spécifiées.

      +

      ARRAY_CONTAINS_ANY

      L'opérateur ARRAY_CONTAINS_ANY vérifie si l'un des éléments de la liste spécifiée est présent dans le champ du tableau. Cet opérateur est utile lorsque vous souhaitez faire correspondre des entités qui contiennent au moins une des valeurs spécifiées dans le tableau.

      +

      Exemple

      +

      Pour trouver toutes les entités dont le tableau history_temperatures contient soit 23, soit 24, vous pouvez utiliser.

      +
      filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
      +
      +
      +

      Ceci renverra toutes les entités dont le tableau history_temperatures contient au moins l'une des valeurs 23 ou 24.

      +

      ARRAY_LENGTH

      L'opérateur ARRAY_LENGTH vous permet de filtrer les entités en fonction du nombre d'éléments d'un champ de tableau. Cet opérateur est utile lorsque vous devez trouver des entités dont les tableaux sont d'une certaine longueur.

      +

      Exemple

      +

      Si vous souhaitez trouver toutes les entités dont le tableau history_temperatures comporte moins de 10 éléments, vous pouvez utiliser l'opérateur.

      +
      filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
      +
      +
      +

      Cela renverra toutes les entités dont le tableau history_temperatures comporte moins de 10 éléments.

      diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..b226e8529 --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"Opérateurs de base","href":"Basic-Operators​","type":1,"isActive":false},{"label":"Opérateurs de comparaison","href":"Comparison-operators​","type":2,"isActive":false},{"label":"Opérateurs de plage","href":"Range-operators​","type":2,"isActive":false},{"label":"Opérateurs arithmétiques","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"Opérateurs logiques","href":"Logical-Operators​","type":2,"isActive":false},{"label":"Conseils sur l'utilisation des opérateurs de base avec les champs JSON et ARRAY","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"Conclusion","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..233ba48d2 --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,237 @@ +--- +id: basic-operators.md +summary: >- + Milvus fournit un riche ensemble d'opérateurs de base pour vous aider à + filtrer et à interroger efficacement les données. Ces opérateurs vous + permettent d'affiner vos conditions de recherche en fonction de champs + scalaires, de calculs numériques, de conditions logiques, etc. Il est + essentiel de comprendre comment utiliser ces opérateurs pour élaborer des + requêtes précises et maximiser l'efficacité de vos recherches. +title: Opérateurs de base +--- +

      Opérateurs de base

      Milvus fournit un ensemble riche d'opérateurs de base pour vous aider à filtrer et à interroger efficacement les données. Ces opérateurs vous permettent d'affiner vos conditions de recherche en fonction de champs scalaires, de calculs numériques, de conditions logiques, etc. Il est essentiel de comprendre comment utiliser ces opérateurs pour élaborer des requêtes précises et maximiser l'efficacité de vos recherches.

      +

      Opérateurs de comparaison

      Les opérateurs de comparaison sont utilisés pour filtrer les données en fonction de l'égalité, de l'inégalité ou de la taille. Ils s'appliquent aux champs numériques, de texte et de date.

      +

      Opérateurs de comparaison pris en charge.

        +
      • == (égal à)

      • +
      • != (différent de)

      • +
      • > (Supérieur à)

      • +
      • < (inférieur à)

      • +
      • >= (supérieur ou égal)

      • +
      • <= (Inférieur ou égal)

      • +
      +

      Exemple 1 : Filtrage avec Equal To (==)

      Supposons que vous disposiez d'un champ nommé status et que vous souhaitiez trouver toutes les entités pour lesquelles status est "actif". Vous pouvez utiliser l'opérateur d'égalité ==.

      +
      filter = 'status == "active"'​
      +
      +
      +

      Exemple 2 : Filtrage avec Not Equal To (!=)

      Pour trouver les entités où status n'est pas "inactif".

      +
      filter = 'status != "inactive"'​
      +
      +
      +

      Exemple 3 : Filtrage avec Greater Than (>)

      Pour trouver toutes les entités dont l'adresse age est supérieure à 30.

      +
      filter = 'age > 30'​
      +
      +
      +

      Exemple 4 : Filtrage avec Less Than (<)

      Pour trouver les entités dont l'adresse price est inférieure à 100.

      +
      filter = 'price < 100'​
      +
      +
      +

      Exemple 5 : Filtrage avec une valeur supérieure ou égale à (>=)

      Pour trouver toutes les entités dont le site rating est supérieur ou égal à 4.

      +
      filter = 'rating >= 4'​
      +
      +
      +

      Exemple 6 : Filtrage avec une valeur inférieure ou égale à (<=)

      Pour trouver les entités dont l'adresse discount est inférieure ou égale à 10 %.

      +
      filter = 'discount <= 10'​
      +
      +
      +

      Opérateurs de plage

      Les opérateurs de plage permettent de filtrer les données en fonction d'ensembles ou de plages de valeurs spécifiques.

      +

      Opérateurs de plage pris en charge.

        +
      • IN: Utilisés pour faire correspondre des valeurs à l'intérieur d'un ensemble ou d'une plage spécifique.

      • +
      • LIKE: Utilisé pour faire correspondre un modèle (principalement pour les champs de texte).

      • +
      +

      Exemple 1 : Utilisation de IN pour faire correspondre plusieurs valeurs

      Si vous souhaitez trouver toutes les entités dont la valeur color est soit "rouge", soit "verte", soit "bleue".

      +
      filter = 'color in ["red", "green", "blue"]'​
      +
      +
      +

      C'est utile lorsque vous souhaitez vérifier l'appartenance à une liste de valeurs.

      +

      Exemple 2 : utilisation de LIKE pour la recherche de motifs

      L'opérateur LIKE est utilisé pour la recherche de motifs dans les champs de type chaîne de caractères. Il peut faire correspondre des sous-chaînes à différentes positions dans le texte : en tant que préfixe, infixe ou suffixe. L'opérateur LIKE utilise le symbole % comme caractère de remplacement, qui peut correspondre à n'importe quel nombre de caractères (y compris zéro).

      +

      Correspondance de préfixes (commence par)

      Pour effectuer une recherche par préfixe, où la chaîne commence par un motif donné, vous pouvez placer le motif au début et utiliser % pour rechercher tous les caractères qui le suivent. Par exemple, pour trouver tous les produits dont le site name commence par "Prod".

      +
      filter = 'name LIKE "Prod%"'​
      +
      +
      +

      Cela correspondra à tous les produits dont le nom commence par "Prod", tels que "Produit A", "Produit B", etc.

      +

      Correspondance par suffixe (se termine par)

      Pour une correspondance par suffixe, lorsque la chaîne se termine par un motif donné, placez le symbole % au début du motif. Par exemple, pour trouver tous les produits dont le site name se termine par "XYZ".

      +
      filter = 'name LIKE "%XYZ"'​
      +
      +
      +

      Cette recherche portera sur tous les produits dont le nom se termine par "XYZ", tels que "ProductXYZ", "SampleXYZ", etc.

      +

      Correspondance infixe (contient)

      Pour effectuer une correspondance infixe, où le motif peut apparaître n'importe où dans la chaîne, vous pouvez placer le symbole % au début et à la fin du motif. Par exemple, pour trouver tous les produits dont le site name contient le mot "Pro".

      +
      filter = 'name LIKE "%Pro%"'​
      +
      +
      +

      Cela correspondra à tous les produits dont le nom contient la sous-chaîne "Pro", comme "Product", "ProLine" ou "SuperPro".

      +

      Opérateurs arithmétiques

      Les opérateurs arithmétiques vous permettent de créer des conditions basées sur des calculs impliquant des champs numériques.

      +

      Opérateurs arithmétiques pris en charge.

        +
      • + (Addition)

      • +
      • - (Soustraction)

      • +
      • * (Multiplication)

      • +
      • / (division)

      • +
      • % (Modulus)

      • +
      • ** (exponentiation)

      • +
      +

      Exemple 1 : Utilisation de l'addition (+)

      Pour trouver les entités dont le prix total est la somme de base_price et tax.

      +
      filter = 'total == base_price + tax'​
      +
      +
      +

      Exemple 2 : Utilisation de la soustraction (-)

      Pour trouver les entités où quantity est supérieur à 50 et quantity_sold est inférieur à 30.

      +
      filter = 'quantity - quantity_sold > 50'​
      +
      +
      +

      Exemple 3 : Utilisation de la multiplication (*)

      Pour trouver les entités où price est supérieur à 100 et quantity est supérieur à 10, multiplié.

      +
      filter = 'price * quantity > 1000'​
      +
      +
      +

      Exemple 4 : Utilisation de la division (/)

      Pour trouver des produits où total_price divisé par quantity est inférieur à 50.

      +
      filter = 'total_price / quantity < 50'​
      +
      +
      +

      Exemple 5 : Utilisation du module (%)

      Pour trouver des entités dont le id est un nombre pair (c'est-à-dire divisible par 2).

      +
      filter = 'id % 2 == 0'​
      +
      +
      +

      Exemple 6 : Utilisation de l'exponentiation (**)

      Pour trouver les entités où price élevé à la puissance 2 est supérieur à 1000.

      +
      filter = 'price ** 2 > 1000'​
      +
      +
      +

      Opérateurs logiques

      Les opérateurs logiques sont utilisés pour combiner plusieurs conditions dans une expression de filtre plus complexe. Ils comprennent AND, OR, et NOT.

      +

      Opérateurs logiques pris en charge.

        +
      • AND: Combine plusieurs conditions qui doivent toutes être vraies.

      • +
      • OR: Combine des conditions dont au moins une doit être vraie.

      • +
      • NOT: Négation d'une condition.

      • +
      +

      Exemple 1 : Utilisation de AND pour combiner des conditions

      Trouver tous les produits pour lesquels price est supérieur à 100 et stock est supérieur à 50.

      +
      filter = 'price > 100 AND stock > 50'​
      +
      +
      +

      Exemple 2 : Utilisation de OR pour combiner des conditions

      Pour trouver tous les produits pour lesquels color est soit "rouge", soit "bleu".

      +
      filter = 'color == "red" OR color == "blue"'​
      +
      +
      +

      Exemple 3 : Utilisation de NOT pour exclure une condition

      Pour trouver tous les produits pour lesquels color n'est pas "vert".

      +
      filter = 'NOT color == "green"'​
      +
      +
      +

      Conseils sur l'utilisation des opérateurs de base avec les champs JSON et ARRAY

      Si les opérateurs de base de Milvus sont polyvalents et peuvent être appliqués à des champs scalaires, ils peuvent également être utilisés efficacement avec les clés et les index des champs JSON et ARRAY.

      +

      Par exemple, si vous avez un champ product qui contient plusieurs clés comme price, model, et tags, faites toujours référence à la clé directement.

      +
      filter = 'product["price"] > 1000'​
      +
      +
      +

      Pour trouver les enregistrements dont la première température d'un tableau de températures enregistrées dépasse une certaine valeur, utilisez .

      +
      filter = 'history_temperatures[0] > 30'​
      +
      +
      +

      Conclusion

      Milvus propose une gamme d'opérateurs de base qui vous offrent une grande souplesse dans le filtrage et l'interrogation de vos données. En combinant des opérateurs de comparaison, de plage, arithmétiques et logiques, vous pouvez créer des expressions de filtrage puissantes pour réduire les résultats de vos recherches et récupérer efficacement les données dont vous avez besoin.

      diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..e47effebf --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"Explication du filtrage","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"Opérateurs de base","href":"Basic-operators​","type":2,"isActive":false},{"label":"Modèles d'expression de filtrage","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"Opérateurs spécifiques aux types de données","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..fd637c449 --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,148 @@ +--- +id: boolean.md +summary: >- + Milvus offre de puissantes capacités de filtrage qui permettent une + interrogation précise de vos données. Les expressions de filtre vous + permettent de cibler des champs scalaires spécifiques et d'affiner les + résultats de la recherche avec différentes conditions. Ce guide explique + comment utiliser les expressions de filtre dans Milvus, avec des exemples axés + sur les opérations de requête. Vous pouvez également appliquer ces filtres + dans les requêtes de recherche et de suppression. +title: Le filtrage expliqué +--- +

      Explication du filtrage

      Milvus offre de puissantes capacités de filtrage qui permettent une interrogation précise de vos données. Les expressions de filtre vous permettent de cibler des champs scalaires spécifiques et d'affiner les résultats de la recherche avec différentes conditions. Ce guide explique comment utiliser les expressions de filtre dans Milvus, avec des exemples axés sur les opérations de requête. Vous pouvez également appliquer ces filtres dans les requêtes de recherche et de suppression.

      +

      Opérateurs de base

      Milvus prend en charge plusieurs opérateurs de base pour filtrer les données.

      +
        +
      • Opérateurs de comparaison: ==, !=, >, <, >=, et <= permettent de filtrer sur la base de champs numériques, de texte ou de date.

      • +
      • Filtres de plage: IN et LIKE permettent de faire correspondre des plages ou des ensembles de valeurs spécifiques.

      • +
      • Opérateurs arithmétiques: + Les opérateurs arithmétiques, -, *, /, % et ** sont utilisés pour les calculs impliquant des champs numériques.

      • +
      • Opérateurs logiques: AND, OR, et NOT combinent plusieurs conditions dans des expressions complexes.

      • +
      +

      Exemple : Filtrage par couleur

      Pour trouver des entités de couleur primaire (rouge, vert ou bleu) dans un champ scalaire color, utilisez l'expression de filtrage suivante.

      +
      filter='color in ["red", "green", "blue"]'​
      +
      +
      +

      Exemple : Filtrage des champs JSON

      Milvus permet de référencer des clés dans des champs JSON. Par exemple, si vous avez un champ JSON product avec les clés price et model, et que vous voulez trouver des produits avec un modèle spécifique et un prix inférieur à 1 850, utilisez l'expression de filtre suivante.

      +
      filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
      +
      +
      +

      Exemple : Filtrage des champs de type tableau

      Si vous disposez d'un champ de tableau history_temperatures contenant des enregistrements de température et que vous souhaitez trouver des observatoires dont la 10e température enregistrée dépasse 23 °C, utilisez cette expression.

      +
      filter='history_temperatures[10] > 23'​
      +
      +
      +

      Pour plus d'informations sur ces opérateurs de base, reportez-vous à la section Opérateurs de base.

      +

      Modèles d'expression de filtrage

      Lorsque le filtrage utilise des caractères CJK, le traitement peut être plus complexe en raison des jeux de caractères plus importants et des différences d'encodage. Cela peut entraîner des performances plus lentes, en particulier avec l'opérateur IN.

      +

      Milvus introduit un modèle d'expression de filtre pour optimiser les performances lors de l'utilisation de caractères CJK. En séparant les valeurs dynamiques de l'expression de filtre, le moteur de requête traite l'insertion de paramètres plus efficacement.

      +

      Exemple

      Pour trouver les personnes de plus de 25 ans vivant à "北京" (Pékin) ou à "上海" (Shanghai), utilisez le modèle d'expression suivant.

      +
      filter = "age > 25 AND city IN ['北京', '上海']"​
      +
      +
      +

      Pour améliorer les performances, utilisez cette variante avec des paramètres.

      +
      filter = "age > {age} AND city in {city}",​
      +filter_params = {"age": 25, "city": ["北京", "上海"]}​
      +
      +
      +

      Cette approche permet de réduire la charge d'analyse et d'améliorer la vitesse d'interrogation. Pour plus d'informations, voir la section Modélisation des filtres.

      +

      Opérateurs spécifiques aux types de données

      Milvus fournit des opérateurs de filtrage avancés pour des types de données spécifiques, tels que les champs JSON, ARRAY et VARCHAR.

      +

      Opérateurs spécifiques aux champs JSON

      Milvus propose des opérateurs avancés pour l'interrogation des champs JSON, permettant un filtrage précis dans des structures JSON complexes.

      +

      **JSON_CONTAINS(identifier, jsonExpr)**: Vérifie si une expression JSON existe dans le champ.

      +
      # JSON data: {"tags": ["electronics", "sale", "new"]}​
      +filter='json_contains(tags, "sale")'​
      +
      +
      +

      **JSON_CONTAINS_ALL(identifier, jsonExpr)**: Vérifie que tous les éléments de l'expression JSON sont présents.

      +
      # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
      +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
      +
      +
      +

      **JSON_CONTAINS_ANY(identifier, jsonExpr)**: Filtre les entités pour lesquelles il existe au moins un élément dans l'expression JSON.

      +
      # JSON data: {"tags": ["electronics", "sale", "new"]}​
      +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
      +
      +
      +

      Pour plus de détails sur les opérateurs JSON, voir Opérateurs JSON.

      +

      Opérateurs spécifiques aux champs ARRAY

      Milvus propose des opérateurs de filtrage avancés pour les champs de type tableau, tels que ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY, et ARRAY_LENGTH, qui permettent un contrôle fin des données de type tableau.

      +

      **ARRAY_CONTAINS**: Filtre les entités contenant un élément spécifique.

      +
      filter="ARRAY_CONTAINS(history_temperatures, 23)"​
      +
      +
      +

      **ARRAY_CONTAINS_ALL**: Filtre les entités où tous les éléments d'une liste sont présents.

      +
      filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
      +
      +
      +

      **ARRAY_CONTAINS_ANY**: Filtre les entités contenant n'importe quel élément de la liste.

      +
      filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
      +
      +
      +

      **ARRAY_LENGTH**: Filtre en fonction de la longueur du tableau.

      +
      filter="ARRAY_LENGTH(history_temperatures) < 10"​
      +
      +
      +

      Pour plus de détails sur les opérateurs de tableau, voir Opérateurs de tableau.

      +

      Opérateurs spécifiques aux champs VARCHAR

      L'opérateur **Text_Match** permet d'extraire des documents avec précision en fonction de termes d'interrogation spécifiques. Il est particulièrement utile pour les recherches filtrées qui combinent des filtres scalaires avec des recherches de similarité vectorielle. Contrairement aux recherches sémantiques, la correspondance de texte se concentre sur les occurrences exactes des termes.

      +

      Milvus utilise Tantivy pour prendre en charge l'indexation inversée et la recherche textuelle basée sur les termes. Le processus implique

      +
        +
      1. Analyseur: Tokenise et traite le texte d'entrée.

      2. +
      3. Indexation: Création d'un index inversé mettant en correspondance des tokens uniques avec des documents.

      4. +
      +

      Pour plus de détails, reportez-vous à la section Correspondance de textes.

      diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..67f010cc5 --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"Modèle de filtre","href":"Filter-Templating​","type":1,"isActive":false},{"label":"Vue d'ensemble","href":"Overview​","type":2,"isActive":false},{"label":"Opérations de recherche","href":"Search-Operations​","type":2,"isActive":false},{"label":"Opérations de requête","href":"Query-Operations​","type":2,"isActive":false},{"label":"Opérations de suppression","href":"Delete-Operations​","type":2,"isActive":false},{"label":"Conclusion","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..bdb08a03c --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,156 @@ +--- +id: filtering-templating.md +summary: >- + Dans Milvus, les expressions de filtre complexes comportant de nombreux + éléments, en particulier celles qui impliquent des caractères non ASCII tels + que les caractères CJK, peuvent affecter de manière significative les + performances des requêtes. Pour remédier à ce problème, Milvus introduit un + mécanisme de modélisation des expressions de filtre conçu pour améliorer + l'efficacité en réduisant le temps consacré à l'analyse des expressions + complexes. Cette page explique comment utiliser le modèle d'expression de + filtre dans les opérations de recherche, d'interrogation et de suppression. +title: Filtrage Templating +--- +

      Modèle de filtre

      Dans Milvus, les expressions de filtre complexes comportant de nombreux éléments, en particulier celles qui impliquent des caractères non ASCII tels que les caractères CJK, peuvent affecter de manière significative les performances des requêtes. Pour y remédier, Milvus introduit un mécanisme de modélisation des expressions de filtre conçu pour améliorer l'efficacité en réduisant le temps consacré à l'analyse des expressions complexes. Cette page explique comment utiliser le modèle d'expression de filtre dans les opérations de recherche, de requête et de suppression.

      +

      Vue d'ensemble

      Le modèle d'expression de filtre vous permet de créer des expressions de filtre avec des espaces réservés, qui peuvent être remplacés dynamiquement par des valeurs pendant l'exécution de la requête. En utilisant le modèle, vous évitez d'intégrer de grands tableaux ou des expressions complexes directement dans le filtre, ce qui réduit le temps d'analyse et améliore les performances de la requête.

      +

      Supposons que vous ayez une expression de filtre impliquant deux champs, age et city, et que vous souhaitiez trouver toutes les personnes dont l'âge est supérieur à 25 ans et qui vivent soit à "北京" (Pékin), soit à "上海" (Shanghai). Au lieu d'intégrer directement les valeurs dans l'expression du filtre, vous pouvez utiliser un modèle.

      +
      filter = "age > {age} AND city IN {city}"​
      +filter_params = {"age": 25, "city": ["北京", "上海"]}​
      +
      +
      +

      Ici, {age} et {city} sont des espaces réservés qui seront remplacés par les valeurs réelles de filter_params lorsque la requête sera exécutée.

      +

      L'utilisation d'un modèle d'expression de filtre dans Milvus présente plusieurs avantages clés.

      +
        +
      • Réduction du temps d'analyse: en remplaçant les expressions de filtre complexes ou volumineuses par des caractères génériques, le système passe moins de temps à analyser et à traiter le filtre.

      • +
      • Amélioration des performances des requêtes: La réduction des frais généraux d'analyse permet d'améliorer les performances des requêtes, ce qui se traduit par des QPS plus élevés et des temps de réponse plus rapides.

      • +
      • Évolutivité: Au fur et à mesure que vos ensembles de données se développent et que les expressions de filtre deviennent plus complexes, le templating garantit que les performances restent efficaces et évolutives.

      • +
      +

      Opérations de recherche

      Pour les opérations de recherche dans Milvus, l'expression filter est utilisée pour définir la condition de filtrage et le paramètre filter_params est utilisé pour spécifier les valeurs des espaces réservés. Le dictionnaire filter_params contient les valeurs dynamiques que Milvus utilisera pour remplacer l'expression de filtrage.

      +
      expr = "age > {age} AND city IN {city}"​
      +filter_params = {"age": 25, "city": ["北京", "上海"]}​
      +res = client.search(​
      +    "hello_milvus",​
      +    vectors[:nq],​
      +    filter=expr,​
      +    limit=10,​
      +    output_fields=["age", "city"],​
      +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
      +    filter_params=filter_params,​
      +)​
      +
      +
      +

      Dans cet exemple, Milvus remplacera dynamiquement {age} par 25 et {city} par ["北京", "上海"] lors de l'exécution de la recherche.

      +

      Opérations de requête

      Le même mécanisme de modélisation peut être appliqué aux opérations de requête dans Milvus. Dans la fonction query, vous définissez l'expression du filtre et utilisez filter_params pour spécifier les valeurs à remplacer.

      +
      expr = "age > {age} AND city IN {city}"​
      +filter_params = {"age": 25, "city": ["北京", "上海"]}​
      +res = client.query(​
      +    "hello_milvus",​
      +    filter=expr,​
      +    output_fields=["age", "city"],​
      +    filter_params=filter_params​
      +)​
      +
      +
      +

      En utilisant filter_params, Milvus gère efficacement l'insertion dynamique des valeurs, ce qui améliore la vitesse d'exécution de la requête.

      +

      Opérations de suppression

      Vous pouvez également utiliser le modèle d'expression de filtre dans les opérations de suppression. Comme pour la recherche et la requête, l'expression filter définit les conditions et filter_params fournit les valeurs dynamiques pour les espaces réservés.

      +
      expr = "age > {age} AND city IN {city}"​
      +filter_params = {"age": 25, "city": ["北京", "上海"]}​
      +res = client.delete(​
      +    "hello_milvus",​
      +    filter=expr,​
      +    filter_params=filter_params​
      +)​
      +
      +
      +

      Cette approche améliore les performances des opérations de suppression, en particulier lorsqu'il s'agit de conditions de filtrage complexes.

      +

      Conclusion

      Le modelage des expressions de filtre est un outil essentiel pour optimiser les performances des requêtes dans Milvus. En utilisant les caractères génériques et le dictionnaire filter_params, vous pouvez réduire considérablement le temps passé à analyser des expressions de filtre complexes. Cela permet d'accélérer l'exécution des requêtes et d'améliorer les performances globales.

      diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..aa41e794d --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"Opérateurs JSON","href":"JSON-Operators​","type":1,"isActive":false},{"label":"Opérateurs JSON disponibles","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_CONTAINS_ALL","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"JSON_COTAINS_ANY","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..99a536e8d --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,123 @@ +--- +id: json-operators.md +summary: >- + Milvus prend en charge des opérateurs avancés pour l'interrogation et le + filtrage des champs JSON, ce qui les rend parfaits pour la gestion de données + complexes et structurées. Ces opérateurs permettent d'effectuer des requêtes + très efficaces dans les documents JSON et d'extraire des entités en fonction + d'éléments, de valeurs ou de conditions spécifiques dans les champs JSON. + Cette section vous guidera dans l'utilisation des opérateurs spécifiques à + JSON dans Milvus, en fournissant des exemples pratiques pour illustrer leur + fonctionnalité. +title: Opérateurs JSON +--- +

      Opérateurs JSON

      Milvus prend en charge des opérateurs avancés pour l'interrogation et le filtrage des champs JSON, ce qui les rend parfaits pour la gestion de données complexes et structurées. Ces opérateurs permettent d'effectuer des requêtes très efficaces dans les documents JSON, ce qui permet d'extraire des entités en fonction d'éléments, de valeurs ou de conditions spécifiques dans les champs JSON. Cette section vous guidera dans l'utilisation des opérateurs spécifiques à JSON dans Milvus, en fournissant des exemples pratiques pour illustrer leur fonctionnalité.

      +
      +

      Les champs JSON ne peuvent pas traiter les structures complexes imbriquées et traitent toutes les structures imbriquées comme des chaînes simples. Par conséquent, lorsque vous travaillez avec des champs JSON, il est conseillé d'éviter une imbrication trop profonde et de veiller à ce que vos structures de données soient aussi plates que possible pour des performances optimales.

      +
      +

      Opérateurs JSON disponibles

      Milvus fournit plusieurs opérateurs JSON puissants qui permettent de filtrer et d'interroger les données JSON.

      + +

      Explorons ces opérateurs à l'aide d'exemples pour voir comment ils peuvent être appliqués dans des scénarios réels.

      +

      JSON_CONTAINS

      L'opérateur json_contains vérifie si un élément ou un sous-réseau spécifique existe dans un champ JSON. Il est utile lorsque vous voulez vous assurer qu'un tableau ou un objet JSON contient une valeur particulière.

      +

      Exemple

      +

      Imaginez que vous ayez une collection de produits, chacun avec un champ tags qui contient un tableau JSON de chaînes de caractères, comme ["electronics", "sale", "new"]. Vous souhaitez filtrer les produits qui ont la balise "sale".

      +
      # JSON data: {"tags": ["electronics", "sale", "new"]}​
      +filter = 'json_contains(tags, "sale")'​
      +
      +
      +

      Dans cet exemple, Milvus renvoie tous les produits dont le champ tags contient l'élément "sale".

      +

      JSON_CONTAINS_ALL

      L'opérateur json_contains_all garantit que tous les éléments d'une expression JSON spécifiée sont présents dans le champ cible. Il est particulièrement utile lorsque vous devez faire correspondre plusieurs valeurs dans un tableau JSON.

      +

      Exemple

      +

      Si vous voulez trouver tous les produits qui ont les étiquettes "electronics", "sale", et "new", vous pouvez utiliser l'opérateur json_contains_all.

      +
      # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
      +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
      +
      +
      +

      Cette requête renverra tous les produits dont le tableau tags contient les trois éléments spécifiés : "electronics", "sale", et "new".

      +

      JSON_COTAINS_ANY

      L'opérateur json_contains_any filtre les entités dont au moins un membre de l'expression JSON existe dans le champ. Cet opérateur est utile lorsque vous souhaitez faire correspondre des entités sur la base de l'une des valeurs possibles.

      +

      Exemple

      +

      Supposons que vous souhaitiez filtrer les produits qui ont au moins une des balises "electronics", "sale", ou "new". Vous pouvez utiliser l'opérateur json_contains_any pour y parvenir.

      +
      # JSON data: {"tags": ["electronics", "sale", "new"]}​
      +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
      +
      +
      +

      Dans ce cas, Milvus renverra tous les produits qui ont au moins une des balises de la liste ["electronics", "new", "clearance"]. Même si un produit n'a qu'une seule de ces balises, il sera inclus dans le résultat.

      diff --git a/localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..2e1e8d8c6 --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"Vue d'ensemble","href":"Overview","type":2,"isActive":false},{"label":"Accueil","href":"Home","type":2,"isActive":false},{"label":"Collections","href":"Collections","type":2,"isActive":false},{"label":"Requête","href":"Query","type":2,"isActive":false},{"label":"Données","href":"Data","type":2,"isActive":false},{"label":"Tâches","href":"Tasks","type":2,"isActive":false},{"label":"Requêtes lentes","href":"Slow-requests","type":2,"isActive":false},{"label":"Configurations","href":"Configurations","type":2,"isActive":false},{"label":"Outils","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..e13fcfeb7 --- /dev/null +++ b/localization/v2.5.x/site/fr/userGuide/tools/milvus-webui.md @@ -0,0 +1,280 @@ +--- +id: milvus-webui.md +summary: >- + Milvus Web UI est un outil de gestion graphique pour Milvus. Il améliore + l'observabilité du système grâce à une interface simple et intuitive. Vous + pouvez +title: Milvus WebUI +--- +

      Milvus WebUI

      Milvus WebUI est un outil de gestion graphique pour Milvus. Il améliore l'observabilité du système grâce à une interface simple et intuitive. Vous pouvez utiliser l'interface Web de Milvus pour observer les statistiques et les métriques des composants et des dépendances de Milvus, vérifier les détails de la base de données et de la collection, et répertorier les configurations détaillées de Milvus.

      +

      Vue d'ensemble

      L'interface Web de Milvus diffère de Birdwatcher et d'Attu en ce sens qu'il s'agit d'un outil intégré permettant d'observer l'ensemble du système à l'aide d'une interface simple et intuitive.

      +

      Le tableau suivant compare les fonctionnalités de l'interface Web de Milvus et de Birdwatcher/Attu :

      + + + + + + + + + + + +
      FonctionnalitéMilvus Web UIBirdwatcherAttu
      Forme opérationnelleGUICLIGUI
      Utilisateurs ciblesMainteneurs, développeursMainteneursDéveloppeurs
      InstallationIntégréOutil autonomeOutil autonome
      DépendancesMilvusMilvus / etcdMilvus
      Fonctionnalités principalesEnvironnement d'exécution, détails de la base de données/collection, segments, canaux, tâches et demandes de requêtes lentesInspection des métadonnées et exécution de l'API MilvusGestion de la base de données et tâches opérationnelles
      +

      L'interface Web Milvus offre les fonctionnalités suivantes :

      +

      + + Milvus Web UI overview + Présentation de l'interface Web Milvus

      +
        +
      • Accueil

        +

        Vous pouvez trouver des informations sur l'instance Milvus en cours d'exécution, ses composants, les clients connectés et les dépendances.

      • +
      • Collections

        +

        Vous pouvez afficher la liste des bases de données et des collections actuellement dans Milvus et vérifier leurs détails.

      • +
      • Requête

        +

        Vous pouvez consulter les statistiques collectées des nœuds de requête et des coordinateurs de requête en termes de segments, de canaux, de répliques et de groupes de ressources.

      • +
      • Données

        +

        Vous pouvez consulter les statistiques collectées des nœuds de données en termes de segments et de canaux.

      • +
      • Tâches

        +

        Vous pouvez afficher la liste des tâches en cours d'exécution dans Milvus, y compris les tâches du planificateur Querycoord, les tâches de compactage, les tâches de construction d'index, les tâches d'importation et les tâches de synchronisation des données.

      • +
      • Demandes lentes

        +

        Vous pouvez afficher la liste des demandes lentes dans Milvus, y compris le type de demande, la durée de la demande et les paramètres de la demande.

      • +
      • Configurations

        +

        Vous pouvez afficher la liste des configurations de Milvus et leurs valeurs.

      • +
      • Outils

        +

        Vous pouvez accéder aux deux outils intégrés, pprof et l'outil de visualisation des données Milvus, à partir de l'interface Web.

      • +
      +

      Accueil

      La page d'accueil contient les informations suivantes :

      +

      + + Milvus Web UI Home + Accueil de l'interface Web Milvus

      +
        +
      • Informations sur le système: Afficher les informations sur le système, y compris les informations sur le mode de déploiement, l'image utilisée dans le déploiement et les informations connexes.

      • +
      • Informations sur les composants: Afficher l'état et les métriques des composants de Milvus, y compris l'état et les métriques des nœuds de requête, des nœuds de données, des nœuds d'index, des coordinateurs et des proxys.

      • +
      • Clients connectés: Affichez les clients connectés et leurs informations, notamment le type et la version du SDK, le nom d'utilisateur et l'historique de leurs accès.

      • +
      • Dépendances du système: Affichez l'état et les mesures des dépendances de Milvus, y compris l'état et les mesures du méta-magasin, de la file d'attente de messages et du stockage d'objets.

      • +
      +

      Collections

      Sur la page Collections, vous pouvez afficher la liste des bases de données et des collections actuellement dans Milvus et vérifier leurs détails.

      +

      + + Milvus Web UI Collections + Collections de l'interface Web de Milvus

      +
        +
      • Base de données: Afficher la liste des bases de données actuellement dans Milvus et leurs détails.

      • +
      • Collection: Voir la liste des collections dans chaque base de données et leurs détails.

      • +
      +

      Requête

      + + Milvus Web UI Query Page + Page de requête de l'interface Web de Milvus

      +
        +
      • Segments: Affiche la liste des segments et leurs détails, y compris l'ID du segment, la collection correspondante, l'état, la taille, etc.

        +

        Dans la colonne De, vous pouvez trouver la source du segment. Les indicateurs de sources possibles sont les suivants

        +
          +
        • QN: Query node (nœud de requête)

        • +
        • CT: cible actuelle dans QueryCoord

        • +
        • NT: Prochaine cible dans QueryCoord

        • +
        • DIST: Distribution dans QueryCoord

        • +
      • +
      • Channels (Canaux) : Affichez la liste des canaux et leurs détails, y compris le nom du canal, les collections correspondantes, etc.

        +

        Dans la colonne From, vous pouvez trouver la source du segment. Les indicateurs de sources possibles sont les suivants

        +
          +
        • QN: Query node (nœud de requête)

        • +
        • CT: cible actuelle dans QueryCoord

        • +
        • NT: Prochaine cible dans QueryCoord

        • +
        • DIST: Distribution dans le QueryCoord

        • +
      • +
      • Répliques: Affiche la liste des répliques et leurs détails, y compris l'ID de la réplique, la collection correspondante, etc.

      • +
      • Groupes de ressources: Affichez la liste des groupes de ressources et leurs détails, y compris le nom du groupe de ressources, le nombre de nœuds de requête dans le groupe, et ses configurations, etc.

      • +
      +

      Données

      + + Milvus Web UI Data Page + Page de données de l'interface Web Milvus

      +
        +
      • Segments: Affiche la liste des segments des nœuds de données/coordinateurs et leurs détails, y compris l'ID du segment, la collection correspondante, l'état, la taille, etc.

      • +
      • Canaux: Affichez la liste des canaux des nœuds de données/coordinateurs et leurs détails, y compris le nom du canal, les collections correspondantes, etc.

      • +
      +

      Tâches

      + + Milvus Web UI Tasks Page + Page des tâches de l'interface Web Milvus

      +
        +
      • Tâches: Affiche la liste des tâches en cours d'exécution dans Milvus, y compris le type de tâche, l'état et les actions.

        +
          +
        • Tâches QueryCoord: Affiche toutes les tâches du planificateur QueryCoord, y compris les vérificateurs d'équilibre, d'index/segment/canal/chef de file au cours des 15 dernières minutes.

        • +
        • Tâches de compactage: Afficher toutes les tâches de compactage des coordinateurs de données au cours des 15 dernières minutes.

        • +
        • Tâches de construction d'index: Voir toutes les tâches de construction d'index des coordinateurs de données au cours des 30 dernières minutes.

        • +
        • Tâches d'importation: Voir toutes les tâches d'importation effectuées par les coordinateurs de données au cours des 30 dernières minutes.

        • +
        • Tâches de synchronisation des données: Afficher toutes les tâches de synchronisation des données effectuées par les nœuds de données au cours des 15 dernières minutes.

        • +
      • +
      +

      Requêtes lentes

      + + Milvus Web UI Slow Requests Page + Page des demandes lentes de l'interface Web Milvus

      +
        +
      • Requêtes lentes: Une demande lente est une recherche ou une requête dont le temps de latence est supérieur à la valeur de proxy.slowQuerySpanInSeconds spécifiée dans la configuration. La liste des requêtes lentes affiche toutes les requêtes lentes des 15 dernières minutes.
      • +
      +

      Configurations

      + + Milvus Web UI Configurations Page + Page des configurations de l'interface Web Milvus

      +
        +
      • Configurations: Affiche la liste des configurations d'exécution Milvus et leurs valeurs.
      • +
      +

      Outils

        +
      • pprof: Accéder à l'outil pprof pour le profilage et le débogage de Milvus.

      • +
      • Outil de visualisation des données Milvus: Accédez à l'outil de visualisation des données Milvus pour visualiser les données dans Milvus.

      • +
      diff --git a/localization/v2.5.x/site/it/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/it/adminGuide/config_jaeger_tracing.md index 83dd4f6b2..5e382eacc 100644 --- a/localization/v2.5.x/site/it/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/it/adminGuide/config_jaeger_tracing.md @@ -61,13 +61,13 @@ summary: >-
      $ kubectl create namespace observability
       $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.62.0/jaeger-operator.yaml -n observability
       
      -

      A questo punto, dovrebbe essere disponibile un deployment jaeger-operator. È possibile visualizzarlo eseguendo il seguente comando:

      +

      A questo punto, dovrebbe essere disponibile una distribuzione jaeger-operator. È possibile visualizzarlo eseguendo il seguente comando:

      $ kubectl get deployment jaeger-operator -n observability
       
       NAME              DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
       jaeger-operator   1         1         1            1           48s
       
      -

      2. Distribuire Jager

      Il modo più semplice per creare un'istanza di Jaeger è creare un file YAML come nell'esempio seguente. Questo installerà la strategia predefinita AllInOne, che distribuisce l'immagine all-in-one (che combina jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) in un singolo pod, utilizzando per impostazione predefinita lo storage in-memory.

      +

      2. Distribuire Jaeger

      Il modo più semplice per creare un'istanza di Jaeger è creare un file YAML come nell'esempio seguente. Questo installerà la strategia predefinita AllInOne, che distribuisce l'immagine all-in-one (che combina jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) in un singolo pod, utilizzando per impostazione predefinita lo storage in-memory.

      Se si desidera memorizzare le tracce per un lungo periodo, fare riferimento a production-strategy.

      apiVersion: jaegertracing.io/v1
       kind: Jaeger
      @@ -136,7 +136,7 @@ $ helm upgrade --install -f values.yaml my-release milvus/milvus
       NAME           CLASS    HOSTS   ADDRESS         PORTS   AGE
       jaeger-query   <none>   *       192.168.122.34  80      14m
       
      -

      Una volta che l'ingress è disponibile, è possibile accedere all'interfaccia utente di Jaeger navigando su http://${ADDRESS}. Sostituire ${ADDRESS} con l'indirizzo IP effettivo dell'ingress.

      +

      Una volta che l'ingress è disponibile, si può accedere all'interfaccia utente di Jaeger navigando su http://${ADDRESS}. Sostituire ${ADDRESS} con l'indirizzo IP effettivo dell'ingress.

      La seguente schermata mostra l'interfaccia Jaeger con le tracce di Milvus durante un'operazione di ricerca e un'operazione di raccolta del carico:

      @@ -145,4 +145,4 @@ jaeger-query <none> * 192.168 Trace Load Collection Request - Richiesta di raccolta del carico

      + Traccia della richiesta di raccolta del carico

      diff --git a/localization/v2.5.x/site/it/adminGuide/configure-docker.json b/localization/v2.5.x/site/it/adminGuide/configure-docker.json index 6ef3fc481..03ca49438 100644 --- a/localization/v2.5.x/site/it/adminGuide/configure-docker.json +++ b/localization/v2.5.x/site/it/adminGuide/configure-docker.json @@ -1 +1 @@ -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n standalone:\n container_name: milvus-standalone\n image: milvusdb/milvus:v2.2.13\n command: [\"milvus\", \"run\", \"standalone\"]\n environment:\n ETCD_ENDPOINTS: etcd:2379\n MINIO_ADDRESS: minio:9000\n volumes:\n - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml # Map the local path to the container path\n - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n ports:\n - \"19530:19530\"\n - \"9091:9091\"\n depends_on:\n - \"etcd\"\n - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurare Milvus con Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Scaricare un file di configurazione","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modificare il file di configurazione","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Scaricare un file di installazione","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modificare il file di installazione","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Avviare Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"Cosa succede dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n standalone:\n container_name: milvus-standalone\n image: milvusdb/milvus:v2.2.13\n command: [\"milvus\", \"run\", \"standalone\"]\n environment:\n ETCD_ENDPOINTS: etcd:2379\n MINIO_ADDRESS: minio:9000\n volumes:\n - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml # Map the local path to the container path\n - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n ports:\n - \"19530:19530\"\n - \"9091:9091\"\n depends_on:\n - \"etcd\"\n - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurazione di Milvus con Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Scaricare un file di configurazione","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modificare il file di configurazione","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Scaricare un file di installazione","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modificare il file di installazione","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Avviare Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"Cosa succede dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/configure-docker.md b/localization/v2.5.x/site/it/adminGuide/configure-docker.md index cc49984b5..630464f16 100644 --- a/localization/v2.5.x/site/it/adminGuide/configure-docker.md +++ b/localization/v2.5.x/site/it/adminGuide/configure-docker.md @@ -3,9 +3,9 @@ id: configure-docker.md label: Docker Compose related_key: configure summary: Configurare Milvus con Docker Compose. -title: Configurare Milvus con Docker Compose +title: Configurazione di Milvus con Docker Compose --- -

      Configurare Milvus con Docker Compose

      Scaricare milvus.yaml direttamente o con il seguente comando.

      -
      $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
      +    

      Scaricare milvus.yaml direttamente o con il seguente comando.

      +
      $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
       

      Modificare il file di configurazione

      Scaricate il file di installazione di Milvus standalone e salvatelo come docker-compose.yml.

      +

      Scaricate il file di installazione di Milvus standalone e salvatelo come docker-compose.yml.

      È anche possibile eseguire semplicemente il seguente comando.

      # For Milvus standalone
      -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
      +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
       

      Modificare il file di installazione

      In docker-compose.yml, aggiungere una sezione volumes sotto ogni milvus-standalone.

      -

      Mappare il percorso locale del file milvus.yaml sui corrispondenti percorsi del contenitore docker dei file di configurazione /milvus/configs/milvus.yaml sotto tutte le sezioni volumes.

      +

      Mappate il percorso locale del vostro file milvus.yaml sui percorsi corrispondenti del contenitore docker ai file di configurazione /milvus/configs/milvus.yaml sotto tutte le sezioni volumes.

      ...
         standalone:
           container_name: milvus-standalone
      diff --git a/localization/v2.5.x/site/it/adminGuide/drop_users_roles.json b/localization/v2.5.x/site/it/adminGuide/drop_users_roles.json
      new file mode 100644
      index 000000000..e42f0d264
      --- /dev/null
      +++ b/localization/v2.5.x/site/it/adminGuide/drop_users_roles.json
      @@ -0,0 +1 @@
      +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\n# create a user​\nclient.drop_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.client.ConnectConfig​\nimport io.milvus.v2.client.MilvusClientV2​\nimport io.milvus.v2.service.rbac.request.DropUserReq​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nDropUserReq dropUserReq = DropUserReq.builder()​\n        .userName(\"user_1\")​\n        .build();​\nclient.dropUser(dropUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.deleteUser({​\n    username: 'user_1'​\n})​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","import io.milvus.v2.service.rbac.request.listUsersReq​\n​\nList resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.listUsers()​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root']​\n\n","from pymilvus import MilvusClient​\n​\nclient.drop_role(role_name=\"role_a\")​\n\n","import io.milvus.v2.service.rbac.request.DropRoleReq​\n​\nDropRoleReq dropRoleReq = DropRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\nclient.dropRole(dropRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.dropRole({​\n   roleName: 'role_a',​\n })​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List resp = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.listRoles(​\n    includeUserInfo: True​\n)​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin']​\n\n"],"headingContent":"Drop Users & Roles​","anchorList":[{"label":"Eliminazione di utenti e ruoli","href":"Drop-Users--Roles​","type":1,"isActive":false},{"label":"Eliminare un utente","href":"Drop-a-user​","type":2,"isActive":false},{"label":"Eliminare un ruolo","href":"Drop-a-role​","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/it/adminGuide/drop_users_roles.md b/localization/v2.5.x/site/it/adminGuide/drop_users_roles.md
      new file mode 100644
      index 000000000..383627b89
      --- /dev/null
      +++ b/localization/v2.5.x/site/it/adminGuide/drop_users_roles.md
      @@ -0,0 +1,205 @@
      +---
      +id: drop_users_roles.md
      +related_key: enable RBAC
      +summary: >-
      +  Per garantire la sicurezza dei dati, si consiglia di eliminare gli utenti e i
      +  ruoli non più utilizzati. Questa guida spiega come eliminare gli utenti e i
      +  ruoli.
      +title: Eliminazione di utenti e ruoli
      +---
      +

      Eliminazione di utenti e ruoli

      Per garantire la sicurezza dei dati, si consiglia di eliminare gli utenti e i ruoli non più utilizzati. Questa guida spiega come eliminare utenti e ruoli.

      +

      Eliminare un utente

      L'esempio seguente mostra come eliminare l'utente user_1.

      +
      +

      L'utente root non può essere eliminato.

      +
      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +# create a user​
      +client.drop_user(user_name="user_1")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig​
      +import io.milvus.v2.client.MilvusClientV2​
      +import io.milvus.v2.service.rbac.request.DropUserReq​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +        .uri("http://localhost:19530")​
      +        .token("root:Milvus")​
      +        .build();​
      +        ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +DropUserReq dropUserReq = DropUserReq.builder()​
      +        .userName("user_1")​
      +        .build();​
      +client.dropUser(dropUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +milvusClient.deleteUser({​
      +    username: 'user_1'​
      +})​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1"​
      +}'​
      +
      +
      +

      Una volta eliminato l'utente, è possibile elencare tutti gli utenti esistenti per verificare se l'operazione di eliminazione è andata a buon fine.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_users()​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.listUsersReq​
      +​
      +List<String> resp = client.listUsers();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.listUsers()​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Di seguito è riportato un esempio di output. Non c'è user_1 nell'elenco. L'operazione di drop è riuscita.

      +
      ['root']​
      +
      +
      +

      Eliminare un ruolo

      L'esempio seguente mostra come abbandonare il ruolo role_a.

      +
      +

      Il ruolo incorporato admin non può essere eliminato.

      +
      + +
      from pymilvus import MilvusClient​
      +​
      +client.drop_role(role_name="role_a")​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.DropRoleReq​
      +​
      +DropRoleReq dropRoleReq = DropRoleReq.builder()​
      +        .roleName("role_a")​
      +        .build();​
      +client.dropRole(dropRoleReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.dropRole({​
      +   roleName: 'role_a',​
      + })​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      +

      Una volta eliminato il ruolo, è possibile elencare tutti i ruoli esistenti per verificare se l'operazione di eliminazione è andata a buon fine.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.list_roles()​
      +
      +
      +
      List<String> resp = client.listRoles();​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.listRoles(​
      +    includeUserInfo: True​
      +)​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Di seguito è riportato un esempio di output. Nell'elenco non c'è role_a. L'operazione di abbandono è riuscita.

      +
      ['admin']​
      +
      +
      diff --git a/localization/v2.5.x/site/it/adminGuide/grant_privileges.json b/localization/v2.5.x/site/it/adminGuide/grant_privileges.json new file mode 100644 index 000000000..e56dbb13d --- /dev/null +++ b/localization/v2.5.x/site/it/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"Concessione di privilegi o gruppi di privilegi ai ruoli","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"Assegnare un privilegio o un gruppo di privilegi a un ruolo","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"Descrivere un ruolo","href":"Describe-a-role","type":2,"isActive":false},{"label":"Revocare un privilegio o un gruppo di privilegi a un ruolo","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/grant_privileges.md b/localization/v2.5.x/site/it/adminGuide/grant_privileges.md new file mode 100644 index 000000000..561a3481c --- /dev/null +++ b/localization/v2.5.x/site/it/adminGuide/grant_privileges.md @@ -0,0 +1,542 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: >- + Una volta creato un ruolo, è possibile assegnare i privilegi al ruolo. Questa + guida illustra come concedere privilegi o gruppi di privilegi a un ruolo. +title: Concessione di privilegi o gruppi di privilegi ai ruoli +--- +

      Concessione di privilegi o gruppi di privilegi ai ruoli

      Una volta creato un ruolo, è possibile concedere privilegi al ruolo. Questa guida illustra come concedere privilegi o gruppi di privilegi a un ruolo.

      +

      Assegnare un privilegio o un gruppo di privilegi a un ruolo

      Milvus 2.5 introduce una nuova versione dell'API che semplifica l'operazione di assegnazione. Non è più necessario cercare il tipo di oggetto quando si concede un privilegio a un ruolo. Di seguito sono riportati i parametri e le relative spiegazioni.

      +
        +
      • nome_ruolo: il nome del ruolo di destinazione a cui devono essere concessi i privilegi o i gruppi di privilegi.

      • +
      • Risorsa: La risorsa di destinazione di un privilegio, che può essere un'istanza specifica, un database o una raccolta. La tabella seguente spiega come specificare la risorsa nel metodo client.grantV2().

      • +
      +

      Livello

      +

      Risorsa

      +

      Metodo di concessione

      +

      Note

      +

      Raccolta

      +

      +

      Una collezione specifica

      +

      +

      client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

      +

      Immettere il nome della raccolta di destinazione e il nome del database a cui appartiene la raccolta di destinazione.

      +

      +

      Tutte le raccolte sotto uno specifico database

      +

      client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

      +

      Immettere il nome del database di destinazione e un carattere jolly `*` come nome della raccolta.

      +

      **Database**

      +

      Un database specifico

      +

      client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

      +

      Immettere il nome del database di destinazione e un carattere jolly `*` come nome della collezione.

      +

      +

      Tutti i database dell'istanza corrente

      +

      client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

      +

      Inserire `*` come nome del database e `*` come nome della collezione.

      +

      **Istanza**

      +

      L'istanza corrente

      +

      client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

      +

      Inserire `*` come nome del database e `*` come nome della collezione.

      +
      +
        +
      • Privilegio: Il privilegio specifico o il gruppo di privilegi da concedere a un ruolo. Attualmente, Milvus offre 56 tipi di privilegi che possono essere concessi. La tabella seguente elenca i privilegi di Milvus.

        +

        +

        La colonna del tipo nella tabella sottostante è utilizzata per facilitare la ricerca rapida dei privilegi ed è usata solo a scopo di classificazione. Quando si concedono privilegi, non è necessario comprendere i tipi. È sufficiente inserire i privilegi corrispondenti.

        +

      • +
      +

      **Tipo **

      +

      **Privilegio**

      +

      **Descrizione**

      +

      **Descrizione dell'API pertinente sul lato client**

      +

      Privilegi del database

      +

      ElencoDatabase

      +

      Visualizza tutti i database nell'istanza corrente

      +

      [ListDatabases](https://milvus.io/docs/manage_databases.md)

      +

      DescriviDatabase

      +

      Visualizza i dettagli di un database

      +

      [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

      +

      CreaDatabase

      +

      Creare un database

      +

      [CreateDatabase](https://milvus.io/docs/manage_databases.md)

      +

      AbbandonaDatabase

      +

      Eliminare un database

      +

      [DropDatabase](https://milvus.io/docs/manage_databases.md)

      +

      Alterare il database

      +

      Modifica le proprietà di un database

      +

      [AlterDatabase](https://milvus.io/docs/manage_databases.md)

      +

      Privilegi di raccolta

      +

      +

      GetFlushState

      +

      Controlla lo stato dell'operazione di lavaggio della raccolta

      +

      [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

      +

      Ottieni lo stato di caricamento

      +

      Controlla lo stato di caricamento di una raccolta

      +

      [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

      +

      OttieniProgressoCaricamento

      +

      Controlla l'avanzamento del caricamento di un insieme

      +

      [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

      +

      Mostra collezioni

      +

      Visualizza tutte le raccolte con privilegi di raccolta

      +

      [Mostra collezioni](https://milvus.io/docs/view-collections.md)

      +

      ListaAliases

      +

      Visualizza tutti gli alias di una collezione

      +

      [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

      +

      DescriviCollezione

      +

      Visualizza i dettagli di una collezione

      +

      [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

      +

      DescrivereAlias

      +

      Visualizza i dettagli di un alias

      +

      [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

      +

      Ottieni statistiche

      +

      Ottiene le statistiche di una collezione (ad esempio, il numero di entità in una collezione).

      +

      [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

      +

      CreaCollezione

      +

      Crea una collezione

      +

      [CreateCollection](https://milvus.io/docs/create-collection.md)

      +

      Abbandona la collezione

      +

      Gettare una collezione

      +

      [DropCollection](https://milvus.io/docs/drop-collection.md)

      +

      Caricare

      +

      Carica una collezione

      +

      [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

      +

      Rilasciare

      +

      Rilascia una collezione

      +

      [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

      +

      Risciacquare

      +

      +

      Persiste tutte le entità di una collezione in un segmento sigillato. Qualsiasi entità inserita dopo l'operazione di flush sarà memorizzata in un nuovo segmento.

      +

      [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

      +

      Compattazione

      +

      Attiva manualmente la compattazione

      +

      [Compatta](https://milvus.io/docs/v2.0.x/compact_data.md)

      +

      RinominaCollezione

      +

      Rinomina una collezione

      +

      [RinominaCollezione](https://milvus.io/docs/modify-collection.md)

      +

      CreaAlias

      +

      Crea un alias per una collezione

      +

      [CreateAlias](https://milvus.io/docs/manage-aliases.md)

      +

      EliminaAlias

      +

      Elimina l'alias di una collezione

      +

      [DropAlias](https://milvus.io/docs/manage-aliases.md)

      +

      ArrossisciTutti

      +

      Cancella tutte le raccolte in un database

      +

      [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

      +

      Privilegi della partizione

      +

      HaPartizione

      +

      Controlla se esiste una partizione

      +

      [HasPartition](https://milvus.io/docs/manage-partitions.md)

      +

      Mostra partizioni

      +

      Visualizza tutte le partizioni di un insieme

      +

      [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

      +

      Creare una partizione

      +

      Crea una partizione

      +

      [CreatePartition](https://milvus.io/docs/manage-partitions.md)

      +

      Abbandona partizione

      +

      Eliminare una partizione

      +

      [EliminarePartizione](https://milvus.io/docs/manage-partitions.md)

      +

      Privilegi degli indici

      +

      IndiceDettaglio

      +

      Visualizza i dettagli di un indice

      +

      +

      [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

      +

      CreaIndice

      +

      Crea un indice

      +

      [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

      +

      Rilasciare l'indice

      +

      Eliminare un indice

      +

      [EliminareIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

      +

      Privilegi di gestione delle risorse

      +

      +

      Bilanciamento del carico

      +

      Ottenere il bilanciamento del carico

      +

      [LoadBalance](https://milvus.io/docs/resource_group.md)

      +

      CreaGruppoRisorse

      +

      Crea un gruppo di risorse

      +

      [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

      +

      Abbandona il gruppo di risorse

      +

      Abbandona un gruppo di risorse

      +

      [AbbandonaGruppoRisorse](https://milvus.io/docs/resource_group.md)

      +

      AggiornaGruppi di risorse

      +

      Aggiorna un gruppo di risorse

      +

      [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

      +

      Descrivere un gruppo di risorse

      +

      Visualizza i dettagli di un gruppo di risorse

      +

      [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

      +

      Elenco dei gruppi di risorse

      +

      Visualizza tutti i gruppi di risorse dell'istanza corrente

      +

      [ListResourceGroups](https://milvus.io/docs/resource_group.md)

      +

      TrasferisciNodo

      +

      Trasferisce i nodi tra i gruppi di risorse

      +

      [TransferNode](https://milvus.io/docs/resource_group.md)

      +

      Trasferimento di repliche

      +

      Trasferisce le repliche tra gruppi di risorse

      +

      [TransferReplica](https://milvus.io/docs/resource_group.md)

      +

      BackupRBAC

      +

      Crea un backup di tutte le operazioni relative a RBAC nell'istanza corrente.

      +

      BackupRBAC

      +

      RipristinaRBAC

      +

      Ripristina un backup di tutte le operazioni relative a RBAC nell'istanza corrente

      +

      RipristinaRBAC

      +

      Privilegi dell'entità

      +

      +

      Interrogazione

      +

      Eseguire una query

      +

      [Query](https://milvus.io/docs/get-and-scalar-query.md)

      +

      Ricerca

      +

      Effettuare una ricerca

      +

      [Ricerca](https://milvus.io/docs/single-vector-search.md)

      +

      Inserire

      +

      Inserire entità

      +

      [Inserisci](https://milvus.io/docs/insert-update-delete.md)

      +

      Eliminare

      +

      Eliminare entità

      +

      [Elimina](https://milvus.io/docs/delete-entities.md)

      +

      Inserisci

      +

      Inserisce le entità

      +

      [Inserire](https://milvus.io/docs/upsert-entities.md)

      +

      Importazione

      +

      Inserire o importare in massa le entità

      +

      [BulkInsert/Import](https://milvus.io/docs/import-data.md)

      +

      Privilegi RBAC

      +

      CreaProprietà

      +

      Crea un utente o un ruolo

      +

      [CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

      +

      AggiornaUtente

      +

      Aggiorna la password di un utente

      +

      [AggiornaCredenziale](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

      +

      AbbandonaProprietà

      +

      Elimina la password di un utente o di un ruolo

      +

      [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

      +

      Selezionare la proprietà

      +

      Visualizza tutti gli utenti a cui è stato concesso un ruolo specifico

      +

      [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

      +

      GestisciProprietà

      +

      Gestione di un utente o di un ruolo o concessione di un ruolo a un utente

      +

      [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

      +

      SelezionaUtente

      +

      Visualizza tutti i ruoli concessi a un utente

      +

      [SelezionaUtente](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

      +

      CreaGruppoPrivilegi

      +

      Crea un gruppo di privilegi

      +

      [CreaGruppoPrivilegi](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +

      Abbandona gruppo di privilegi

      +

      Eliminare un gruppo di privilegi

      +

      [AbbandonaGruppoPrivilegio](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +

      Elenco dei gruppi di privilegi

      +

      Visualizza tutti i gruppi di privilegi nell'istanza corrente

      +

      [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +

      Operare il gruppo di privilegi

      +

      Aggiungere privilegi a un gruppo di privilegi o rimuoverli da esso

      +

      [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

      +
      +

      L'esempio seguente mostra come concedere il privilegio PrivilegeSearch su collection_01 sotto il database predefinito e un gruppo di privilegi chiamato privilege_group_1 al ruolo role_a.

      + +
      from pymilvus import MilvusClient
      +
      +client = MilvusClient(
      +    uri="http://localhost:19530",
      +    token="root:Milvus"
      +)
      +
      +client.grant_privilege_v2(
      +    role_name="role_a",
      +    privilege="Search"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +    
      +client.grant_privilege_v2(
      +    role_name="role_a",
      +    privilege="privilege_group_1"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +
      +client.grant_privilege_v2(
      +    role_name="role_a",
      +    privilege="ClusterReadOnly"
      +    collection_name='*'
      +    db_name='*',
      +)
      +
      +
      import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
      +
      +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("Search")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("privilege_group_1")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("ClusterReadOnly")
      +        .collectionName("*")
      +        .dbName("*")
      +        .build());
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"
      +
      +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
      +
      +const address = "http://localhost:19530";
      +const token = "root:Milvus";
      +const client = new MilvusClient({address, token});
      +
      +await milvusClient.grantPrivilege({
      +   roleName: 'role_a',
      +   object: 'Collection', 
      +   objectName: 'collection_01',
      +   privilegeName: 'Search'
      + });
      +
      +
      curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "Search",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "privilege_group_1",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "ClusterReadOnly",
      +    "collectionName": "*",
      +    "dbName":"*"
      +}'
      +
      +

      Descrivere un ruolo

      L'esempio seguente mostra come visualizzare i privilegi concessi al ruolo role_a utilizzando il metodo describe_role.

      + +
      from pymilvus import MilvusClient
      +
      +client.describe_role(role_name="role_a")
      +
      +
      import io.milvus.v2.service.rbac.response.DescribeRoleResp;
      +import io.milvus.v2.service.rbac.request.DescribeRoleReq
      +
      +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
      +        .roleName("role_a")
      +        .build();
      +DescribeRoleResp resp = client.describeRole(describeRoleReq);
      +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"
      +
      +client.ListRoles(context.Background())
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
      +
      +await milvusClient.describeRole({roleName: 'role_a'});
      +
      +
      curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a"
      +}'
      +
      +

      Di seguito è riportato un esempio di output.

      +
      {
      +     "role": "role_a",
      +     "privileges": [
      +         {
      +             "collection_name": "collection_01",
      +             "db_name": "default",
      +             "role_name": "role_a",
      +             "privilege": "Search",
      +             "grantor_name": "root"
      +         },
      +         "privilege_group_1"
      +     ]
      +}
      +
      +

      Revocare un privilegio o un gruppo di privilegi a un ruolo

      L'esempio seguente mostra come revocare il privilegio PrivilegeSearch su collection_01 sotto il database predefinito e il gruppo di privilegi privilege_group_1 che sono stati concessi al ruolo role_a.

      + +
      from pymilvus import MilvusClient
      +
      +client = MilvusClient(
      +    uri="http://localhost:19530",
      +    token="root:Milvus"
      +)
      +
      +client.revoke_privilege_v2(
      +    role_name="role_a",
      +    privilege="Search"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +    
      +client.revoke_privilege_v2(
      +    role_name="role_a",
      +    privilege="privilege_group_1"
      +    collection_name='collection_01'
      +    db_name='default',
      +)
      +
      +client.revoke_privilege_v2(
      +    role_name="role_a",
      +    privilege="ClusterReadOnly"
      +    collection_name='*'
      +    db_name='*',
      +)
      +
      +
      import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
      +
      +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("Search")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("privilege_group_1")
      +        .collectionName("collection_01")
      +        .dbName("default")
      +        .build());
      +
      +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
      +        .roleName("role_a")
      +        .privilege("ClusterReadOnly")
      +        .collectionName("*")
      +        .dbName("*")
      +        .build());
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"
      +
      +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
      +
      +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
      +
      +
      curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "Search",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "Search",
      +    "collectionName": "collection_01",
      +    "dbName":"default"
      +}'
      +
      +curl --request POST \
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
      +--header "Authorization: Bearer ${TOKEN}" \
      +--header "Content-Type: application/json" \
      +-d '{
      +    "roleName": "role_a",
      +    "privilege": "ClusterReadOnly",
      +    "collectionName": "*",
      +    "dbName":"*"
      +}'
      +
      diff --git a/localization/v2.5.x/site/it/adminGuide/grant_roles.json b/localization/v2.5.x/site/it/adminGuide/grant_roles.json new file mode 100644 index 000000000..089bf5efc --- /dev/null +++ b/localization/v2.5.x/site/it/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"Assegnazione di ruoli agli utenti","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"Assegnare un ruolo a un utente","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"Descrivere l'utente","href":"Describe-user​","type":2,"isActive":false},{"label":"Revoca di un ruolo","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/grant_roles.md b/localization/v2.5.x/site/it/adminGuide/grant_roles.md new file mode 100644 index 000000000..d44bef846 --- /dev/null +++ b/localization/v2.5.x/site/it/adminGuide/grant_roles.md @@ -0,0 +1,204 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + Dopo aver creato un ruolo e averne concesso i privilegi, è possibile assegnare + il ruolo agli utenti in modo che questi possano accedere alle risorse ed + eseguire le azioni definite dal ruolo. È possibile assegnare più ruoli a un + utente o assegnare un ruolo a più utenti. Questa guida illustra come assegnare + i ruoli agli utenti. +title: Assegnazione di ruoli agli utenti +--- +

      Assegnazione di ruoli agli utenti

      Dopo aver creato un ruolo e averne concesso i privilegi, è possibile assegnare il ruolo agli utenti in modo che questi possano accedere alle risorse ed eseguire le azioni definite dal ruolo. È possibile assegnare più ruoli a un utente o assegnare un ruolo a più utenti. Questa guida spiega come assegnare i ruoli agli utenti.

      +

      All'utente incorporato root in Milvus è già stato assegnato il ruolo admin, che ha tutti i privilegi. Non è necessario assegnargli altri ruoli.

      +

      Assegnare un ruolo a un utente

      L'esempio seguente mostra come assegnare il ruolo role_a all'utente user_1.

      + +
      from pymilvus import MilvusClient​
      +​
      +client = MilvusClient(​
      +    uri="http://localhost:19530",​
      +    token="root:Milvus"​
      +)​
      +​
      +client.grant_role(user_name="user_1", role_name="role_a")​
      +
      +
      +
      import io.milvus.v2.client.ConnectConfig;​
      +import io.milvus.v2.client.MilvusClientV2;​
      +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
      +​
      +String CLUSTER_ENDPOINT = "http://localhost:19530";​
      +String TOKEN = "root:Milvus";​
      +​
      +​
      +ConnectConfig connectConfig = ConnectConfig.builder()​
      +    .uri(CLUSTER_ENDPOINT)​
      +    .token(TOKEN)​
      +    .build();​
      +    ​
      +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
      +​
      +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
      +        .roleName("role_a")​
      +        .userName("user_1")​
      +        .build();​
      +client.grantRole(grantRoleReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +const address = "http://localhost:19530";​
      +const token = "root:Milvus";​
      +const client = new MilvusClient({address, token});​
      +​
      +milvusClient.grantRole({​
      +   username: 'user_1',​
      +   roleName: 'role_a'​
      + })​
      +
      +
      +
      export CLUSTER_ENDPOINT="http://localhost:19530"​
      +export TOKEN="root:Milvus"​
      +​
      +curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "roleName": "role_a",​
      +    "userName": "user_1"​
      +}'​
      +
      +
      +

      Descrivere l'utente

      Una volta assegnato un ruolo a un utente, si può verificare se l'operazione di assegnazione è andata a buon fine tramite il metodo describe_user().

      +

      L'esempio seguente mostra come verificare i ruoli dell'utente user_1.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.describe_user(user_name="user_1")​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.DescribeUserReq;​
      +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
      +​
      +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
      +        .userName("user_1")​
      +        .build();​
      +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +milvusClient.describeUser({username: 'user_1'})​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1"​
      +}'​
      +
      +
      +

      Di seguito è riportato un esempio di output.

      +
      {'user_name': 'user_1', 'roles': 'role_a'}​
      +
      +
      +

      Revoca di un ruolo

      È anche possibile revocare un ruolo assegnato a un utente.

      +

      L'esempio seguente mostra come revocare il ruolo role_a assegnato all'utente user_1.

      + +
      from pymilvus import MilvusClient​
      +​
      +client.revoke_role(​
      +    user_name='user_1',​
      +    role_name='role_a'​
      +)​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
      +​
      +client.revokeRole(RevokeRoleReq.builder()​
      +        .userName("user_1")​
      +        .roleName("role_a")​
      +        .build());​
      +
      +
      +
      const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
      +​
      +​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "userName": "user_1",​
      +    "roleName": "role_a"​
      +}'​
      +
      +
      diff --git a/localization/v2.5.x/site/it/adminGuide/privilege_group.json b/localization/v2.5.x/site/it/adminGuide/privilege_group.json new file mode 100644 index 000000000..7106de2e2 --- /dev/null +++ b/localization/v2.5.x/site/it/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"Creare un gruppo di privilegi","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"Gruppo di privilegi vs. privilegi","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"Gruppi di privilegi integrati","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"Procedure","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/privilege_group.md b/localization/v2.5.x/site/it/adminGuide/privilege_group.md new file mode 100644 index 000000000..988ed0d16 --- /dev/null +++ b/localization/v2.5.x/site/it/adminGuide/privilege_group.md @@ -0,0 +1,491 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: >- + Per semplificare il processo di concessione dei privilegi, si consiglia di + combinare più privilegi in un gruppo di privilegi. +title: Creare un gruppo di privilegi +--- +

      Creare un gruppo di privilegi

      Per semplificare il processo di concessione dei privilegi, si consiglia di combinare più privilegi in un gruppo di privilegi.

      +

      Gruppo di privilegi vs. privilegi

      Un gruppo di privilegi è costituito da più privilegi.

      +

      + + Privilege group illustrated + Gruppo di privilegi illustrato

      +

      Come mostrato nella figura precedente, si supponga di dover concedere tre diversi privilegi a un ruolo.

      +
        +
      • Se non si utilizza un gruppo di privilegi, è necessario concedere i privilegi tre volte.

      • +
      • Se si utilizza un gruppo di privilegi, è sufficiente creare un gruppo di privilegi e aggiungere i tre privilegi a questo gruppo di privilegi e concedere il gruppo di privilegi al ruolo A.

      • +
      +

      Utilizzando un gruppo di privilegi, è possibile concedere più privilegi in blocco a un ruolo.

      +

      Gruppi di privilegi integrati

      Per facilitare l'uso, Milvus fornisce un totale di 9 privilegi incorporati a livello di raccolta, database e istanza: COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW e Cluster_Admin.

      +
      +

      I tre livelli di gruppi di privilegi integrati non hanno una relazione a cascata. L'impostazione di un gruppo di privilegi a livello di istanza non imposta automaticamente le autorizzazioni per tutti i database e le raccolte sotto quell'istanza. I privilegi a livello di database e di raccolta devono essere impostati manualmente.

      +
      +

      Le tabelle seguenti illustrano i privilegi inclusi in ciascun gruppo di privilegi incorporato.

      +

      Livello di raccolta

        +
      • COLL_RO: include i privilegi di lettura dei dati della raccolta.

      • +
      • COLL_RW: include i privilegi di lettura e scrittura dei dati della raccolta.

      • +
      • COLL_ADMIN: include i privilegi di lettura e scrittura dei dati della raccolta e di gestione delle raccolte.

      • +
      +

      La tabella seguente elenca i privilegi specifici inclusi nei tre gruppi di privilegi integrati a livello di raccolta.

      +

      **Privilegio**

      +

      **CollectionReadOnly**

      +

      **CollectionReadWrite**

      +

      **CollectionAdmin**

      +

      Interrogazione

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      Ricerca

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      IndiceDettaglio

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      GetFlushState

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      Ottieni lo stato di caricamento

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      Ottenere l'avanzamento del caricamento

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      HasPartition

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      MostraPartizioni

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      ElencoAlias

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      DescriviCollezione

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      DescrivereAlias

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      OttieniStatistiche

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      CreaIndice

      +

      +

      ✔️

      +

      ✔️

      +

      Rilasciare l'indice

      +

      +

      ✔️

      +

      ✔️

      +

      CreaPartizione

      +

      +

      ✔️

      +

      ✔️

      +

      AbbandonaPartizione

      +

      +

      ✔️

      +

      ✔️

      +

      Carico

      +

      +

      ✔️

      +

      ✔️

      +

      Rilascio

      +

      +

      ✔️

      +

      ✔️

      +

      Inserire

      +

      +

      ✔️

      +

      ✔️

      +

      Cancellare

      +

      +

      ✔️

      +

      ✔️

      +

      Inserisci

      +

      +

      ✔️

      +

      ✔️

      +

      Importazione

      +

      +

      ✔️

      +

      ✔️

      +

      Sciacquare

      +

      +

      ✔️

      +

      ✔️

      +

      Compattazione

      +

      +

      ✔️

      +

      ✔️

      +

      Bilanciamento del carico

      +

      +

      ✔️

      +

      ✔️

      +

      CreaAlias

      +

      +

      +

      ✔️

      +

      EliminaAlias

      +

      +

      +

      ✔️

      +
      +

      Livello del database

        +
      • DB_RO: include i privilegi di lettura dei dati del database

      • +
      • DB_RW: include i privilegi di lettura e scrittura dei dati del database

      • +
      • DB_Admin: include i privilegi di lettura e scrittura dei dati del database e di gestione dei database.

      • +
      +

      La tabella seguente elenca i privilegi specifici inclusi nei tre gruppi di privilegi integrati a livello di database.

      +

      **Privilegio**

      +

      **Lettura del database**

      +

      **LetturaDatabaseScrittura**

      +

      **Admin del database**

      +

      Mostra collezioni

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      DescriviDatabase

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      CreaCollezione

      +

      +

      +

      ✔️

      +

      AbbandonaCollezione

      +

      +

      +

      ✔️

      +

      Alterare il database

      +

      +

      ✔️

      +

      ✔️

      +
      +

      Livello del cluster

        +
      • Cluster_RO: include i privilegi di lettura dei dati di istanza

      • +
      • Cluster_RW: include i privilegi di lettura e scrittura dei dati delle istanze

      • +
      • Cluster_Admin: include i privilegi di lettura e scrittura dei dati di istanza e di gestione delle istanze.

      • +
      +

      La tabella seguente elenca i privilegi specifici inclusi nei tre gruppi di privilegi incorporati a livello di istanza.

      +

      **Privilegio**

      +

      **ClusterReadOnly**

      +

      **ClusterReadWrite**

      +

      **ClusterAdmin**

      +

      ElencoDatabase

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      RinominaCollezione

      +

      +

      +

      ✔️

      +

      CreaProprietà

      +

      +

      +

      ✔️

      +

      AggiornaUtente

      +

      +

      +

      ✔️

      +

      AbbandonaProprietà

      +

      +

      +

      ✔️

      +

      SelezionaProprietà

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      GestisciProprietà

      +

      +

      +

      ✔️

      +

      SelezionaUtente

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      BackupRBAC

      +

      +

      +

      ✔️

      +

      RipristinoRBAC

      +

      +

      +

      ✔️

      +

      CreaGruppoRisorse

      +

      +

      +

      ✔️

      +

      AbbandonaGruppoRisorse

      +

      +

      +

      ✔️

      +

      AggiornaGruppiRisorse

      +

      +

      ✔️

      +

      ✔️

      +

      DescriviGruppoRisorse

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      ElencoGruppiRisorse

      +

      ✔️

      +

      ✔️

      +

      ✔️

      +

      TrasferimentoNodo

      +

      +

      ✔️

      +

      ✔️

      +

      TrasferimentoReplica

      +

      +

      ✔️

      +

      ✔️

      +

      CreaDatabase

      +

      +

      +

      ✔️

      +

      AbbandonaDatabase

      +

      +

      +

      ✔️

      +

      RisciacquareTutti

      +

      +

      ✔️

      +

      ✔️

      +

      CreaGruppoPrivilegi

      +

      +

      +

      ✔️

      +

      Abbandona GruppoPrivilegio

      +

      +

      +

      ✔️

      +

      ElencoGruppiPrivilegio

      +

      +

      +

      ✔️

      +

      OperareGruppoPrivilegio

      +

      +

      +

      ✔️

      +
      +

      Procedure

      È possibile creare un gruppo di privilegi e quindi aggiungere privilegi al gruppo di privilegi.

      +

      Creare un gruppo di privilegi

      L'esempio seguente mostra come creare un gruppo di privilegi denominato privilege_group_1.

      + +
      from pymilvus import MilvusClient​
      +client.create_privileg_group(group_name='privilege_group_1')​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
      +​
      +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1"​
      +}'​
      +
      +
      +

      Aggiungere privilegi a un gruppo di privilegi

      L'esempio seguente mostra come aggiungere i privilegi PrivilegeBackupRBAC e PrivilegeRestoreRBAC al gruppo di privilegi privilege_group_1 appena creato.

      + +
      from pymilvus import MilvusClient​
      +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
      +​
      +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .privileges(Arrays.asList("Query", "Search"))​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1",​
      +    "privileges":["Query", "Search"]​
      +}'​
      +
      +
      +

      Rimuovere privilegi da un gruppo di privilegi

      L'esempio seguente mostra come rimuovere il privilegio PrivilegeRestoreRBAC dal gruppo di privilegi privilege_group_1.

      + +
      from pymilvus import MilvusClient​
      +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
      +​
      +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .privileges(Collections.singletonList("Search"))​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1",​
      +    "privileges":["Search"]​
      +}'​
      +
      +
      +

      Elencare i gruppi di privilegi

      L'esempio seguente mostra come elencare tutti i gruppi di privilegi esistenti.

      + +
      from pymilvus import MilvusClient​
      +client.list_privilege_groups()​
      +
      +
      +
      import io.milvus.v2.service.rbac.PrivilegeGroup;​
      +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
      +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
      +​
      +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
      +        .build());​
      +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.ListPrivilegeGroups(context.Background())​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{}'​
      +
      +
      +

      Di seguito è riportato un esempio di output.

      +
      PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
      +
      +
      +

      Eliminare un gruppo di privilegi

      L'esempio seguente mostra come eliminare il gruppo di privilegi privilege_group_1.

      + +
      from pymilvus import MilvusClient​
      +client.drop_privilege_group(group_name='privilege_group_1')​
      +
      +
      +
      import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
      +​
      +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
      +        .groupName("privilege_group_1")​
      +        .build());​
      +
      +
      +
      import "github.com/milvus-io/milvus-sdk-go/v2/client"​
      +​
      +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
      +
      +
      +
      curl --request POST \​
      +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
      +--header "Authorization: Bearer ${TOKEN}" \​
      +--header "Content-Type: application/json" \​
      +-d '{​
      +    "privilegeGroupName":"privilege_group_1"​
      +}'​
      +
      +
      diff --git a/localization/v2.5.x/site/it/adminGuide/rbac.json b/localization/v2.5.x/site/it/adminGuide/rbac.json index 844316ddb..cdca18934 100644 --- a/localization/v2.5.x/site/it/adminGuide/rbac.json +++ b/localization/v2.5.x/site/it/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"Abilitare RBAC","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Avviare un client Milvus per stabilire una connessione","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. Creare un utente","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. Creare un ruolo","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. Concedere un privilegio a un ruolo","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. Assegnare un ruolo a un utente","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. Revocare i privilegi","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"Cosa succede dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBAC spiegato","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"Concetti chiave di RBAC","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"Le procedure","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/rbac.md b/localization/v2.5.x/site/it/adminGuide/rbac.md index ca25aff97..d7ee633b6 100644 --- a/localization/v2.5.x/site/it/adminGuide/rbac.md +++ b/localization/v2.5.x/site/it/adminGuide/rbac.md @@ -1,10 +1,14 @@ --- id: rbac.md related_key: enable RBAC -summary: 'Imparare a gestire utenti, ruoli e privilegi.' -title: Abilitare RBAC +summary: >- + RBAC (Role-Based Access Control) è un metodo di controllo degli accessi basato + sui ruoli. Con RBAC è possibile controllare con precisione le operazioni che + gli utenti possono eseguire a livello di raccolta, database e istanza, + migliorando la sicurezza dei dati. +title: RBAC spiegato --- -

      Abilitare RBAC

      Abilitando il RBAC, è possibile controllare l'accesso a risorse specifiche di Milvus (ad esempio una collezione o una partizione) o i permessi in base al ruolo e ai privilegi dell'utente. Attualmente questa funzione è disponibile solo in Python e Java.

      -

      Questo argomento descrive come abilitare RBAC e gestire utenti e ruoli.

      -
      -

      I frammenti di codice di questa pagina utilizzano il nuovo MilvusClient (Python) per interagire con Milvus. I nuovi SDK MilvusClient per altri linguaggi saranno rilasciati nei prossimi aggiornamenti.

      -
      -

      1. Avviare un client Milvus per stabilire una connessione

      RBAC (Role-Based Access Control) è un metodo di controllo degli accessi basato sui ruoli. Con RBAC è possibile controllare con precisione le operazioni che gli utenti possono eseguire a livello di raccolta, database e istanza, migliorando la sicurezza dei dati.

      +

      A differenza dei modelli tradizionali di controllo dell'accesso degli utenti, RBAC introduce il concetto di ruoli. Nel modello RBAC, si assegnano privilegi ai ruoli e poi si assegnano tali ruoli agli utenti. Poi gli utenti possono ottenere i privilegi.

      +

      Il modello RBAC può migliorare l'efficienza della gestione del controllo degli accessi. Ad esempio, se più utenti richiedono lo stesso insieme di privilegi, non è necessario impostare manualmente i privilegi per ciascun utente. Si può invece creare un ruolo e assegnarlo agli utenti. Se si desidera modificare i privilegi di questi utenti, è sufficiente modificare i privilegi del ruolo e la modifica verrà applicata a tutti gli utenti con questo ruolo.

      +

      Concetti chiave di RBAC

      Dopo aver abilitato l'autenticazione dell'utente, ci si connette all'istanza di Milvus usando token che consiste in un nome utente e una password. Per impostazione predefinita, Milvus utilizza l'utente root con la password Milvus.

      -
      from pymilvus import MilvusClient
      -
      -client = MilvusClient(
      -    uri='http://localhost:19530', # replace with your own Milvus server address
      -    token='root:Milvus' # replace with your own Milvus server token
      -)
      -
      -

      2. Creare un utente

      Create un utente chiamato user_1 con la password P@ssw0rd:

      -
      client.create_user(
      -    user_name='user_1',
      -    password='P@ssw0rd'
      -)
      -
      -

      Dopo aver creato un utente, è possibile:

      -
        -
      • Aggiornare la password di un utente. È necessario fornire sia la password originale che quella nuova.
      • -
      -
      client.update_password(
      -    user_name='user_1',
      -    old_password='P@ssw0rd',
      -    new_password='P@ssw0rd123'
      -)
      -
      -
        -
      • Elencare tutti gli utenti.
      • -
      -
      client.list_users()
      -
      -# output:
      -# ['root', 'user_1']
      -
      -
        -
      • Controllare il ruolo di un particolare utente.
      • -
      -
      client.describe_user(user_name='user_1')
      -
      -# output:
      -# {'user_name': 'user_1', 'roles': ()}
      -
      -

      3. Creare un ruolo

      L'esempio seguente crea un ruolo denominato roleA.

      -
      client.create_role(
      -    role_name="roleA",
      -)
      -
      -

      Dopo aver creato un ruolo, è possibile:

      +

      + + Users, roles, and privileges + Utenti, ruoli e privilegi

      +

      Il modello RBAC comprende quattro componenti principali.

        -
      • Elencare tutti i ruoli.
      • +
      • **Risorsa: **L'entità risorsa a cui si può accedere. In Milvus esistono tre livelli di risorse: istanza, database e collezione.

      • +
      • **Privilegio: **Il permesso di eseguire determinate operazioni sulle risorse Milvus (ad esempio, creare collezioni, inserire dati, ecc.).

      • +
      • **Gruppo di privilegi: **Un gruppo di privilegi multipli.

      • +
      • **Ruolo: **Un ruolo è composto da due parti: privilegi e risorse. I privilegi definiscono il tipo di operazioni che un ruolo può eseguire, mentre le risorse definiscono le risorse di destinazione su cui le operazioni possono essere eseguite. Ad esempio, il ruolo di amministratore di database può eseguire operazioni di lettura, scrittura e gestione su determinati database.

      • +
      • **Utente: **Un utente è una persona che utilizza Milvus. Ogni utente ha un ID unico e gli viene assegnato un ruolo o più ruoli.

      -
      client.list_roles()
      -
      -# output:
      -# ['admin', 'public', 'roleA']
      -
      -

      4. Concedere un privilegio a un ruolo

      L'esempio seguente mostra come concedere il permesso di ricerca in tutte le raccolte al ruolo roleA.

      -

      object_type specifica il tipo di oggetto, che può essere inteso anche come tipo di risorsa. Attualmente, i valori validi sono Collezione/Utente/Globale, ecc., dove Globale significa che non esiste un tipo di risorsa specifico. object_name è il nome della risorsa. Se objecttypeè Collection, il nome dell'oggetto può essere riferito a un nome di raccolta specifico, oppure si può usare * per specificare tutte le raccolte. Seiltipo di oggettoè Globale, il nome dell'oggetto può essere specificato solo come *. Vedere Utenti e ruoli per altri tipi di privilegi che si possono concedere.

      -

      Prima di gestire i privilegi dei ruoli, assicurarsi di aver abilitato l'autenticazione degli utenti. In caso contrario, potrebbe verificarsi un errore. Per informazioni su come abilitare l'autenticazione dell'utente, fare riferimento a Autenticare l'accesso dell'utente.

      -
      # grant privilege to a role
      -
      -client.grant_privilege(
      -    role_name='roleA',
      -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
      -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
      -    privilege='SelectUser'
      -)
      -
      -

      Dopo aver concesso un privilegio a un ruolo, è possibile:

      -
        -
      • Visualizzare i privilegi concessi a un ruolo.
      • -
      -
      client.describe_role(
      -    role_name='roleA'
      -)
      -
      -# output:
      -# {'role': 'roleA',
      -#  'privileges': [{'object_type': 'User',
      -#    'object_name': 'user_1',
      -#    'db_name': 'default',
      -#    'role_name': 'roleA',
      -#    'privilege': 'SelectUser',
      -#    'grantor_name': 'root'}]}
      -
      -

      5. Assegnare un ruolo a un utente

      Assegnare il ruolo a un utente in modo che questo possa ereditare tutti i privilegi del ruolo.

      -
      # grant a role to a user
      -
      -client.grant_role(
      -    user_name='user_1',
      -    role_name='roleA'
      -)
      -
      -

      Dopo aver concesso il ruolo, verificare che sia stato concesso:

      -
      client.describe_user(
      -    user_name='user_1'
      -)
      -
      -# output:
      -# {'user_name': 'user_1', 'roles': ('roleA')}
      -
      -

      6. Revocare i privilegi

      -

      Prestare attenzione quando si eseguono le seguenti operazioni, perché sono irreversibili.

      -
      -
        -
      • Rimuovere un privilegio da un ruolo. Se si revoca un privilegio che non è stato concesso al ruolo, si verifica un errore.
      • -
      -
      client.revoke_privilege(
      -    role_name='roleA',
      -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
      -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
      -    privilege='SelectUser'
      -)
      -
      -
        -
      • Rimuovere un utente da un ruolo. Se si revoca un ruolo che non è stato concesso all'utente, si verifica un errore.
      • -
      -
      client.revoke_role(
      -    user_name='user_1',
      -    role_name='roleA'
      -)
      -
      -
        -
      • Eliminare un ruolo.
      • -
      -
      client.drop_role(role_name='roleA')
      -
      -
        -
      • Eliminare un utente.
      • -
      -
      client.drop_user(user_name='user_1')
      -
      -

      Cosa succede dopo

      +

      Per ottenere il controllo degli accessi tramite RBAC, è necessario seguire i passaggi seguenti.

      +
        +
      1. Creare un utente: Oltre all'utente predefinito root in Milvus, è possibile creare nuovi utenti e impostare password per proteggere la sicurezza dei dati.

      2. +
      3. Creare un ruolo: È possibile creare ruoli personalizzati in base alle proprie esigenze. Le capacità specifiche di un ruolo sono determinate dai suoi privilegi.

      4. +
      5. Creare un gruppo di privilegi: Combinare più privilegi in un gruppo di privilegi per semplificare il processo di concessione dei privilegi a un ruolo.

      6. +
      7. Assegnare privilegi o gruppi di privilegi a un ruolo: Definire le capacità di un ruolo concedendo privilegi o gruppi di privilegi a questo ruolo.

      8. +
      9. Assegnare ruoli agli utenti: Assegnare ruoli con determinati privilegi agli utenti, in modo che questi ultimi possano avere i privilegi di un ruolo. Un singolo ruolo può essere assegnato a più utenti.

      10. +
      diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.json index 3c370149a..3ccad29f6 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Aggiornamento del cluster Milvus con Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Aggiornare Milvus cambiando l'immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrazione dei metadati","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Cosa fare dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Aggiornamento del cluster Milvus con Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Aggiornare Milvus cambiando l'immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrazione dei metadati","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Cosa fare dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.md index 78b2d95b0..88d44ad46 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: Aggiornamento del cluster Milvus con Docker Compose >

      Questo argomento descrive come aggiornare Milvus utilizzando Docker Compose.

      -

      In casi normali, è possibile aggiornare Milvus cambiando la sua immagine. Tuttavia, è necessario migrare i metadati prima di qualsiasi aggiornamento dalla v2.1.x alla v2.5.0-beta.

      +

      In casi normali, è possibile aggiornare Milvus cambiando la sua immagine. Tuttavia, è necessario migrare i metadati prima di qualsiasi aggiornamento da v2.1.x a v2.5.0.

      Aggiornare Milvus cambiando l'immagine

    9. Eseguire i seguenti comandi per eseguire l'aggiornamento.

      docker compose down
      @@ -105,7 +105,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.json
      index 09d3f5cab..582f52e6d 100644
      --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.json
      +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Aggiornamento del cluster Milvus con i grafici Helm","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Controllare la carta di Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus con Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrazione dei metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Aggiornamento del cluster Milvus con i grafici Helm","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Controllare la carta di Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus con Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrazione dei metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.md
      index c5a324d7f..e4d59383e 100644
      --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.md
      +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      È possibile scegliere il percorso di aggiornamento per il proprio Milvus come segue:

      -
      - Eseguire un aggiornamento continuo](#conduct-a-rolling-upgrade) da Milvus v2.2.3 e versioni successive a v2.5.0-beta.
      +
      - Eseguire un aggiornamento continuo](#conduct-a-rolling-upgrade) da Milvus v2.2.3 e versioni successive a v2.5.0.

      Eseguire un aggiornamento continuo

      1. @@ -225,7 +225,7 @@ my-release-pulsar-zookeeper-0 my-release-pulsar-zookeeper-1 1/1 Running 0 20m my-release-pulsar-zookeeper-2 1/1 Running 0 20m
      -

      3. Controllare il tag immagine

      Controllare il tag image per il pod my-release-milvus-proxy-6c548f787f-scspp. È possibile vedere che la release del cluster Milvus è v2.1.4.

      +

      3. Controllare il tag immagine

      Controllare il tag image per il pod my-release-milvus-proxy-6c548f787f-scspp. Si può vedere che la release del cluster Milvus è la v2.1.4.

      $ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'
       # milvusdb/milvus:v2.1.4
       
      @@ -239,7 +239,7 @@ my-release-pulsar-zookeeper-2 iIl nome dell'istanza Milvus.NoneVero nLo spazio dei nomi in cui è installato Milvus.defaultFalso -sLa versione di origine di Milvus.NoneVero +sLa versione di Milvus di origine.NoneVero tLa versione di Milvus di destinazione.NoneVero rIl percorso principale di Milvus meta.by-devFalso wIl nuovo tag immagine di Milvus.milvusdb/milvus:v2.2.0Falso @@ -257,7 +257,7 @@ my-release-pulsar-zookeeper-2
    10. Migrare i metadati di Milvus.
    11. Avviare i componenti Milvus con una nuova immagine.
    -

    2. Aggiornamento di Milvus da v2.1.x a 2.2.0

    I comandi che seguono presuppongono l'aggiornamento di Milvus dalla v2.1.4 alla 2.2.0. Modificateli in base alle vostre esigenze.

    +

    2. Aggiornamento di Milvus da v2.1.x a 2.2.0

    I seguenti comandi presuppongono l'aggiornamento di Milvus dalla v2.1.4 alla 2.2.0. Modificateli in base alle vostre esigenze.

    1. Specificare il nome dell'istanza Milvus, la versione Milvus di origine e la versione Milvus di destinazione.

      ./migrate.sh -i my-release -s 2.1.4 -t 2.2.0
      @@ -268,7 +268,7 @@ my-release-pulsar-zookeeper-2
       
    2. Specificare il percorso della radice con -r se Milvus è installato con il percorso personalizzato rootpath.

      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev
       
    3. -
    4. Specificate il tag dell'immagine con -w se il vostro Milvus è installato con un image personalizzato.

      +
    5. Specificate il tag dell'immagine con -w se Milvus è installato con il tag personalizzato image.

      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0
       
    6. Impostare -d true se si desidera rimuovere automaticamente il pod di migrazione al termine della migrazione.

      diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.json index e215602eb..fc3f117a6 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Aggiornamento del cluster Milvus con Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aggiornare l'operatore Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus cambiando la sua immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrare i metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Aggiornamento del cluster Milvus con Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aggiornare l'operatore Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus cambiando la sua immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrare i metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.md index 77fefd9bf..34ccad1dc 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-
    7. Una volta aggiornato l'operatore Milvus alla versione più recente, avete le seguenti possibilità:

      Eseguire un aggiornamento continuo

      A partire da Milvus 2.2.3, è possibile configurare i coordinatori di Milvus per lavorare in modalità active-standby e abilitare la funzione di aggiornamento continuo per loro, in modo che Milvus possa rispondere alle richieste in arrivo durante gli aggiornamenti dei coordinatori. Nelle versioni precedenti, i coordinatori dovevano essere rimossi e poi creati durante un aggiornamento, il che poteva comportare alcuni tempi di inattività del servizio.

      Basandosi sulle funzionalità di aggiornamento continuo fornite da Kubernetes, il gestore di Milvus impone un aggiornamento ordinato delle distribuzioni in base alle loro dipendenze. Inoltre, Milvus implementa un meccanismo per garantire che i suoi componenti rimangano compatibili con quelli che dipendono da loro durante l'aggiornamento, riducendo in modo significativo il potenziale downtime del servizio.

      -

      La funzione di aggiornamento continuo è disabilitata per impostazione predefinita. È necessario abilitarla esplicitamente attraverso un file di configurazione.

      +

      La funzione di aggiornamento continuo è disattivata per impostazione predefinita. È necessario abilitarla esplicitamente attraverso un file di configurazione.

      apiVersion: milvus.io/v1beta1
       kind: Milvus
       metadata:
      @@ -76,7 +76,7 @@ spec:
         components:
           enableRollingUpdate: true
           imageUpdateMode: rollingUpgrade # Default value, can be omitted
      -    image: milvusdb/milvus:v2.5.0-beta
      +    image: milvusdb/milvus:v2.5.0
       

      In questo file di configurazione, impostare spec.components.enableRollingUpdate su true e spec.components.image sulla versione di Milvus desiderata.

      Per impostazione predefinita, Milvus esegue l'aggiornamento continuo dei coordinatori in modo ordinato, sostituendo le immagini dei pod dei coordinatori una dopo l'altra. Per ridurre il tempo di aggiornamento, si può impostare spec.components.imageUpdateMode su all, in modo che Milvus sostituisca tutte le immagini dei pod nello stesso momento.

      @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

      Si può impostare spec.components.imageUpdateMode su rollingDowngrade per far sì che Milvus sostituisca le immagini dei pod coordinatori con una versione inferiore.

      apiVersion: milvus.io/v1beta1
      @@ -128,7 +128,7 @@ metadata:
       spec:
         # Omit other fields ...
         components:
      -   image: milvusdb/milvus:v2.5.0-beta
      +   image: milvusdb/milvus:v2.5.0
       

      Eseguire quindi quanto segue per eseguire l'aggiornamento:

      kubectl patch -f milvusupgrade.yaml
      @@ -148,8 +148,8 @@ spec:
                 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
               >
             
      -    

      A partire da Milvus 2.2.0, i metadati sono incompatibili con quelli delle versioni precedenti. I seguenti esempi ipotizzano un aggiornamento da Milvus 2.1.4 a Milvus 2.5.0-beta.

      -

      1. Creare un file .yaml per la migrazione dei metadati.

      Creare un file di migrazione dei metadati. Il seguente è un esempio. È necessario specificare i file name, sourceVersion e targetVersion nel file di configurazione. L'esempio seguente imposta name su my-release-upgrade, sourceVersion su v2.1.4 e targetVersion su v2.5.0-beta. Ciò significa che il cluster Milvus sarà aggiornato dalla v2.1.4 alla v2.5.0-beta.

      +

      Da Milvus 2.2.0, i metadati sono incompatibili con quelli delle versioni precedenti. Gli esempi seguenti ipotizzano un aggiornamento da Milvus 2.1.4 a Milvus 2.5.0.

      +

      1. Creare un file .yaml per la migrazione dei metadati

      Creare un file di migrazione dei metadati. Il seguente è un esempio. È necessario specificare i file name, sourceVersion e targetVersion nel file di configurazione. L'esempio seguente imposta name su my-release-upgrade, sourceVersion su v2.1.4 e targetVersion su v2.5.0. Ciò significa che il cluster Milvus verrà aggiornato dalla v2.1.4 alla v2.5.0.

      apiVersion: milvus.io/v1beta1
       kind: MilvusUpgrade
       metadata:
      @@ -159,9 +159,9 @@ spec:
           namespace: default
           name: my-release
         sourceVersion: "v2.1.4"
      -  targetVersion: "v2.5.0-beta"
      +  targetVersion: "v2.5.0"
         # below are some omit default values:
      -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
      +  # targetImage: "milvusdb/milvus:v2.5.0"
         # toolImage: "milvusdb/meta-migration:v2.2.0"
         # operation: upgrade
         # rollbackIfFailed: true
      diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.json
      index f03049fbc..c8b3679ac 100644
      --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.json
      +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.json
      @@ -1 +1 @@
      -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Aggiornamento di Milvus Standalone con Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Aggiornare Milvus cambiando l'immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrare i metadati","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Cosa fare dopo","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Aggiornamento di Milvus Standalone con Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Aggiornare Milvus cambiando l'immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrare i metadati","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"Cosa fare dopo","href":"Whats-next","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.md
      index e7fe1c88d..025ae3b6d 100644
      --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.md
      +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-docker.md
      @@ -24,9 +24,9 @@ title: Aggiornamento di Milvus Standalone con Docker Compose
               >
             
           

      Questo argomento descrive come aggiornare Milvus utilizzando Docker Compose.

      -

      In casi normali, è possibile aggiornare Milvus cambiando l'immagine. Tuttavia, è necessario migrare i metadati prima di qualsiasi aggiornamento dalla v2.1.x alla v2.5.0-beta.

      +

      In casi normali, è possibile aggiornare Milvus cambiando l'immagine. Tuttavia, è necessario migrare i metadati prima di qualsiasi aggiornamento dalla versione v2.1.x alla versione v2.5.0.

      -

      A causa di problemi di sicurezza, Milvus aggiorna il suo MinIO a RELEASE.2023-03-20T20-16-18Z con il rilascio della v2.2.5. Prima di qualsiasi aggiornamento da versioni precedenti di Milvus Standalone installate con Docker Compose, è necessario creare un deployment MinIO a singolo nodo e singola unità e migrare le impostazioni e i contenuti di MinIO esistenti nel nuovo deployment. Per i dettagli, fate riferimento a questa guida.

      +

      A causa di problemi di sicurezza, Milvus aggiorna il proprio MinIO a RELEASE.2023-03-20T20-16-18Z con il rilascio della v2.2.5. Prima di qualsiasi aggiornamento da versioni precedenti di Milvus Standalone installate con Docker Compose, è necessario creare un deployment MinIO a singolo nodo e singola unità e migrare le impostazioni e i contenuti di MinIO esistenti nel nuovo deployment. Per i dettagli, fate riferimento a questa guida.

      Aggiornare Milvus cambiando l'immagine

    8. Eseguite i seguenti comandi per eseguire l'aggiornamento.

      docker compose down
      @@ -83,7 +83,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      @@ -126,7 +126,7 @@ docker compose up -d
       
    9. Se siete pronti a distribuire il vostro cluster su cloud:
    10. diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.json index da6dd021b..3ae8eb48b 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.json +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.json @@ -1 +1 @@ -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME CHART VERSION APP VERSION DESCRIPTION \nzilliztech/milvus 4.1.34 2.4.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.33 2.4.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.32 2.4.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.31 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.30 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.29 2.4.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.24 2.3.11 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.23 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.22 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.21 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.20 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.18 2.3.10 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.18 2.3.9 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.17 2.3.8 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.16 2.3.7 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.15 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.14 2.3.6 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.13 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.12 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.6 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.5 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.4 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.3 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.2 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.1 2.3.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION \nmy-release default 1 2022-11-21 15:41:25.51539 +0800 CST deployed milvus-3.2.18 2.1.4\n","NAME READY STATUS RESTARTS AGE\nmy-release-etcd-0 1/1 Running 0 84s\nmy-release-milvus-standalone-75c599fffc-6rwlj 1/1 Running 0 84s\nmy-release-minio-744dd9586f-qngzv 1/1 Running 0 84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Aggiornamento di Milvus standalone con i grafici Helm","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Controllare la versione di Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus con Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrazione dei metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME CHART VERSION APP VERSION DESCRIPTION \nzilliztech/milvus 4.1.34 2.4.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.33 2.4.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.32 2.4.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.31 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.30 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.29 2.4.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.24 2.3.11 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.23 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.22 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.21 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.20 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.18 2.3.10 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.18 2.3.9 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.17 2.3.8 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.16 2.3.7 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.15 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.14 2.3.6 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.13 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.12 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.6 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.5 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.4 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.3 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.2 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.1 2.3.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION \nmy-release default 1 2022-11-21 15:41:25.51539 +0800 CST deployed milvus-3.2.18 2.1.4\n","NAME READY STATUS RESTARTS AGE\nmy-release-etcd-0 1/1 Running 0 84s\nmy-release-milvus-standalone-75c599fffc-6rwlj 1/1 Running 0 84s\nmy-release-minio-744dd9586f-qngzv 1/1 Running 0 84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Aggiornamento di Milvus standalone con i grafici Helm","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Controllare la versione di Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus con Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrazione dei metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.md index bbbc95fad..eef509752 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.md +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-helm.md @@ -7,7 +7,7 @@ related_key: upgrade Milvus Standalone summary: Scoprite come aggiornare Milvus standalone con Helm Chart. title: Aggiornamento di Milvus standalone con i grafici Helm --- - +

      Aggiornamento di Milvus standalone con i grafici Helm

      È possibile scegliere il percorso di aggiornamento per il proprio Milvus come segue:

      -
      - Eseguire un aggiornamento continuo](#conduct-a-rolling-upgrade) da Milvus v2.2.3 e versioni successive a v2.5.0-beta.
      +
      - Eseguire un aggiornamento continuo](#conduct-a-rolling-upgrade) da Milvus v2.2.3 e versioni successive a v2.5.0.

      Eseguire un aggiornamento continuo
      1. Lo script non si applica all'istanza Milvus installata con RocksMQ.
      2. Lo script codifica l'ordine di aggiornamento delle distribuzioni e non può essere modificato.
      3. -
      4. Lo script utilizza kubectl patch per aggiornare le distribuzioni e kubectl rollout status per controllare il loro stato.
      5. +
      6. Lo script utilizza kubectl patch per aggiornare le distribuzioni e kubectl rollout status per controllarne lo stato.
      7. Lo script usa kubectl patch per aggiornare l'etichetta app.kubernetes.io/version dei deployment a quella specificata dopo il flag -t nel comando.
      @@ -192,7 +192,7 @@ helm upgrade my-release milvus/milvus --reset-then-reuse-values --version= -

      A partire da Milvus 2.2.0, i metadati sono incompatibili con quelli delle versioni precedenti. Gli esempi seguenti presuppongono un aggiornamento da Milvus 2.1.4 a Milvus 2.2.0.

      +

      A partire da Milvus 2.2.0, i metadati sono incompatibili con quelli delle versioni precedenti. I seguenti esempi ipotizzano un aggiornamento da Milvus 2.1.4 a Milvus 2.2.0.

      1. Controllare la versione di Milvus

      Eseguire $ helm list per verificare la versione dell'applicazione Milvus. Si può notare che APP VERSION è 2.1.4.

      NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     
       my-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4
      @@ -217,7 +217,7 @@ my-release-minio-744dd9586f-qngzv               1/1     Running   0          84s
       
       iIl nome dell'istanza Milvus.NoneVero
       nLo spazio dei nomi in cui è installato Milvus.defaultFalso
      -sLa versione di origine di Milvus.NoneVero
      +sLa versione di Milvus di origine.NoneVero
       tLa versione di Milvus di destinazione.NoneVero
       rIl percorso principale di Milvus meta.by-devFalso
       wIl nuovo tag immagine di Milvus.milvusdb/milvus:v2.2.0Falso
      @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv               1/1     Running   0          84s
       
    11. Migrare i metadati di Milvus.
    12. Avviare i componenti Milvus con una nuova immagine.
    -

    2. Aggiornare Milvus dalla v2.1.x alla 2.5.0-beta

    I comandi seguenti presuppongono l'aggiornamento di Milvus dalla v2.1.4 alla 2.5.0-beta. Modificateli in base alle vostre esigenze.

    +

    2. Aggiornamento di Milvus dalla v2.1.x alla 2.5.0

    I comandi seguenti presuppongono l'aggiornamento di Milvus dalla v2.1.4 alla 2.5.0. Modificateli in base alle vostre esigenze.

      -
    1. Specificare il nome dell'istanza Milvus, la versione Milvus di partenza e la versione Milvus di arrivo.

      -
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
      +
    2. Specificare il nome dell'istanza Milvus, la versione Milvus di origine e la versione Milvus di destinazione.

      +
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
       
    3. Specificate lo spazio dei nomi con -n se Milvus non è installato nello spazio dei nomi predefinito di K8s.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
       
    4. Specificare il percorso della radice con -r se Milvus è installato con il percorso personalizzato rootpath.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
       
    5. -
    6. Specificate il tag dell'immagine con -w se Milvus è installato con il tag personalizzato image.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
      +
    7. Specificate il tag dell'immagine con -w se il vostro Milvus è installato con un image personalizzato.

      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
       
    8. Impostare -d true se si desidera rimuovere automaticamente il pod di migrazione al termine della migrazione.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
       
    9. Se la migrazione non va a buon fine, si può tornare indietro e migrare di nuovo.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
       
    diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.json index 816784d83..33070dba2 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Aggiornamento di Milvus standalone con Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aggiornare l'operatore Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus cambiando la sua immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrare i metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Aggiornamento di Milvus standalone con Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Aggiornare l'operatore Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Eseguire un aggiornamento continuo","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Aggiornare Milvus cambiando la sua immagine","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrare i metadati","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.md index d87952d4f..27cf64c8b 100644 --- a/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/it/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

    Una volta aggiornato l'operatore Milvus alla versione più recente, avete le seguenti possibilità:

    Eseguire un aggiornamento continuo

    A partire da Milvus 2.2.3, è possibile configurare i coordinatori di Milvus per lavorare in modalità active-standby e abilitare la funzione di aggiornamento continuo per loro, in modo che Milvus possa rispondere alle richieste in arrivo durante gli aggiornamenti dei coordinatori. Nelle versioni precedenti, i coordinatori dovevano essere rimossi e poi creati durante un aggiornamento, il che poteva comportare alcuni tempi di inattività del servizio.

    Basandosi sulle funzionalità di aggiornamento continuo fornite da Kubernetes, il gestore di Milvus impone un aggiornamento ordinato delle distribuzioni in base alle loro dipendenze. Inoltre, Milvus implementa un meccanismo per garantire che i suoi componenti rimangano compatibili con quelli che dipendono da loro durante l'aggiornamento, riducendo in modo significativo il potenziale downtime del servizio.

    -

    La funzione di aggiornamento continuo è disabilitata per impostazione predefinita. È necessario abilitarla esplicitamente attraverso un file di configurazione.

    +

    La funzione di aggiornamento continuo è disattivata per impostazione predefinita. È necessario abilitarla esplicitamente attraverso un file di configurazione.

    apiVersion: milvus.io/v1beta1
     kind: Milvus
     metadata:
    @@ -76,7 +76,7 @@ spec:
       components:
         enableRollingUpdate: true
         imageUpdateMode: rollingUpgrade # Default value, can be omitted
    -    image: milvusdb/milvus:v2.5.0-beta
    +    image: milvusdb/milvus:v2.5.0
     

    In questo file di configurazione, impostare spec.components.enableRollingUpdate su true e spec.components.image sulla versione di Milvus desiderata.

    Per impostazione predefinita, Milvus esegue un aggiornamento continuo dei coordinatori in modo ordinato, sostituendo le immagini dei pod dei coordinatori una dopo l'altra. Per ridurre il tempo di aggiornamento, si può impostare spec.components.imageUpdateMode su all, in modo che Milvus sostituisca tutte le immagini dei pod nello stesso momento.

    @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

    Si può impostare spec.components.imageUpdateMode su rollingDowngrade per far sì che Milvus sostituisca le immagini dei pod coordinatori con una versione inferiore.

    apiVersion: milvus.io/v1beta1
    @@ -130,7 +130,7 @@ labels:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    Eseguire quindi quanto segue per eseguire l'aggiornamento:

    kubectl patch -f milvusupgrade.yaml
    @@ -150,8 +150,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Da Milvus 2.2.0, i metadati sono incompatibili con quelli delle versioni precedenti. I seguenti esempi ipotizzano un aggiornamento da Milvus 2.1.4 a Milvus v2.5.0-beta.

    -

    1. Creare un file .yaml per la migrazione dei metadati.

    Creare un file di migrazione dei metadati. Il seguente è un esempio. È necessario specificare i file name, sourceVersion e targetVersion nel file di configurazione. L'esempio seguente imposta name su my-release-upgrade, sourceVersion su v2.1.4 e targetVersion su v2.5.0-beta. Ciò significa che l'istanza Milvus verrà aggiornata dalla v2.1.4 alla v2.5.0-beta.

    +

    Da Milvus 2.2.0, i metadati sono incompatibili con quelli delle versioni precedenti. I seguenti esempi ipotizzano un aggiornamento da Milvus 2.1.4 a Milvus v2.5.0.

    +

    1. Creare un file .yaml per la migrazione dei metadati.

    Creare un file di migrazione dei metadati. Il seguente è un esempio. È necessario specificare i file name, sourceVersion e targetVersion nel file di configurazione. L'esempio seguente imposta name su my-release-upgrade, sourceVersion su v2.1.4 e targetVersion su v2.5.0. Ciò significa che l'istanza di Milvus verrà aggiornata dalla v2.1.4 alla v2.5.0.

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -161,9 +161,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/it/adminGuide/users_and_roles.json b/localization/v2.5.x/site/it/adminGuide/users_and_roles.json
    new file mode 100644
    index 000000000..d986055d6
    --- /dev/null
    +++ b/localization/v2.5.x/site/it/adminGuide/users_and_roles.json
    @@ -0,0 +1 @@
    +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"Creare utenti e ruoli","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"Utente","href":"User​","type":2,"isActive":false},{"label":"Ruolo","href":"Role​","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/it/adminGuide/users_and_roles.md b/localization/v2.5.x/site/it/adminGuide/users_and_roles.md
    new file mode 100644
    index 000000000..942f95326
    --- /dev/null
    +++ b/localization/v2.5.x/site/it/adminGuide/users_and_roles.md
    @@ -0,0 +1,261 @@
    +---
    +id: users_and_roles.md
    +related_key: 'users, roles'
    +summary: >-
    +  Milvus consente di ottenere un controllo degli accessi a grana fine tramite
    +  RBAC. È possibile iniziare creando utenti e ruoli, quindi assegnare privilegi
    +  o gruppi di privilegi ai ruoli e infine gestire il controllo degli accessi
    +  assegnando ruoli agli utenti. Questo metodo garantisce l'efficienza e la
    +  sicurezza della gestione degli accessi. Questa pagina illustra come creare
    +  utenti e ruoli in Milvus.
    +title: Creare utenti e ruoli
    +---
    +

    Creare utenti e ruoli

    Milvus consente di ottenere un controllo degli accessi a grana fine tramite RBAC. È possibile iniziare creando utenti e ruoli, quindi assegnare privilegi o gruppi di privilegi ai ruoli e infine gestire il controllo degli accessi assegnando ruoli agli utenti. Questo metodo garantisce l'efficienza e la sicurezza della gestione degli accessi. Questa pagina illustra come creare utenti e ruoli in Milvus.

    +

    Utente

    Dopo l'inizializzazione di un'istanza Milvus, viene generato automaticamente un utente root per l'autenticazione quando ci si connette a Milvus per la prima volta. Il nome utente dell'utente root è root e la password è Milvus. Il ruolo predefinito dell'utente root è admin, che ha accesso a tutte le risorse. Per garantire la sicurezza dei dati, si consiglia di conservare le credenziali dell'utente root per evitare accessi non autorizzati.

    +

    Per le operazioni quotidiane, si consiglia di creare degli utenti invece di utilizzare l'utente root.

    +

    Creare un utente

    L'esempio seguente mostra come creare un utente con il nome utente user_1 e la password P@ssw0rd. Il nome utente e la password dell'utente devono seguire queste regole.

    +
      +
    • Nome utente: deve iniziare con una lettera e può includere solo lettere maiuscole o minuscole, numeri e trattini bassi.

    • +
    • Password: deve essere composta da 8-64 caratteri e deve includere tre dei seguenti: lettere maiuscole, lettere minuscole, numeri e caratteri speciali.

    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.create_user(user_name="user_1", password="P@ssw0rd")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.CreateUserReq;​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +CreateUserReq createUserReq = CreateUserReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .build();​
    +        ​
    +client.createUser(createUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +await milvusClient.createUser({​
    +   username: 'user_1',​
    +   password: 'P@ssw0rd',​
    + });​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    Aggiornamento della password

    Dopo aver creato un utente, è possibile aggiornare la password in caso di dimenticanza.

    +

    La nuova password deve seguire la seguente regola.

    +
      +
    • Deve avere una lunghezza compresa tra 8 e 64 caratteri e includere tre dei seguenti elementi: lettere maiuscole, lettere minuscole, numeri e caratteri speciali.
    • +
    +

    L'esempio seguente mostra come aggiornare la password dell'utente user_1 in NewP@ssw0rd.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.update_password(​
    +    user_name="user_1",​
    +    old_password="P@ssw0rd",​
    +    new_password="NewP@ssw0rd"​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
    +​
    +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .newPassword("NewP@ssw0rd")​
    +        .build();​
    +client.updatePassword(updatePasswordReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.updateUser({​
    +   username: 'user_1',​
    +   newPassword: 'P@ssw0rd',​
    +   oldPassword: 'NewP@ssw0rd',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "newPassword": "P@ssw0rd!",​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    Elenco degli utenti

    Dopo aver creato diversi utenti, è possibile elencare e visualizzare tutti gli utenti esistenti.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listUsers();​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Di seguito è riportato un esempio di output. root è l'utente predefinito generato automaticamente in Milvus. user_1 è il nuovo utente appena creato.

    +
    ['root', 'user_1']​
    +
    +
    +

    Ruolo

    Milvus fornisce un ruolo integrato chiamato admin, che è un ruolo di amministratore che può accedere alle risorse di tutte le istanze e ha privilegi per tutte le operazioni. Per una gestione più precisa degli accessi e una maggiore sicurezza dei dati, si consiglia di creare ruoli personalizzati in base alle proprie esigenze.

    +

    Creare un ruolo

    L'esempio seguente mostra come creare un ruolo chiamato role_a.

    +

    Il nome del ruolo deve seguire la seguente regola.

    +
      +
    • Deve iniziare con una lettera e può includere solo lettere maiuscole o minuscole, numeri e trattini bassi".
    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.create_role(role_name="role_a")​
    +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
    +
    +
    +
    CreateRoleReq createRoleReq = CreateRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +       ​
    +
    +
    +
    client.createRole(createRoleReq);​
    +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.createRole({​
    +   roleName: 'role_a',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    Elenco dei ruoli

    Dopo aver creato diversi ruoli, è possibile elencare e visualizzare tutti i ruoli esistenti.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> roles = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listRoles(​
    +    includeUserInfo: True​
    +);​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Di seguito è riportato un esempio di output. admin è il ruolo predefinito in Milvus. role_a è il nuovo ruolo appena creato.

    +
    ['admin', 'role_a']​
    +
    +
    diff --git a/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 68dac2e8f..96fc672a1 100644 --- a/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Eseguire Milvus con Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Installare Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Cosa succede dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Eseguire Milvus con Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Installare Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Cosa succede dopo","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.md index 23a09bd4e..e147f907b 100644 --- a/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/it/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Eseguire Milvus con Docker Compose (Linux)

    Milvus fornisce un file di configurazione di Docker Compose nel repository Milvus. Per installare Milvus usando Docker Compose, basta eseguire il comando

    # Download the configuration file
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     
     # Start Milvus
     $ sudo docker compose up -d
    diff --git a/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
    index 3f82a1d33..52a8ac29d 100644
    --- a/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
    +++ b/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
    @@ -1 +1 @@
    -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Esecuzione di Milvus con supporto GPU tramite Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Installare Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configurare il pool di memoria","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Cosa succede ora","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Esecuzione di Milvus con supporto GPU tramite Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Prerequisiti","href":"Prerequisites","type":2,"isActive":false},{"label":"Installare Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configurare il pool di memoria","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"Cosa succede ora","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
    index 706b6011e..f1668e2d8 100644
    --- a/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
    +++ b/localization/v2.5.x/site/it/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
    @@ -59,8 +59,8 @@ title: Esecuzione di Milvus con supporto GPU tramite Docker Compose
             >
           
         

    Per installare Milvus con supporto GPU usando Docker Compose, seguite i seguenti passi.

    -

    1. Scaricare e configurare il file YAML

    Scaricare milvus-standalone-docker-compose-gpu.yml e salvarlo come docker-compose.yml manualmente o con il seguente comando.

    -
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
    +

    1. Scaricare e configurare il file YAML

    Scaricare milvus-standalone-docker-compose-gpu.yml e salvarlo come docker-compose.yml manualmente o con il seguente comando.

    +
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
     

    È necessario apportare alcune modifiche alle variabili d'ambiente del servizio standalone nel file YAML come segue:

      @@ -100,7 +100,7 @@ Creating milvus-minio ... done Creating milvus-standalone ... done
    -

    Se non si è riusciti a eseguire il comando precedente, verificare se nel sistema è installato Docker Compose V1. In tal caso, si consiglia di migrare a Docker Compose V2, come indicato nelle note di questa pagina.

    +

    Se non si è riusciti a eseguire il comando precedente, verificare se sul sistema è installato Docker Compose V1. In tal caso, si consiglia di migrare a Docker Compose V2, come indicato nelle note di questa pagina.

    Dopo aver avviato Milvus,

      @@ -120,7 +120,7 @@ milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp milvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp

    Se sono stati assegnati più dispositivi GPU a Milvus in docker-compose.yml, è possibile specificare quale dispositivo GPU è visibile o disponibile per l'uso.

    -

    Rendere visibile a Milvus il dispositivo GPU 0:

    +

    Rendere il dispositivo GPU 0 visibile a Milvus:

    $ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone
     

    Rendere visibili a Milvus i dispositivi GPU 0 e 1:

    diff --git a/localization/v2.5.x/site/it/menuStructure/it.json b/localization/v2.5.x/site/it/menuStructure/it.json index 9fcedc3cd..ea17f9035 100644 --- a/localization/v2.5.x/site/it/menuStructure/it.json +++ b/localization/v2.5.x/site/it/menuStructure/it.json @@ -348,7 +348,7 @@ "children": [] }, { - "label": "Creare una collezione istantanea", + "label": "Creare istantaneamente una collezione", "id": "create-collection-instantly.md", "order": 2, "children": [] @@ -565,7 +565,7 @@ "children": [] }, { - "label": "Stop", + "label": "Fermarsi", "id": "stop-filter.md", "order": 6, "children": [] @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "Filtraggio", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "Il filtraggio spiegato", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "Operatori di base", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "Filtraggio Templating", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "Operatori JSON", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "Operatori di matrice", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "Ricerca a testo completo", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "Corrispondenza del testo", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "Iteratori di ricerca", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "Utilizzare la chiave di partizione", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "Filtraggio dei metadati", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "Reranking", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "Utenti, privilegi e ruoli", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "Abilitare RBAC", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "RBAC spiegato", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "Creare utenti e ruoli", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "Creare un gruppo di privilegi", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "Concessione di privilegi", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "Ruoli delle sovvenzioni", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "Eliminare utenti e ruoli", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "Crittografia in transito", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Strumento di dimensionamento Milvus", "id": "sizing", diff --git a/localization/v2.5.x/site/it/release_notes.json b/localization/v2.5.x/site/it/release_notes.json index 4f8935623..748920bdd 100644 --- a/localization/v2.5.x/site/it/release_notes.json +++ b/localization/v2.5.x/site/it/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Note di rilascio","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Note di rilascio","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/release_notes.md b/localization/v2.5.x/site/it/release_notes.md index bc7e07278..912165baa 100644 --- a/localization/v2.5.x/site/it/release_notes.md +++ b/localization/v2.5.x/site/it/release_notes.md @@ -18,8 +18,8 @@ title: Note di rilascio d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    Scoprite le novità di Milvus! Questa pagina riassume le nuove funzionalità, i miglioramenti, i problemi noti e le correzioni di bug di ogni versione. In questa sezione è possibile trovare le note di rilascio per ogni versione rilasciata dopo la v2.5.0. Si consiglia di visitare regolarmente questa pagina per conoscere gli aggiornamenti.

    -

    v2.5.0-beta

    Scoprite le novità di Milvus! Questa pagina riassume le nuove funzionalità, i miglioramenti, i problemi noti e le correzioni di bug di ogni versione. In questa sezione è possibile trovare le note di rilascio per ogni versione successiva alla v2.5.0. Si consiglia di visitare regolarmente questa pagina per conoscere gli aggiornamenti.

    +

    v2.5.0

    Data di rilascio: 26 novembre 2024

    +

    Data di rilascio: 23 dicembre 2024

    - + - +
    Versione di MilvusVersione dell'SDK PythonVersione dell'SDK Node.jsVersione SDK Java
    Versione MilvusVersione dell'SDK PythonVersione dell'SDK Node.jsVersione SDK Java
    2.5.0-beta2.5.02.5.02.5.0
    2.5.02.5.12.5.22.5.2
    -

    Milvus 2.5.0-beta apporta significativi miglioramenti per migliorare l'usabilità, la scalabilità e le prestazioni per gli utenti che si occupano di ricerca vettoriale e di gestione di dati su larga scala. Con questa versione, Milvus integra nuove potenti funzionalità come la ricerca basata sui termini, la compattazione dei cluster per ottimizzare le query e il supporto versatile per i metodi di ricerca vettoriale rada e densa. I miglioramenti nella gestione dei cluster, nell'indicizzazione e nella gestione dei dati introducono nuovi livelli di flessibilità e facilità d'uso, rendendo Milvus un database vettoriale ancora più robusto e facile da usare.

    +

    Milvus 2.5.0 apporta significativi miglioramenti per migliorare l'usabilità, la scalabilità e le prestazioni per gli utenti che si occupano di ricerca vettoriale e di gestione di dati su larga scala. Con questa versione, Milvus integra nuove potenti funzionalità come la ricerca basata sui termini, la compattazione dei cluster per ottimizzare le query e il supporto versatile per i metodi di ricerca vettoriale rada e densa. I miglioramenti nella gestione dei cluster, nell'indicizzazione e nella gestione dei dati introducono nuovi livelli di flessibilità e facilità d'uso, rendendo Milvus un database vettoriale ancora più robusto e facile da usare.

    Caratteristiche principali

    Milvus 2.5 supporta la ricerca full text implementata con Sparse-BM25! Questa funzione è un importante complemento alle forti capacità di ricerca semantica di Milvus, soprattutto in scenari che coinvolgono parole rare o termini tecnici. Nelle versioni precedenti, Milvus supportava vettori sparsi per aiutare gli scenari di ricerca per parole chiave. Questi vettori sparsi venivano generati al di fuori di Milvus da modelli neurali come SPLADEv2/BGE-M3 o da modelli statistici come l'algoritmo BM25.

    Grazie a Tantivy, Milvus 2.5 dispone di analizzatori integrati e di estrazione di vettori sparsi, estendendo l'API dalla ricezione di soli vettori come input all'accettazione diretta di testo. Le informazioni statistiche del BM25 vengono aggiornate in tempo reale durante l'inserimento dei dati, migliorando l'usabilità e l'accuratezza. Inoltre, i vettori sparsi basati su algoritmi di prossimità approssimata (ANN) offrono prestazioni più potenti rispetto ai sistemi di ricerca per parole chiave standard.

    Per maggiori dettagli, consultare la Panoramica dell'analizzatore e la Ricerca a testo completo.

    @@ -55,14 +55,14 @@ title: Note di rilascio

    Gli indici Bitmap sono stati tradizionalmente efficaci per i campi a bassa cardinalità, che hanno un numero modesto di valori distinti, ad esempio una colonna contenente informazioni sul sesso con solo due valori possibili: maschio e femmina.

    Per maggiori dettagli, vedere Indice bitmap.

    Nullable e valore predefinito

    Milvus supporta ora l'impostazione di proprietà nullable e di valori predefiniti per campi scalari diversi da quello della chiave primaria. Per i campi scalari contrassegnati come nullable=True, gli utenti possono omettere il campo durante l'inserimento dei dati; il sistema lo tratterà come valore nullo o valore predefinito (se impostato) senza lanciare un errore.

    -

    I valori predefiniti e le proprietà annullabili offrono a Milvus una maggiore flessibilità. Gli utenti possono utilizzare questa funzione per i campi con valori incerti durante la creazione di collezioni. Inoltre, semplificano la migrazione dei dati da altri sistemi di database a Milvus, consentendo di gestire insiemi di dati contenenti valori nulli conservando le impostazioni originali dei valori predefiniti.

    +

    I valori predefiniti e le proprietà annullabili offrono a Milvus una maggiore flessibilità. Gli utenti possono utilizzare questa funzione per i campi con valori incerti durante la creazione di collezioni. Inoltre, semplificano la migrazione dei dati da altri sistemi di database a Milvus, consentendo di gestire insiemi di dati contenenti valori nulli, conservando le impostazioni originali dei valori predefiniti.

    Per maggiori dettagli, consultare Nullable & Default Value.

    HNSW SQ/PQ/PRQ basato su Faiss

    Grazie alla stretta collaborazione con la comunità di Faiss, l'algoritmo HNSW di Faiss è stato notevolmente migliorato sia in termini di funzionalità che di prestazioni. Per motivi di stabilità e manutenibilità, Milvus 2.5 ha ufficialmente migrato il supporto per HNSW da hnswlib a Faiss.

    Basato su Faiss, Milvus 2.5 supporta diversi metodi di quantizzazione su HNSW per soddisfare le esigenze di diversi scenari: SQ (Scalar Quantizers), PQ (Product Quantizer) e PRQ (Product Residual Quantizer). SQ e PQ sono più comuni; SQ offre buone prestazioni di interrogazione e velocità di costruzione, mentre PQ offre un richiamo migliore a parità di rapporto di compressione. Molti database vettoriali utilizzano comunemente la quantizzazione binaria, che è una forma semplice di quantizzazione SQ.

    PRQ è una fusione di PQ e AQ (Additive Quantizer). Rispetto a PQ, richiede tempi di costruzione più lunghi per offrire un richiamo migliore, soprattutto a tassi di compressione elevati, come la compressione binaria.

    Compattazione dei cluster (Beta)

    Milvus 2.5 introduce la Clustering Compaction per accelerare le ricerche e ridurre i costi di grandi collezioni. Specificando un campo scalare come chiave di clustering, i dati vengono ridistribuiti per intervallo per ottimizzare la memorizzazione e il recupero. Agendo come un indice globale, questa funzione consente a Milvus di sfrondare in modo efficiente i dati durante le query basate sui metadati di clustering, migliorando le prestazioni di ricerca quando vengono applicati filtri scalari.

    Per ulteriori informazioni, consultare la sezione Compattazione del clustering.

    -

    Altre caratteristiche

    Nodo di streaming (Beta)

    Milvus 2.5 introduce un nuovo componente chiamato nodo di streaming, che fornisce servizi di Write-Ahead Logging (WAL). Ciò consente a Milvus di ottenere il consenso prima e dopo la lettura e la scrittura dei canali, sbloccando nuove caratteristiche, funzionalità e ottimizzazioni. Questa funzione è disabilitata per impostazione predefinita in Milvus 2.5 e sarà disponibile ufficialmente nella versione 3.0.

    +

    Altre caratteristiche

    Nodo di streaming (Beta)

    Milvus 2.5 introduce un nuovo componente chiamato nodo di streaming, che fornisce servizi di Write-Ahead Logging (WAL). Ciò consente a Milvus di ottenere il consenso prima e dopo la lettura e la scrittura dei canali, sbloccando nuove caratteristiche, funzionalità e ottimizzazioni. Questa funzione è disabilitata per impostazione predefinita in Milvus 2.5 e sarà ufficialmente disponibile nella versione 3.0.

    Supporto IPv6

    Milvus supporta ora IPv6, consentendo una maggiore connettività e compatibilità di rete.

    Importazione massiva CSV

    Oltre ai formati JSON e Parquet, Milvus supporta ora l'importazione diretta di dati in massa in formato CSV.

    Modelli di espressione per l'accelerazione delle query

    Milvus supporta ora i modelli di espressione, migliorando l'efficienza dell'analisi delle espressioni, in particolare in scenari con espressioni complesse.

    @@ -81,3 +81,6 @@ title: Note di rilascio

    Ottimizzazione del parsing delle espressioni

    Migliorato il parsing delle espressioni implementando la cache per le espressioni ripetute, aggiornando ANTLR e ottimizzando le prestazioni delle clausole NOT IN.

    Miglioramento delle prestazioni di concomitanza del DDL

    Ottimizzate le prestazioni di concorrenza delle operazioni del Data Definition Language (DDL).

    Allineamento delle funzionalità dell'API RESTful

    Allineate le funzionalità dell'API RESTful con gli altri SDK per coerenza.

    +

    Aggiornamenti di sicurezza e configurazione

    Supportato TLS per proteggere la comunicazione tra i nodi in ambienti più complessi o aziendali. Per i dettagli, consultare la sezione Configurazione della sicurezza.

    +

    Miglioramenti delle prestazioni di compattazione

    Eliminati i limiti massimi dei segmenti nella compattazione mista e ora viene data priorità ai segmenti più piccoli, migliorando l'efficienza e accelerando le query su insiemi di dati grandi o frammentati.

    +

    Bilanciamento dei canali basato sui punteggi

    Introdotto un criterio che bilancia dinamicamente i carichi tra i canali, migliorando l'utilizzo delle risorse e la stabilità complessiva nelle distribuzioni su larga scala.

    diff --git a/localization/v2.5.x/site/it/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/it/userGuide/collections/modify-collection.json index 2c46f9f5b..19c4de4f3 100644 --- a/localization/v2.5.x/site/it/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/it/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modifica della raccolta","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Rinominare una raccolta","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Impostare il TTL dell'insieme","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modifica della raccolta","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Rinominare una raccolta","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Impostare il TTL dell'insieme","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/it/userGuide/collections/modify-collection.md index 9d083c05d..62e740265 100644 --- a/localization/v2.5.x/site/it/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/it/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    Se una raccolta deve essere abbandonata per un periodo specifico, si può impostare il suo Time-To-Live (TTL) in secondi. Una volta scaduto il TTL, Milvus cancella le entità della collezione e la abbandona. La cancellazione è asincrona, il che significa che le ricerche e le interrogazioni sono ancora possibili prima che la cancellazione sia completata.

    +

    Se una raccolta deve essere abbandonata per un periodo specifico, si può impostare il suo Time-To-Live (TTL) in secondi. Una volta scaduto il TTL, Milvus cancella le entità della raccolta. La cancellazione è asincrona, il che significa che le ricerche e le interrogazioni sono ancora possibili prima che la cancellazione sia completata.

    Il seguente frammento di codice mostra come modificare il TTL di una collezione.

    -
    # Currently not available for Python
    +
    from pymilvus import MilvusClient
     
    +client.alter_collection_properties(
    +  collection_name="collection_name",
    +  properties = {"collection.ttl.seconds": 500}
    +)
     
    import io.milvus.v2.service.collection.request.AlterCollectionReq;​
     import java.util.HashMap;​
    diff --git a/localization/v2.5.x/site/it/userGuide/schema/string.md b/localization/v2.5.x/site/it/userGuide/schema/string.md
    index 4948e9de5..420348781 100644
    --- a/localization/v2.5.x/site/it/userGuide/schema/string.md
    +++ b/localization/v2.5.x/site/it/userGuide/schema/string.md
    @@ -5,7 +5,7 @@ summary: >-
       In Milvus, VARCHAR è il tipo di dati utilizzato per la memorizzazione di dati
       di tipo stringa, adatto alla memorizzazione di stringhe di lunghezza
       variabile. Può memorizzare stringhe con caratteri sia a uno che a più byte,
    -  con una lunghezza massima di 60.535 caratteri. Quando si definisce un campo
    +  con una lunghezza massima di 65.535 caratteri. Quando si definisce un campo
       VARCHAR, è necessario specificare anche il parametro di lunghezza massima
       max_length. Il tipo di stringa VARCHAR offre un modo efficiente e flessibile
       di memorizzare e gestire i dati di testo, rendendolo ideale per le
    @@ -26,7 +26,7 @@ summary: >-
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    In Milvus, VARCHAR è il tipo di dati utilizzato per la memorizzazione di dati di tipo stringa, adatto alla memorizzazione di stringhe di lunghezza variabile. Può memorizzare stringhe con caratteri sia a uno che a più byte, con una lunghezza massima di 60.535 caratteri. Quando si definisce un campo VARCHAR, è necessario specificare anche il parametro di lunghezza massima max_length. Il tipo di stringa VARCHAR offre un modo efficiente e flessibile di memorizzare e gestire i dati di testo, rendendolo ideale per le applicazioni che gestiscono stringhe di varia lunghezza.

    +

    In Milvus, VARCHAR è il tipo di dati utilizzato per la memorizzazione di dati di tipo stringa, adatto alla memorizzazione di stringhe di lunghezza variabile. Può memorizzare stringhe con caratteri sia a uno che a più byte, con una lunghezza massima di 65.535 caratteri. Quando si definisce un campo VARCHAR, è necessario specificare anche il parametro di lunghezza massima max_length. Il tipo di stringa VARCHAR offre un modo efficiente e flessibile di memorizzare e gestire i dati di testo, rendendolo ideale per le applicazioni che gestiscono stringhe di varia lunghezza.

    Aggiungere un campo VARCHAR

    -

    In questo esempio, si aggiungono due campi VARCHAR: varchar_field1 e varchar_field2, con lunghezza massima impostata rispettivamente a 100 e 200 caratteri. Si consiglia di impostare max_length in base alle caratteristiche dei propri dati, per assicurarsi che possa accogliere i dati più lunghi evitando un'eccessiva allocazione di spazio. Inoltre, sono stati aggiunti un campo primario pk e un campo vettoriale embedding.

    +

    In questo esempio, si aggiungono due campi VARCHAR: varchar_field1 e varchar_field2, con lunghezza massima impostata rispettivamente a 100 e 200 caratteri. Si consiglia di impostare max_length in base alle caratteristiche dei dati, per assicurarsi che possa accogliere i dati più lunghi evitando di allocare troppo spazio. Inoltre, sono stati aggiunti un campo primario pk e un campo vettoriale embedding.

    Il campo primario e il campo vettoriale sono obbligatori quando si crea una raccolta. Il campo primario identifica in modo univoco ogni entità, mentre il campo vettoriale è fondamentale per la ricerca di similarità. Per maggiori dettagli, consultare Campo primario e AutoID, Vettore denso, Vettore binario o Vettore sparso.

    @@ -432,7 +432,7 @@ client.insert({​ >

    Dopo aver aggiunto i campi stringa, è possibile utilizzarli per filtrare le operazioni di ricerca e di interrogazione, ottenendo risultati di ricerca più precisi.

    -

    Filtro delle query

    Dopo aver aggiunto i campi stringa, è possibile filtrare i risultati utilizzando questi campi nelle query. Ad esempio, si possono interrogare tutte le entità in cui varchar_field1 è uguale a "Product A".

    +

    Filtrare le query

    Dopo aver aggiunto i campi stringa, è possibile filtrare i risultati utilizzando questi campi nelle query. Ad esempio, si possono interrogare tutte le entità in cui varchar_field1 è uguale a "Product A".

    filter = 'varchar_field1 == "Product A"'​
    diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.json b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.json
    new file mode 100644
    index 000000000..de76b3899
    --- /dev/null
    +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.json
    @@ -0,0 +1 @@
    +{"codeList":["filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​\n\n","filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​\n\n","filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​\n\n","filter = 'ARRAY_LENGTH(history_temperatures) < 10'​\n\n"],"headingContent":"ARRAY Operators​","anchorList":[{"label":"Operatori ARRAY","href":"ARRAY-Operators​","type":1,"isActive":false},{"label":"Operatori ARRAY disponibili","href":"Available-ARRAY-Operators​","type":2,"isActive":false},{"label":"ARRAY_CONTAINS","href":"ARRAYCONTAINS​","type":2,"isActive":false},{"label":"ARRAY_CONTAINS_ALL","href":"ARRAYCONTAINSALL​","type":2,"isActive":false},{"label":"ARRAY_CONTAINS_ANY","href":"ARRAYCONTAINSANY​","type":2,"isActive":false},{"label":"LUNGHEZZA_ARRAY","href":"ARRAYLENGTH​","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.md b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.md
    new file mode 100644
    index 000000000..9a5d5b14c
    --- /dev/null
    +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/array-operators.md
    @@ -0,0 +1,136 @@
    +---
    +id: array-operators.md
    +summary: >-
    +  Milvus offre potenti operatori per interrogare i campi degli array,
    +  consentendo di filtrare e recuperare le entità in base al loro contenuto. 
    +title: Operatori di matrice
    +---
    +

    Operatori ARRAY

    Milvus offre potenti operatori per interrogare i campi degli array, consentendo di filtrare e recuperare le entità in base al contenuto degli array.

    +
    +

    Tutti gli elementi di un array devono essere dello stesso tipo e le strutture annidate all'interno degli array sono trattate come stringhe semplici. Pertanto, quando si lavora con i campi ARRAY, è consigliabile evitare annidamenti troppo profondi e assicurarsi che le strutture di dati siano il più possibile piatte per ottenere prestazioni ottimali.

    +
    +

    Operatori ARRAY disponibili

    Gli operatori ARRAY consentono di interrogare con precisione i campi array in Milvus. Gli operatori sono.

    + +

    ARRAY_CONTAINS

    L'operatore ARRAY_CONTAINS controlla se un elemento specifico esiste in un campo array. È utile quando si vogliono trovare entità in cui un determinato elemento è presente nella matrice.

    +

    Esempio

    +

    Si supponga di avere un campo array history_temperatures, che contiene le temperature minime registrate per diversi anni. Per trovare tutte le entità in cui l'array contiene il valore 23, si può usare la seguente espressione di filtro.

    +
    filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
    +
    +
    +

    Questo restituirà tutte le entità in cui l'array history_temperatures contiene il valore 23.

    +

    ARRAY_CONTAINS_ALL

    L'operatore ARRAY_CONTAINS_ALL assicura che tutti gli elementi dell'elenco specificato siano presenti nel campo dell'array. Questo operatore è utile quando si desidera abbinare entità che contengono più valori nell'array.

    +

    Esempio

    +

    Se si vogliono trovare tutte le entità in cui l'array history_temperatures contiene sia 23 che 24, si può usare.

    +
    filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
    +
    +
    +

    Questo restituirà tutte le entità in cui l'array history_temperatures contiene entrambi i valori specificati.

    +

    ARRAY_CONTAINS_ANY

    L'operatore ARRAY_CONTAINS_ANY controlla se uno qualsiasi degli elementi dell'elenco specificato è presente nel campo dell'array. È utile quando si desidera abbinare entità che contengono almeno uno dei valori specificati nell'array.

    +

    Esempio

    +

    Per trovare tutte le entità in cui l'array history_temperatures contiene o 23 o 24, si può usare l'operatore.

    +
    filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
    +
    +
    +

    Questo restituirà tutte le entità in cui l'array history_temperatures contiene almeno uno dei valori 23 o 24.

    +

    LUNGHEZZA_ARRAY

    L'operatore ARRAY_LENGTH consente di filtrare le entità in base al numero di elementi di un campo array. È utile quando si devono trovare entità con array di una certa lunghezza.

    +

    Esempio

    +

    Se si desidera trovare tutte le entità in cui l'array history_temperatures ha meno di 10 elementi, è possibile utilizzare l'operatore .

    +
    filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
    +
    +
    +

    Questo restituirà tutte le entità in cui l'array history_temperatures ha meno di 10 elementi.

    diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..a054dd3c5 --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"Operatori di base","href":"Basic-Operators​","type":1,"isActive":false},{"label":"Operatori di confronto","href":"Comparison-operators​","type":2,"isActive":false},{"label":"Operatori di intervallo","href":"Range-operators​","type":2,"isActive":false},{"label":"Operatori aritmetici","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"Operatori logici","href":"Logical-Operators​","type":2,"isActive":false},{"label":"Suggerimenti per l'uso degli operatori di base con i campi JSON e ARRAY","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"Conclusione","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..20dd6434e --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,236 @@ +--- +id: basic-operators.md +summary: >- + Milvus offre una ricca serie di operatori di base che aiutano a filtrare e + interrogare i dati in modo efficiente. Questi operatori consentono di affinare + le condizioni di ricerca in base a campi scalari, calcoli numerici, condizioni + logiche e altro ancora. Capire come usare questi operatori è fondamentale per + creare query precise e massimizzare l'efficienza delle ricerche. +title: Operatori di base +--- +

    Operatori di base

    Milvus offre una ricca serie di operatori di base che aiutano a filtrare e interrogare i dati in modo efficiente. Questi operatori consentono di affinare le condizioni di ricerca in base a campi scalari, calcoli numerici, condizioni logiche e altro ancora. Capire come usare questi operatori è fondamentale per creare query precise e massimizzare l'efficienza delle ricerche.

    +

    Operatori di confronto

    Gli operatori di confronto sono utilizzati per filtrare i dati in base all'uguaglianza, alla disuguaglianza o alla dimensione. Sono applicabili a campi numerici, di testo e di date.

    +

    Operatori di confronto supportati.

      +
    • == (uguale a)

    • +
    • != (Non uguale a)

    • +
    • > (Maggiore di)

    • +
    • < (minore di)

    • +
    • >= (Maggiore o uguale a)

    • +
    • <= (Minore o uguale a)

    • +
    +

    Esempio 1: Filtraggio con Equal To (==)

    Si supponga di avere un campo chiamato status e di voler trovare tutte le entità in cui status è "attivo". Si può usare l'operatore di uguaglianza ==.

    +
    filter = 'status == "active"'​
    +
    +
    +

    Esempio 2: Filtro con Not Equal To (!=)

    Per trovare le entità in cui status non è "inattivo".

    +
    filter = 'status != "inactive"'​
    +
    +
    +

    Esempio 3: Filtro con Maggiore di (>)

    Se si vogliono trovare tutte le entità con un age superiore a 30.

    +
    filter = 'age > 30'​
    +
    +
    +

    Esempio 4: Filtraggio con Meno di (<)

    Per trovare le entità in cui price è inferiore a 100.

    +
    filter = 'price < 100'​
    +
    +
    +

    Esempio 5: Filtro con Maggiore o uguale a (>=)

    Se si desidera trovare tutte le entità con rating maggiore o uguale a 4.

    +
    filter = 'rating >= 4'​
    +
    +
    +

    Esempio 6: Filtro con meno o uguale a (<=)

    Per trovare le entità con discount minore o uguale a 10%.

    +
    filter = 'discount <= 10'​
    +
    +
    +

    Operatori di intervallo

    Gli operatori di intervallo aiutano a filtrare i dati in base a specifici insiemi o intervalli di valori.

    +

    Operatori di intervallo supportati.

      +
    • IN: Utilizzati per trovare valori all'interno di un insieme o di un intervallo specifico.

    • +
    • LIKE: Utilizzati per corrispondere a uno schema (soprattutto per i campi di testo).

    • +
    +

    Esempio 1: Uso di IN per abbinare più valori

    Se si vogliono trovare tutte le entità in cui color è "rosso", "verde" o "blu".

    +
    filter = 'color in ["red", "green", "blue"]'​
    +
    +
    +

    Questo è utile quando si vuole verificare l'appartenenza a un elenco di valori.

    +

    Esempio 2: Uso di LIKE per la corrispondenza dei modelli

    L'operatore LIKE è utilizzato per la corrispondenza di modelli nei campi stringa. Può corrispondere a sottostringhe in diverse posizioni all'interno del testo: come prefisso, infisso o suffisso. L'operatore LIKE utilizza il simbolo % come carattere jolly, che può corrispondere a qualsiasi numero di caratteri (incluso zero).

    +

    Corrispondenza di prefisso (inizia con)

    Per eseguire una corrispondenza di prefisso, in cui la stringa inizia con un determinato schema, è possibile posizionare lo schema all'inizio e utilizzare % per abbinare tutti i caratteri che lo seguono. Ad esempio, per trovare tutti i prodotti il cui name inizia con "Prod".

    +
    filter = 'name LIKE "Prod%"'​
    +
    +
    +

    Questo corrisponderà a tutti i prodotti il cui nome inizia con "Prod", come "Product A", "Product B", ecc.

    +

    Corrispondenza per suffisso (finisce con)

    Per una corrispondenza di suffisso, in cui la stringa termina con un determinato modello, inserire il simbolo % all'inizio del modello. Ad esempio, per trovare tutti i prodotti il cui name termina con "XYZ".

    +
    filter = 'name LIKE "%XYZ"'​
    +
    +
    +

    Questo corrisponderà a tutti i prodotti il cui nome termina con "XYZ", come "ProductXYZ", "SampleXYZ", ecc.

    +

    Corrispondenza infissa (contiene)

    Per eseguire una corrispondenza infissa, in cui il modello può apparire in qualsiasi punto della stringa, è possibile inserire il simbolo % sia all'inizio che alla fine del modello. Ad esempio, per trovare tutti i prodotti il cui name contiene la parola "Pro".

    +
    filter = 'name LIKE "%Pro%"'​
    +
    +
    +

    Questo corrisponde a tutti i prodotti il cui nome contiene la sottostringa "Pro", come "Product", "ProLine" o "SuperPro".

    +

    Operatori aritmetici

    Gli operatori aritmetici consentono di creare condizioni basate su calcoli che coinvolgono campi numerici.

    +

    Operatori aritmetici supportati.

      +
    • + (Addizione)

    • +
    • - (Sottrazione)

    • +
    • * (Moltiplicazione)

    • +
    • / (Divisione)

    • +
    • % (Modulo)

    • +
    • ** (Esponenziazione)

    • +
    +

    Esempio 1: Uso dell'addizione (+)

    Per trovare entità in cui il prezzo total è la somma di base_price e tax.

    +
    filter = 'total == base_price + tax'​
    +
    +
    +

    Esempio 2: Uso della sottrazione (-)

    Per trovare le entità in cui quantity è superiore a 50 e quantity_sold è inferiore a 30.

    +
    filter = 'quantity - quantity_sold > 50'​
    +
    +
    +

    Esempio 3: Utilizzo della moltiplicazione (*)

    Per trovare le entità in cui price è maggiore di 100 e quantity è maggiore di 10, moltiplicato.

    +
    filter = 'price * quantity > 1000'​
    +
    +
    +

    Esempio 4: Utilizzo della divisione (/)

    Per trovare prodotti in cui total_price diviso per quantity è inferiore a 50.

    +
    filter = 'total_price / quantity < 50'​
    +
    +
    +

    Esempio 5: Utilizzo del modulo (%)

    Per trovare entità in cui id è un numero pari (cioè divisibile per 2).

    +
    filter = 'id % 2 == 0'​
    +
    +
    +

    Esempio 6: Uso dell'esponenziazione (**)

    Per trovare le entità in cui price elevato a potenza di 2 è maggiore di 1000.

    +
    filter = 'price ** 2 > 1000'​
    +
    +
    +

    Operatori logici

    Gli operatori logici vengono utilizzati per combinare più condizioni in un'espressione di filtro più complessa. Questi includono AND, OR e NOT.

    +

    Operatori logici supportati.

      +
    • AND: Combina più condizioni che devono essere tutte vere.

    • +
    • OR: Combina condizioni in cui almeno una deve essere vera.

    • +
    • NOT: Annulla una condizione.

    • +
    +

    Esempio 1: Uso di AND per combinare le condizioni

    Per trovare tutti i prodotti in cui price è superiore a 100 e stock è superiore a 50.

    +
    filter = 'price > 100 AND stock > 50'​
    +
    +
    +

    Esempio 2: Uso di OR per combinare le condizioni

    Per trovare tutti i prodotti in cui color è "rosso" o "blu".

    +
    filter = 'color == "red" OR color == "blue"'​
    +
    +
    +

    Esempio 3: Usare NOT per escludere una condizione

    Per trovare tutti i prodotti in cui color non è "verde".

    +
    filter = 'NOT color == "green"'​
    +
    +
    +

    Suggerimenti per l'uso degli operatori di base con i campi JSON e ARRAY

    Gli operatori di base di Milvus sono versatili e possono essere applicati ai campi scalari, ma possono essere utilizzati efficacemente anche con le chiavi e gli indici dei campi JSON e ARRAY.

    +

    Ad esempio, se si dispone di un campo product che contiene più chiavi come price, model e tags, fare sempre riferimento direttamente alla chiave.

    +
    filter = 'product["price"] > 1000'​
    +
    +
    +

    Per trovare i record in cui la prima temperatura in un array di temperature registrate supera un determinato valore, utilizzare.

    +
    filter = 'history_temperatures[0] > 30'​
    +
    +
    +

    Conclusione

    Milvus offre una serie di operatori di base che consentono di filtrare e interrogare i dati in modo flessibile. Combinando operatori di confronto, di intervallo, aritmetici e logici, è possibile creare potenti espressioni di filtro per restringere i risultati della ricerca e recuperare i dati necessari in modo efficiente.

    diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..b1698ba3c --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"Il filtraggio spiegato","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"Operatori di base","href":"Basic-operators​","type":2,"isActive":false},{"label":"Modelli di espressione di filtro","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"Operatori specifici per i tipi di dati","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..d11728bab --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,147 @@ +--- +id: boolean.md +summary: >- + Milvus offre potenti funzionalità di filtraggio che consentono di interrogare + con precisione i dati. Le espressioni di filtro consentono di indirizzare + campi scalari specifici e di affinare i risultati della ricerca con diverse + condizioni. Questa guida spiega come utilizzare le espressioni di filtro in + Milvus, con esempi incentrati sulle operazioni di interrogazione. È possibile + applicare questi filtri anche nelle richieste di ricerca e cancellazione. +title: Il filtraggio spiegato +--- +

    Il filtraggio spiegato

    Milvus offre potenti funzionalità di filtraggio che consentono di interrogare con precisione i dati. Le espressioni di filtro consentono di indirizzare campi scalari specifici e di affinare i risultati della ricerca con diverse condizioni. Questa guida spiega come utilizzare le espressioni di filtro in Milvus, con esempi incentrati sulle operazioni di interrogazione. È possibile applicare questi filtri anche nelle richieste di ricerca e cancellazione.

    +

    Operatori di base

    Milvus supporta diversi operatori di base per filtrare i dati.

    +
      +
    • Operatori di confronto: ==, !=, >, <, >=, e <= permettono di filtrare in base a campi numerici, di testo o di data.

    • +
    • Filtri di intervallo: IN e LIKE consentono di trovare intervalli o insiemi di valori specifici.

    • +
    • Operatori aritmetici: +, -, *, /, % e ** sono utilizzati per i calcoli relativi ai campi numerici.

    • +
    • Operatori logici: AND, OR, e NOT combinano più condizioni in espressioni complesse.

    • +
    +

    Esempio: Filtro per colore

    Per trovare entità con colori primari (rosso, verde o blu) in un campo scalare color, utilizzare la seguente espressione di filtro.

    +
    filter='color in ["red", "green", "blue"]'​
    +
    +
    +

    Esempio: Filtrare i campi JSON

    Milvus consente di fare riferimento a chiavi in campi JSON. Ad esempio, se si dispone di un campo JSON product con le chiavi price e model, e si desidera trovare prodotti con un modello specifico e un prezzo inferiore a 1.850, utilizzare questa espressione di filtro.

    +
    filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
    +
    +
    +

    Esempio: Filtrare i campi array

    Se si dispone di un campo array history_temperatures contenente record di temperatura e si desidera trovare gli osservatori in cui la decima temperatura registrata supera i 23°C, utilizzare questa espressione.

    +
    filter='history_temperatures[10] > 23'​
    +
    +
    +

    Per ulteriori informazioni su questi operatori di base, consultare Operatori di base.

    +

    Modelli di espressione di filtro

    Quando si filtra utilizzando i caratteri CJK, l'elaborazione può risultare più complessa a causa dei set di caratteri più grandi e delle differenze di codifica. Ciò può comportare un rallentamento delle prestazioni, soprattutto con l'operatore IN.

    +

    Milvus introduce la templatura delle espressioni di filtro per ottimizzare le prestazioni quando si lavora con i caratteri CJK. Separando i valori dinamici dall'espressione del filtro, il motore di query gestisce in modo più efficiente l'inserimento dei parametri.

    +

    Esempio

    Per trovare persone di età superiore ai 25 anni che vivono a "北京" (Pechino) o "上海" (Shanghai), utilizzare la seguente espressione modello.

    +
    filter = "age > 25 AND city IN ['北京', '上海']"​
    +
    +
    +

    Per migliorare le prestazioni, utilizzare questa variante con i parametri.

    +
    filter = "age > {age} AND city in {city}",​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    Questo approccio riduce l'overhead del parsing e migliora la velocità della query. Per ulteriori informazioni, vedere Templatura dei filtri.

    +

    Operatori specifici per i tipi di dati

    Milvus offre operatori di filtraggio avanzati per tipi di dati specifici, come i campi JSON, ARRAY e VARCHAR.

    +

    Operatori specifici per i campi JSON

    Milvus offre operatori avanzati per l'interrogazione dei campi JSON, consentendo un filtraggio preciso all'interno di strutture JSON complesse.

    +

    **JSON_CONTAINS(identifier, jsonExpr)**: Controlla se un'espressione JSON esiste nel campo.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains(tags, "sale")'​
    +
    +
    +

    **JSON_CONTAINS_ALL(identifier, jsonExpr)**: Verifica che tutti gli elementi dell'espressione JSON siano presenti.

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    **JSON_CONTAINS_ANY(identifier, jsonExpr)**: Filtra le entità in cui esiste almeno un elemento nell'espressione JSON.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    Per maggiori dettagli sugli operatori JSON, consultare Operatori JSON.

    +

    Operatori specifici del campo ARRAY

    Milvus offre operatori di filtraggio avanzati per i campi array, come ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY e ARRAY_LENGTH, che consentono un controllo a grana fine sui dati degli array.

    +

    **ARRAY_CONTAINS**: Filtra le entità contenenti un elemento specifico.

    +
    filter="ARRAY_CONTAINS(history_temperatures, 23)"​
    +
    +
    +

    **ARRAY_CONTAINS_ALL**: Filtra le entità in cui sono presenti tutti gli elementi di un elenco.

    +
    filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_CONTAINS_ANY**: Filtra le entità contenenti qualsiasi elemento dell'elenco.

    +
    filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_LENGTH**: Filtra in base alla lunghezza dell'array.

    +
    filter="ARRAY_LENGTH(history_temperatures) < 10"​
    +
    +
    +

    Per maggiori dettagli sugli operatori di array, vedere Operatori ARRAY.

    +

    Operatori specifici per il campo VARCHAR

    L'operatore **Text_Match** consente di recuperare documenti precisi in base a termini specifici della query. È particolarmente utile per le ricerche filtrate che combinano filtri scalari con ricerche di somiglianza vettoriale. A differenza delle ricerche semantiche, Text Match si concentra sulle occorrenze esatte dei termini.

    +

    Milvus utilizza Tantivy per supportare l'indicizzazione inversa e la ricerca testuale basata sui termini. Il processo prevede.

    +
      +
    1. Analizzatore: Tokenizza ed elabora il testo in ingresso.

    2. +
    3. Indicizzazione: Crea un indice invertito che mappa i token unici nei documenti.

    4. +
    +

    Per maggiori dettagli, consultare Text Match.

    diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..0bf0e2240 --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"Templatura dei filtri","href":"Filter-Templating​","type":1,"isActive":false},{"label":"Panoramica","href":"Overview​","type":2,"isActive":false},{"label":"Operazioni di ricerca","href":"Search-Operations​","type":2,"isActive":false},{"label":"Operazioni di query","href":"Query-Operations​","type":2,"isActive":false},{"label":"Operazioni di cancellazione","href":"Delete-Operations​","type":2,"isActive":false},{"label":"Conclusione","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..8099ff5c1 --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,156 @@ +--- +id: filtering-templating.md +summary: >- + In Milvus, le espressioni di filtro complesse con numerosi elementi, in + particolare quelle che coinvolgono caratteri non ASCII come i caratteri CJK, + possono influire significativamente sulle prestazioni delle query. Per + risolvere questo problema, Milvus introduce un meccanismo di template delle + espressioni di filtro progettato per migliorare l'efficienza riducendo il + tempo di analisi delle espressioni complesse. Questa pagina spiega come + utilizzare il template delle espressioni di filtro nelle operazioni di + ricerca, interrogazione e cancellazione. +title: Filtraggio Templating +--- +

    Templatura dei filtri

    In Milvus, le espressioni di filtro complesse con numerosi elementi, in particolare quelle che coinvolgono caratteri non ASCII come i caratteri CJK, possono influire significativamente sulle prestazioni delle query. Per ovviare a questo problema, Milvus introduce un meccanismo di template delle espressioni di filtro progettato per migliorare l'efficienza riducendo il tempo di analisi delle espressioni complesse. Questa pagina spiega come utilizzare il templating delle espressioni di filtro nelle operazioni di ricerca, interrogazione e cancellazione.

    +

    Panoramica

    Il templating delle espressioni di filtro consente di creare espressioni di filtro con segnaposto, che possono essere sostituiti dinamicamente con valori durante l'esecuzione della query. La templatura evita di incorporare grandi array o espressioni complesse direttamente nel filtro, riducendo i tempi di analisi e migliorando le prestazioni della query.

    +

    Supponiamo di avere un'espressione di filtro che coinvolge due campi, age e city, e di voler trovare tutte le persone la cui età è superiore a 25 anni e che vivono in "北京" (Pechino) o "上海" (Shanghai). Invece di inserire direttamente i valori nell'espressione del filtro, è possibile utilizzare un modello.

    +
    filter = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    In questo caso, {age} e {city} sono segnaposto che verranno sostituiti con i valori effettivi in filter_params quando la query verrà eseguita.

    +

    L'uso del template delle espressioni di filtro in Milvus offre diversi vantaggi.

    +
      +
    • Riduzione del tempo di analisi: sostituendo le espressioni di filtro complesse o di grandi dimensioni con dei segnaposto, il sistema spende meno tempo per l'analisi e l'elaborazione del filtro.

    • +
    • Migliori prestazioni delle query: Grazie alla riduzione dell'overhead di parsing, le prestazioni delle query migliorano, portando a QPS più elevati e a tempi di risposta più rapidi.

    • +
    • Scalabilità: Man mano che i dataset crescono e le espressioni dei filtri diventano più complesse, il templating garantisce prestazioni efficienti e scalabili.

    • +
    +

    Operazioni di ricerca

    Per le operazioni di ricerca in Milvus, l'espressione filter è usata per definire la condizione di filtraggio e il parametro filter_params è usato per specificare i valori dei segnaposto. Il dizionario filter_params contiene i valori dinamici che Milvus utilizzerà per sostituire l'espressione del filtro.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.search(​
    +    "hello_milvus",​
    +    vectors[:nq],​
    +    filter=expr,​
    +    limit=10,​
    +    output_fields=["age", "city"],​
    +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
    +    filter_params=filter_params,​
    +)​
    +
    +
    +

    In questo esempio, Milvus sostituirà dinamicamente {age} con 25 e {city} con ["北京", "上海"] durante l'esecuzione della ricerca.

    +

    Operazioni di query

    Lo stesso meccanismo di template può essere applicato alle operazioni di interrogazione in Milvus. Nella funzione query si definisce l'espressione del filtro e si usa filter_params per specificare i valori da sostituire.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.query(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    output_fields=["age", "city"],​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    Utilizzando filter_params, Milvus gestisce in modo efficiente l'inserimento dinamico dei valori, migliorando la velocità di esecuzione delle query.

    +

    Operazioni di cancellazione

    È possibile utilizzare la templatura delle espressioni di filtro anche nelle operazioni di cancellazione. Come per le ricerche e le query, l'espressione filter definisce le condizioni e filter_params fornisce i valori dinamici per i segnaposto.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.delete(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    Questo approccio migliora le prestazioni delle operazioni di cancellazione, soprattutto quando si tratta di condizioni di filtro complesse.

    +

    Conclusione

    La templatura delle espressioni di filtro è uno strumento essenziale per ottimizzare le prestazioni delle query in Milvus. Utilizzando i segnaposto e il dizionario filter_params, è possibile ridurre significativamente il tempo di analisi di espressioni di filtro complesse. Questo porta a un'esecuzione più rapida delle query e a migliori prestazioni complessive.

    diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..cd454990b --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"Operatori JSON","href":"JSON-Operators​","type":1,"isActive":false},{"label":"Operatori JSON disponibili","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_CONTAINS_ALL","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"JSON_COTAINS_ANY","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..c24e342a6 --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,122 @@ +--- +id: json-operators.md +summary: >- + Milvus supporta operatori avanzati per interrogare e filtrare i campi JSON, + rendendoli perfetti per la gestione di dati complessi e strutturati. Questi + operatori consentono di interrogare in modo estremamente efficace i documenti + JSON, permettendo di recuperare entità in base a elementi, valori o condizioni + specifiche all'interno dei campi JSON. Questa sezione vi guiderà nell'uso + degli operatori specifici per JSON in Milvus, fornendo esempi pratici per + illustrarne le funzionalità. +title: Operatori JSON +--- +

    Operatori JSON

    Milvus supporta operatori avanzati per interrogare e filtrare i campi JSON, rendendoli perfetti per la gestione di dati complessi e strutturati. Questi operatori consentono di interrogare in modo estremamente efficace i documenti JSON, permettendo di recuperare entità in base a elementi, valori o condizioni specifiche all'interno dei campi JSON. Questa sezione vi guiderà nell'uso degli operatori specifici per JSON in Milvus, fornendo esempi pratici per illustrarne la funzionalità.

    +
    +

    I campi JSON non possono gestire strutture complesse e annidate e trattano tutte le strutture annidate come semplici stringhe. Pertanto, quando si lavora con i campi JSON, è consigliabile evitare annidamenti troppo profondi e assicurarsi che le strutture di dati siano il più possibile piatte per ottenere prestazioni ottimali.

    +
    +

    Operatori JSON disponibili

    Milvus fornisce diversi potenti operatori JSON che aiutano a filtrare e interrogare i dati JSON.

    + +

    Esploriamo questi operatori con degli esempi per vedere come possono essere applicati in scenari reali.

    +

    JSON_CONTAINS

    L'operatore json_contains verifica l'esistenza di un elemento o di una sotto-riga specifica all'interno di un campo JSON. È utile quando si vuole garantire che un array o un oggetto JSON contenga un particolare valore.

    +

    Esempio

    +

    Si immagini di avere un insieme di prodotti, ciascuno con un campo tags che contiene un array JSON di stringhe, come ["electronics", "sale", "new"]. Si desidera filtrare i prodotti che hanno il tag "sale".

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains(tags, "sale")'​
    +
    +
    +

    In questo esempio, Milvus restituirà tutti i prodotti in cui il campo tags contiene l'elemento "sale".

    +

    JSON_CONTAINS_ALL

    L'operatore json_contains_all assicura che tutti gli elementi di un'espressione JSON specificata siano presenti nel campo di destinazione. È particolarmente utile quando è necessario abbinare più valori all'interno di un array JSON.

    +

    Esempio

    +

    Continuando con lo scenario dei tag dei prodotti, se si vogliono trovare tutti i prodotti che hanno i tag "electronics", "sale", e "new", si può usare l'operatore json_contains_all.

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    Questa query restituirà tutti i prodotti in cui l'array tags contiene i tre elementi specificati: "electronics", "sale" e "new".

    +

    JSON_COTAINS_ANY

    L'operatore json_contains_any filtra le entità in cui almeno un membro dell'espressione JSON esiste all'interno del campo. È utile quando si desidera abbinare le entità in base a uno qualsiasi dei valori possibili.

    +

    Esempio

    +

    Supponiamo di voler filtrare i prodotti che hanno almeno uno dei tag "electronics", "sale", o "new". Per ottenere questo risultato, è possibile utilizzare l'operatore json_contains_any.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    In questo caso, Milvus restituirà tutti i prodotti che hanno almeno uno dei tag dell'elenco ["electronics", "new", "clearance"]. Anche se un prodotto ha solo uno di questi tag, sarà incluso nel risultato.

    diff --git a/localization/v2.5.x/site/it/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/it/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..163507faf --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"Panoramica","href":"Overview","type":2,"isActive":false},{"label":"Home","href":"Home","type":2,"isActive":false},{"label":"Collezioni","href":"Collections","type":2,"isActive":false},{"label":"Interrogazione","href":"Query","type":2,"isActive":false},{"label":"Dati","href":"Data","type":2,"isActive":false},{"label":"Attività","href":"Tasks","type":2,"isActive":false},{"label":"Richieste lente","href":"Slow-requests","type":2,"isActive":false},{"label":"Configurazioni","href":"Configurations","type":2,"isActive":false},{"label":"Strumenti","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/it/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/it/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..9f8d1b87e --- /dev/null +++ b/localization/v2.5.x/site/it/userGuide/tools/milvus-webui.md @@ -0,0 +1,280 @@ +--- +id: milvus-webui.md +summary: >- + Milvus Web UI è uno strumento di gestione grafica per Milvus. Migliora + l'osservabilità del sistema con un'interfaccia semplice e intuitiva. È + possibile +title: Milvus WebUI +--- +

    Milvus WebUI

    Milvus Web UI è uno strumento di gestione grafica per Milvus. Migliora l'osservabilità del sistema con un'interfaccia semplice e intuitiva. Con Milvus Web UI è possibile osservare le statistiche e le metriche dei componenti e delle dipendenze di Milvus, controllare i dettagli del database e della raccolta ed elencare le configurazioni dettagliate di Milvus.

    +

    Panoramica

    Milvus Web UI si differenzia da Birdwatcher e Attu per essere uno strumento integrato che offre un'osservazione globale del sistema con un'interfaccia semplice e intuitiva.

    +

    La tabella seguente confronta le caratteristiche di Milvus Web UI e Birdwatcher/Attu:

    + + + + + + + + + + + +
    CaratteristicheMilvus Web UIBirdwatcherAttu
    Forma operativaGUICLIGUI
    Utenti targetManutentori, sviluppatoriManutentoriSviluppatori
    InstallazioneIntegratoStrumento autonomoStrumento autonomo
    DipendenzeMilvusMilvus / etcdMilvus
    Funzionalità principaliAmbiente di runtime, dettagli di database/collezione, segmenti, canali, attività e richieste di query lenteIspezione dei metadati ed esecuzione dell'API MilvusGestione del database e attività operative
    +

    L'interfaccia web di Milvus offre le seguenti funzionalità:

    +

    + + Milvus Web UI overview + Panoramica dell'interfaccia web Milvus

    +
      +
    • Casa

      +

      È possibile trovare informazioni sull'istanza Milvus in esecuzione, sui suoi componenti, sui client collegati e sulle dipendenze.

    • +
    • Collezioni

      +

      È possibile visualizzare l'elenco dei database e delle collezioni attualmente presenti in Milvus e controllarne i dettagli.

    • +
    • Query

      +

      Si possono visualizzare le statistiche raccolte dei nodi di query e dei coordinatori di query in termini di segmenti, canali, repliche e gruppi di risorse.

    • +
    • Dati

      +

      È possibile visualizzare le statistiche raccolte dai nodi di dati in termini di segmenti e canali.

    • +
    • Attività

      +

      È possibile visualizzare l'elenco delle attività in esecuzione in Milvus, comprese le attività dello scheduler Querycoord, le attività di compattazione, le attività di creazione di indici, le attività di importazione e le attività di sincronizzazione dei dati.

    • +
    • Richieste lente

      +

      È possibile visualizzare l'elenco delle richieste lente in Milvus, compresi il tipo di richiesta, la durata della richiesta e i parametri della richiesta.

    • +
    • Configurazioni

      +

      È possibile visualizzare l'elenco delle configurazioni di Milvus e i loro valori.

    • +
    • Strumenti

      +

      È possibile accedere ai due strumenti integrati, pprof e Milvus data visualzation tool, dall'interfaccia web.

    • +
    +

    Home

    Nella pagina Home si trovano le seguenti informazioni:

    +

    + + Milvus Web UI Home + Milvus Web UI Home

    +
      +
    • Informazioni sul sistema: Visualizza le informazioni sul sistema, comprese quelle relative alla modalità di distribuzione, all'immagine utilizzata nella distribuzione e alle informazioni correlate.

    • +
    • Informazioni sui componenti: Visualizza lo stato e le metriche dei componenti di Milvus, compresi lo stato e le metriche dei nodi di interrogazione, dei nodi di dati, dei nodi indice, dei coordinatori e dei proxy.

    • +
    • Client collegati: Visualizza i client connessi e le loro informazioni, tra cui il tipo e la versione dell'SDK, il nome utente e la cronologia degli accessi.

    • +
    • Dipendenze del sistema: Visualizza lo stato e le metriche delle dipendenze di Milvus, compreso lo stato e le metriche del meta store, della coda di messaggi e dello storage degli oggetti.

    • +
    +

    Collezioni

    Nella pagina Collezioni è possibile visualizzare l'elenco dei database e delle collezioni attualmente presenti in Milvus e controllarne i dettagli.

    +

    + + Milvus Web UI Collections + Collezioni dell'interfaccia web di Milvus

    +
      +
    • Database: Visualizza l'elenco dei database attualmente presenti in Milvus e i loro dettagli.

    • +
    • Raccolta: Visualizza l'elenco delle collezioni di ciascun database e i relativi dettagli.

    • +
    +

    Interrogazione

    + + Milvus Web UI Query Page + Pagina di interrogazione dell'interfaccia web di Milvus

    +
      +
    • Segmenti: Visualizza l'elenco dei segmenti e i relativi dettagli, tra cui l'ID del segmento, la raccolta corrispondente, lo stato, la dimensione, ecc.

      +

      Nella colonna Da, è possibile trovare la fonte del segmento. I possibili indicatori di origine sono i seguenti:

      +
        +
      • QN: Nodo di query

      • +
      • CT: Destinazione corrente in QueryCoord

      • +
      • NT: Destinazione successiva nella QueryCoord

      • +
      • DIST: Distribuzione in QueryCoord

      • +
    • +
    • Canali: Visualizza l'elenco dei canali e i loro dettagli, tra cui il nome del canale, le raccolte corrispondenti, ecc.

      +

      Nella colonna Da, è possibile trovare la fonte del segmento. I possibili indicatori di origine sono i seguenti:

      +
        +
      • QN: Nodo di query

      • +
      • CT: Destinazione corrente in QueryCoord

      • +
      • NT: Destinazione successiva in QueryCoord

      • +
      • DIST: Distribuzione nella QueryCoord

      • +
    • +
    • Repliche: Visualizza l'elenco delle repliche e i loro dettagli, tra cui l'ID della replica, la raccolta corrispondente, ecc.

    • +
    • Gruppi di risorse: Visualizza l'elenco dei gruppi di risorse e i loro dettagli, tra cui il nome del gruppo di risorse, il numero di nodi di query nel gruppo e le sue configurazioni, ecc.

    • +
    +

    Dati

    + + Milvus Web UI Data Page + Pagina dati dell'interfaccia web Milvus

    +
      +
    • Segmenti: Visualizza l'elenco dei segmenti dei nodi/coordinatori di dati e i loro dettagli, tra cui l'ID del segmento, la raccolta corrispondente, lo stato, la dimensione, ecc.

    • +
    • Canali: Visualizza l'elenco dei canali dei nodi/coordinatori di dati e i loro dettagli, compreso il nome del canale, le raccolte corrispondenti, ecc.

    • +
    +

    Attività

    + + Milvus Web UI Tasks Page + Pagina Attività dell'interfaccia web Milvus

    +
      +
    • Attività: Visualizza l'elenco delle attività in esecuzione in Milvus, compreso il tipo di attività, lo stato e le azioni.

      +
        +
      • Attività QueryCoord: Visualizza tutte le attività dello scheduler QueryCoord, compresi i bilanciatori, i controllori di indici/segmenti/canali/leader negli ultimi 15 minuti.

      • +
      • Attività di compattazione: Visualizza tutte le attività di compattazione dei coordinatori dei dati negli ultimi 15 minuti.

      • +
      • Attività di costruzione dell'indice: Visualizza tutte le attività di creazione di indici dei coordinatori dei dati negli ultimi 30 minuti.

      • +
      • Attività di importazione: Visualizza tutte le attività di importazione dei coordinatori dei dati negli ultimi 30 minuti.

      • +
      • Attività di sincronizzazione dei dati: Visualizza tutte le attività di sincronizzazione dei dati dei nodi dati negli ultimi 15 minuti.

      • +
    • +
    +

    Richieste lente

    + + Milvus Web UI Slow Requests Page + Pagina Richieste lente dell'interfaccia web Milvus

    +
      +
    • Richieste lente: Una richiesta lenta è una ricerca o una query che ha una latenza superiore al valore di proxy.slowQuerySpanInSeconds specificato nella configurazione. L'elenco delle richieste lente visualizza tutte le richieste lente degli ultimi 15 minuti.
    • +
    +

    Configurazioni

    + + Milvus Web UI Configurations Page + Pagina Configurazioni dell'interfaccia web di Milvus

    +
      +
    • Configurazioni: Visualizza l'elenco delle configurazioni del runtime Milvus e i loro valori.
    • +
    +

    Strumenti

      +
    • pprof: accesso allo strumento pprof per il profiling e il debug di Milvus.

    • +
    • Strumento di visualizzazione dei dati Milvus: Accede allo strumento di visualizzazione dei dati di Milvus per visualizzare i dati in Milvus.

    • +
    diff --git a/localization/v2.5.x/site/ja/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/ja/adminGuide/config_jaeger_tracing.md index 3f8acdeb9..6797cbbae 100644 --- a/localization/v2.5.x/site/ja/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/ja/adminGuide/config_jaeger_tracing.md @@ -65,7 +65,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
    -

    2.Jagerのデプロイ

    Jagerインスタンスを作成する最も簡単な方法は、次の例のようなYAMLファイルを作成することです。これはデフォルトのAllInOneストラテジーをインストールし、オールインワンイメージ(jaeger-agentjaeger-collectorjaeger-query、Jaeger UIを組み合わせたもの)を単一のポッドにデプロイします。

    +

    2.Jaegerのデプロイ

    Jaegerインスタンスを作成する最もシンプルな方法は、次の例のようなYAMLファイルを作成することです。これはデフォルトのAllInOneストラテジーをインストールし、オールインワンイメージ(jaeger-agentjaeger-collectorjaeger-query、Jaeger UIを組み合わせたもの)を単一のポッドにデプロイします。

    トレースを長期間保存したい場合は、production-strategyを参照してください。

    apiVersion: jaegertracing.io/v1
     kind: Jaeger
    diff --git a/localization/v2.5.x/site/ja/adminGuide/configure-docker.json b/localization/v2.5.x/site/ja/adminGuide/configure-docker.json
    index 1d46c12ac..ed9455f5f 100644
    --- a/localization/v2.5.x/site/ja/adminGuide/configure-docker.json
    +++ b/localization/v2.5.x/site/ja/adminGuide/configure-docker.json
    @@ -1 +1 @@
    -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Docker ComposeでMilvusを設定する","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"設定ファイルのダウンロード","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"設定ファイルの変更","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"インストールファイルのダウンロード","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"インストールファイルの修正","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Milvusの起動","href":"Start-Milvus","type":2,"isActive":false},{"label":"次の内容","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Docker ComposeでMilvusを設定する","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"設定ファイルのダウンロード","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"設定ファイルの変更","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"インストールファイルのダウンロード","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"インストールファイルの修正","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Milvusの起動","href":"Start-Milvus","type":2,"isActive":false},{"label":"次の内容","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ja/adminGuide/configure-docker.md b/localization/v2.5.x/site/ja/adminGuide/configure-docker.md
    index 8e9e12a29..49e09f813 100644
    --- a/localization/v2.5.x/site/ja/adminGuide/configure-docker.md
    +++ b/localization/v2.5.x/site/ja/adminGuide/configure-docker.md
    @@ -38,8 +38,8 @@ title: Docker ComposeでMilvusを設定する
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    milvus.yaml を直接ダウンロードするか、以下のコマンドでダウンロードします。

    -
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
    +    

    milvus.yaml を直接ダウンロードするか、以下のコマンドでダウンロードします。

    +
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
     

    設定ファイルの変更

    Milvusスタンドアロン用のインストールファイルをダウンロードし、docker-compose.yml として保存してください。

    +

    Milvusスタンドアロン用のインストールファイルをダウンロードし、docker-compose.yml として保存してください。

    以下のコマンドを実行するだけでもインストールできます。

    # For Milvus standalone
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     

    インストールファイルの修正

    データのセキュリティを確保するために、使用しなくなったユーザとロールは削除することをお勧めします。このガイドでは、ユーザとロールを削除する方法を紹介します。

    +

    ユーザの削除

    次の例は、ユーザuser_1 を削除する方法を示しています。

    +
    +

    root ユーザは削除できません。

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +# create a user​
    +client.drop_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig​
    +import io.milvus.v2.client.MilvusClientV2​
    +import io.milvus.v2.service.rbac.request.DropUserReq​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +DropUserReq dropUserReq = DropUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +client.dropUser(dropUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.deleteUser({​
    +    username: 'user_1'​
    +})​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    ユーザがドロップされると、ドロップ操作が成功したかどうかを確認するために、すべての既存ユーザをリストすることができます。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.listUsersReq​
    +​
    +List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listUsers()​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    以下は出力例です。リストにuser_1 。ドロップ操作は成功しています。

    +
    ['root']​
    +
    +
    +

    ロールの削除

    次の例は、ロールrole_a を削除する方法を示しています。

    +
    +

    組み込みのロールadmin は削除できません。

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.drop_role(role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropRoleReq​
    +​
    +DropRoleReq dropRoleReq = DropRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +client.dropRole(dropRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.dropRole({​
    +   roleName: 'role_a',​
    + })​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    ロールを削除すると、既存のすべてのロールを一覧表示して、削除操作が成功したかどうかを確認できます。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> resp = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listRoles(​
    +    includeUserInfo: True​
    +)​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    以下は出力例です。リストにrole_a 。ドロップ操作は成功しています。

    +
    ['admin']​
    +
    +
    diff --git a/localization/v2.5.x/site/ja/adminGuide/grant_privileges.json b/localization/v2.5.x/site/ja/adminGuide/grant_privileges.json new file mode 100644 index 000000000..b217236af --- /dev/null +++ b/localization/v2.5.x/site/ja/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"ロールへの特権または特権グループの付与","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"ロールへの特権または特権グループの付与","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"ロールの記述","href":"Describe-a-role","type":2,"isActive":false},{"label":"ロールから権限または権限グループを取り消す","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/grant_privileges.md b/localization/v2.5.x/site/ja/adminGuide/grant_privileges.md new file mode 100644 index 000000000..f3abb476f --- /dev/null +++ b/localization/v2.5.x/site/ja/adminGuide/grant_privileges.md @@ -0,0 +1,540 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: ロールを作成すると、そのロールに権限を付与することができます。このガイドでは、ロールに特権または特権グループを付与する方法を紹介します。 +title: ロールへの特権または特権グループの付与 +--- +

    ロールへの特権または特権グループの付与

    ロールを作成すると、そのロールに特権を付与することができます。このガイドでは、ロールに特権または特権グループを付与する方法を紹介します。

    +

    ロールへの特権または特権グループの付与

    Milvus 2.5では、付与操作を効率化する新しいバージョンのAPIが導入されました。ロールに権限を付与する際に、オブジェクトタイプを調べる必要がなくなりました。以下にパラメータとその説明を示します。

    +
      +
    • role_name:特権または特権グループを付与する対象となるロールの名前です。

    • +
    • リソース:特定のインスタンス、データベース、コレクションを指定することができます。以下の表では、client.grantV2() メソッドでリソースを指定する方法を説明します。

    • +
    +

    レベル

    +

    リソース

    +

    付与方法

    +

    注意事項

    +

    コレクション

    +

    +

    特定のコレクション

    +

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

    +

    対象となるコレクション名と、そのコレクションが属するデータベース名を入力します。

    +

    +

    特定のデータベース配下のすべてのコレクション

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

    +

    対象となるデータベース名と、コレクション名としてワイルドカード`*` を入力します。

    +

    **データベース

    +

    特定のデータベース

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

    +

    対象となるデータベース名と、コレクション名としてワイルドカード`*` を入力します。

    +

    +

    現在のインスタンス配下のすべてのデータベース

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

    +

    データベース名として`*` 、コレクション名として`*`

    +

    **インスタンス

    +

    現在のインスタンス

    +

    client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

    +

    データベース名として`*` 、コレクション名として`*`

    +
    +
      +
    • 特権:ロールに付与する必要のある特定の権限または権限グループ。現在、Milvusでは56種類の権限を付与することができます。下の表はMilvusの権限の一覧です。

      +

      +

      下表のタイプ列は権限の検索を容易にするためのものであり、分類の目的のみに使用されます。権限を付与する際、タイプを理解する必要はありません。対応する権限を入力するだけです。

      +

    • +
    +

    **タイプ

    +

    **特権

    +

    **説明

    +

    **クライアント側の関連APIの記述**。

    +

    データベース権限

    +

    データベース一覧

    +

    現在のインスタンスのすべてのデータベースを表示する

    +

    [ListDatabases](https://milvus.io/docs/manage_databases.md)

    +

    データベースの詳細を表示する

    +

    データベースの詳細を表示する

    +

    [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

    +

    データベースの作成

    +

    データベースを作成する

    +

    [CreateDatabase](https://milvus.io/docs/manage_databases.md)

    +

    データベースの削除

    +

    データベースを削除する

    +

    [DropDatabase](https://milvus.io/docs/manage_databases.md)

    +

    データベースのプロパティを変更する

    +

    データベースのプロパティを変更する

    +

    [AlterDatabase](https://milvus.io/docs/manage_databases.md)

    +

    コレクション権限

    +

    +

    GetFlushState

    +

    コレクションのフラッシュ操作の状態を確認する

    +

    [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    GetLoadState

    +

    コレクションのロード状態をチェックする

    +

    [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    GetLoadingProgress

    +

    コレクションのロード進行状況を確認する

    +

    [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

    +

    コレクションの表示

    +

    コレクション権限ですべてのコレクションを表示する

    +

    [ShowCollections](https://milvus.io/docs/view-collections.md)

    +

    エイリアス一覧

    +

    コレクションのエイリアスをすべて表示する

    +

    [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

    +

    コレクションの詳細表示

    +

    コレクションの詳細を表示する

    +

    [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

    +

    エイリアス

    +

    エイリアスの詳細を表示

    +

    [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

    +

    GetStatistics

    +

    コレクションの統計情報を取得する (コレクション内のエンティティ数など)

    +

    [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

    +

    コレクションの作成

    +

    コレクションを作成する

    +

    [CreateCollection](https://milvus.io/docs/create-collection.md)

    +

    コレクションの削除

    +

    コレクションを削除する

    +

    [DropCollection](https://milvus.io/docs/drop-collection.md)

    +

    ロード

    +

    コレクションをロードする

    +

    [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    リリース

    +

    コレクションを解放する

    +

    [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

    +

    フラッシュ

    +

    +

    コレクション内のすべてのエンティティを密封されたセグメントに永続化します。フラッシュ操作の後に挿入されたエンティティは、新しいセグメントに格納されます。

    +

    [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    コンパクション

    +

    コンパクションを手動で起動する。

    +

    [Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

    +

    コレクション名の変更

    +

    コレクションの名前を変更する

    +

    [RenameCollection](https://milvus.io/docs/modify-collection.md)

    +

    エイリアスの作成

    +

    コレクションのエイリアスを作成します。

    +

    [CreateAlias](https://milvus.io/docs/manage-aliases.md)

    +

    エイリアスの削除

    +

    コレクションのエイリアスを削除する

    +

    [DropAlias](https://milvus.io/docs/manage-aliases.md)

    +

    FlushAll

    +

    データベース内のすべてのコレクションをフラッシュします。

    +

    [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

    +

    パーティション権限

    +

    HasPartition

    +

    パーティションが存在するかチェックする

    +

    [HasPartition](https://milvus.io/docs/manage-partitions.md)

    +

    パーティションの表示

    +

    コレクション内のすべてのパーティションを表示する

    +

    [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

    +

    パーティションの作成

    +

    パーティションを作成する

    +

    [CreatePartition](https://milvus.io/docs/manage-partitions.md)

    +

    パーティションの削除

    +

    パーティションを削除する

    +

    [DropPartition](https://milvus.io/docs/manage-partitions.md)

    +

    インデックスの権限

    +

    インデックスの詳細

    +

    インデックスの詳細を見る

    +

    +

    [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    インデックスの作成

    +

    インデックスを作成する

    +

    [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    インデックスの削除

    +

    インデックスを削除する

    +

    [DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)。

    +

    リソース管理権限

    +

    +

    ロードバランス

    +

    ロードバランスをとる

    +

    [ロードバランス](https://milvus.io/docs/resource_group.md)

    +

    リソースグループの作成

    +

    リソースグループを作成する

    +

    [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

    +

    リソースグループの削除

    +

    リソースグループを削除する

    +

    [DropResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    リソースグループの更新

    +

    リソースグループを更新する

    +

    [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    リソースグループの詳細表示

    +

    リソースグループの詳細を表示する

    +

    [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    リソースグループの一覧

    +

    現在のインスタンスの全てのリソースグループを表示する

    +

    [ListResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    ノード転送

    +

    リソースグループ間でノードを転送する

    +

    [TransferNode](https://milvus.io/docs/resource_group.md)

    +

    トランスファーレプリカ

    +

    リソースグループ間でレプリカを転送する

    +

    [TransferReplica](https://milvus.io/docs/resource_group.md)。

    +

    バックアップRBAC

    +

    現在のインスタンスのすべてのRBAC関連操作のバックアップを作成する

    +

    バックアップRBAC

    +

    リストアRBAC

    +

    現在のインスタンスのすべてのRBAC関連操作のバックアップをリストアする

    +

    リストアRBAC

    +

    エンティティ権限

    +

    +

    クエリ

    +

    クエリを実行する

    +

    [クエリー](https://milvus.io/docs/get-and-scalar-query.md)

    +

    検索

    +

    検索を行う

    +

    [検索](https://milvus.io/docs/single-vector-search.md)

    +

    挿入

    +

    エンティティを挿入する

    +

    [挿入](https://milvus.io/docs/insert-update-delete.md)

    +

    削除

    +

    エンティティを削除する

    +

    [削除](https://milvus.io/docs/delete-entities.md)

    +

    アップサート

    +

    エンティティの挿入

    +

    [アップサート](https://milvus.io/docs/upsert-entities.md)

    +

    インポート

    +

    エンティティの一括挿入またはインポート

    +

    [一括挿入/インポート](https://milvus.io/docs/import-data.md)

    +

    RBAC権限

    +

    オーナーシップの作成

    +

    ユーザーまたはロールの作成

    +

    [CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    ユーザーの更新

    +

    ユーザのパスワードを更新する

    +

    [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)。

    +

    所有権の削除

    +

    ユーザのパスワードまたはロールを削除する

    +

    [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

    +

    オーナーシップの選択

    +

    特定のロールが付与されているすべてのユーザを表示する

    +

    [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    オーナーシップの管理

    +

    ユーザまたはロールを管理する、またはユーザにロールを付与する

    +

    [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    ユーザの選択

    +

    ユーザに付与されたすべてのロールを表示する

    +

    [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    特権グループの作成

    +

    特権グループを作成する

    +

    [特権グループの作成](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    特権グループの削除

    +

    特権グループを削除する

    +

    [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    特権グループの一覧表示

    +

    現在のインスタンスのすべての特権グループを表示する

    +

    [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    特権グループの操作

    +

    特権グループへの特権の追加または特権グループからの特権の削除

    +

    [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +
    +

    以下の例では、privilege_group_1 という特権グループと同様に、role_a というロールに、デフォルトデータベースのcollection_01 上の特権PrivilegeSearch を付与する方法を示します。

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +const address = "http://localhost:19530";
    +const token = "root:Milvus";
    +const client = new MilvusClient({address, token});
    +
    +await milvusClient.grantPrivilege({
    +   roleName: 'role_a',
    +   object: 'Collection', 
    +   objectName: 'collection_01',
    +   privilegeName: 'Search'
    + });
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "privilege_group_1",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    +

    ロールの記述

    次の例では、describe_role メソッドを使用して role_a に付与された権限を表示する方法を示します。

    + +
    from pymilvus import MilvusClient
    +
    +client.describe_role(role_name="role_a")
    +
    +
    import io.milvus.v2.service.rbac.response.DescribeRoleResp;
    +import io.milvus.v2.service.rbac.request.DescribeRoleReq
    +
    +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
    +        .roleName("role_a")
    +        .build();
    +DescribeRoleResp resp = client.describeRole(describeRoleReq);
    +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.ListRoles(context.Background())
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +await milvusClient.describeRole({roleName: 'role_a'});
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a"
    +}'
    +
    +

    以下は出力例です。

    +
    {
    +     "role": "role_a",
    +     "privileges": [
    +         {
    +             "collection_name": "collection_01",
    +             "db_name": "default",
    +             "role_name": "role_a",
    +             "privilege": "Search",
    +             "grantor_name": "root"
    +         },
    +         "privilege_group_1"
    +     ]
    +}
    +
    +

    ロールから権限または権限グループを取り消す

    次の例では、role_a ロールに付与された特権グループprivilege_group_1 と同様に、デフォルトデータベースcollection_01 の特権PrivilegeSearch を取り消す方法を示します。

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    diff --git a/localization/v2.5.x/site/ja/adminGuide/grant_roles.json b/localization/v2.5.x/site/ja/adminGuide/grant_roles.json new file mode 100644 index 000000000..e54e26ee6 --- /dev/null +++ b/localization/v2.5.x/site/ja/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"ユーザへのロールの付与","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"ユーザへのロールの付与","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"ユーザの記述","href":"Describe-user​","type":2,"isActive":false},{"label":"ロールの取り消し","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/grant_roles.md b/localization/v2.5.x/site/ja/adminGuide/grant_roles.md new file mode 100644 index 000000000..4cb755350 --- /dev/null +++ b/localization/v2.5.x/site/ja/adminGuide/grant_roles.md @@ -0,0 +1,200 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + ロールを作成し、そのロールに特権を付与した後、そのロールをユーザーに付与することで、ユーザーはそのロールによって定義されたリソースにアクセスしたり、アクションを実行したりできるようになります。1人のユーザに複数のロールを付与することも、複数のユーザにロールを付与することもできます。このガイドでは、ユーザにロールを付与する方法を紹介します。 +title: ユーザへのロールの付与 +--- +

    ユーザへのロールの付与

    ロールを作成し、そのロールに権限を付与した後、そのロールをユーザに付与することで、ユーザはそのロールによって定義されたリソースにアクセスしたり、アクションを実行したりすることができます。1人のユーザに複数のロールを付与することも、複数のユーザに1つのロールを付与することもできます。このガイドでは、ユーザにロールを付与する方法を紹介します。

    +

    Milvusの組み込みユーザroot には、すべての権限を持つadmin ロールがすでに付与されています。他のロールを割り当てる必要はありません。

    +

    ユーザへのロールの付与

    以下の例では、ユーザuser_1 にロールrole_a を付与する方法を示します。

    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.grant_role(user_name="user_1", role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
    +​
    +String CLUSTER_ENDPOINT = "http://localhost:19530";​
    +String TOKEN = "root:Milvus";​
    +​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +    .uri(CLUSTER_ENDPOINT)​
    +    .token(TOKEN)​
    +    .build();​
    +    ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
    +        .roleName("role_a")​
    +        .userName("user_1")​
    +        .build();​
    +client.grantRole(grantRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.grantRole({​
    +   username: 'user_1',​
    +   roleName: 'role_a'​
    + })​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a",​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    ユーザの記述

    ユーザにロールを付与したら、describe_user() メソッドで付与操作が成功したかどうかを確認できます。

    +

    次の例は、ユーザuser_1 のロールを確認する方法を示しています。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.describe_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DescribeUserReq;​
    +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
    +​
    +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.describeUser({username: 'user_1'})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    以下は出力例です。

    +
    {'user_name': 'user_1', 'roles': 'role_a'}​
    +
    +
    +

    ロールの取り消し

    ユーザーに割り当てられたロールを取り消すこともできます。

    +

    次の例は、ユーザーuser_1 に割り当てられたロールrole_a を取り消す方法を示しています。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.revoke_role(​
    +    user_name='user_1',​
    +    role_name='role_a'​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
    +​
    +client.revokeRole(RevokeRoleReq.builder()​
    +        .userName("user_1")​
    +        .roleName("role_a")​
    +        .build());​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/ja/adminGuide/privilege_group.json b/localization/v2.5.x/site/ja/adminGuide/privilege_group.json new file mode 100644 index 000000000..6b9e17849 --- /dev/null +++ b/localization/v2.5.x/site/ja/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"特権グループの作成","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"特権グループと特権の比較","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"組み込みの特権グループ","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"手順","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/privilege_group.md b/localization/v2.5.x/site/ja/adminGuide/privilege_group.md new file mode 100644 index 000000000..91c720afc --- /dev/null +++ b/localization/v2.5.x/site/ja/adminGuide/privilege_group.md @@ -0,0 +1,489 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: 権限付与のプロセスを効率化するために、複数の権限を権限グループにまとめることをお勧めします。 +title: 特権グループの作成 +--- +

    特権グループの作成

    特権の付与プロセスを効率化するために、複数の特権を特権グループにまとめることをお勧めします。

    +

    特権グループと特権の比較

    特権グループは複数の特権で構成されます。

    +

    + + Privilege group illustrated + 特権グループの例

    +

    上図のように、あるロールに3つの異なる権限を付与する必要があるとします。

    +
      +
    • 特権グループを使用しない場合、権限を3回付与する必要があります。

    • +
    • 特権グループを使用する場合は、特権グループを作成し、この特権グループに3つの特権を追加して、ロールAに特権グループを付与するだけです。

    • +
    +

    特権グループを使用すると、ロールに対して複数の特権を一括して付与することができます。

    +

    組み込みの特権グループ

    Milvusでは、使いやすさを考慮し、コレクション、データベース、インスタンスレベルで合計9つの組み込み権限を提供しています:COLL_RO、COLL_RW、COLL_ADMIN、DB_RO、DB_RW、DB_Admin、Cluster_RO、Cluster_RW、Cluster_Adminです。

    +
    +

    3つのレベルの組み込み特権グループにはカスケード関係はありません。インスタンス・レベルで権限グループを設定しても、そのインスタンス配下のすべてのデータベースとコレクションに自動的に権限が設定されるわけではありません。データベース・レベルとコレクション・レベルの権限は手動で設定する必要があります。

    +
    +

    以下の表では、組み込みの各特権グループに含まれる権限について説明します。

    +

    コレクション・レベル

      +
    • COLL_RO: コレクション・データの読み取り権限が含まれます。

    • +
    • COLL_RW: コレクション・データの読み取りと書き込みの権限が含まれます。

    • +
    • COLL_ADMIN: コレクション・データの読み取りと書き込み、およびコレクションを管理する権限が含まれます。

    • +
    +

    下の表は、コレクションレベルの3つの組み込み特権グループに含まれる特定の特権の一覧です。

    +

    **特権

    +

    **コレクションReadOnly**権限

    +

    コレクションReadOnly** **コレクションReadWrite** **コレクションAdmin

    +

    **CollectionAdmin**

    +

    クエリ

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    検索

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    インデックス詳細

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    フラッシュ状態

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetLoadState

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetLoadingProgress

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    パーティション

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    パーティションの表示

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    エイリアス一覧

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    コレクションを記述する

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    エイリアス

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetStatistics

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    インデックス作成

    +

    +

    ✔️

    +

    ✔️

    +

    ドロップインデックス

    +

    +

    ✔️

    +

    ✔️

    +

    パーティション作成

    +

    +

    ✔️

    +

    ✔️

    +

    パーティションの削除

    +

    +

    ✔️

    +

    ✔️

    +

    ロード

    +

    +

    ✔️

    +

    ✔️

    +

    リリース

    +

    +

    ✔️

    +

    ✔️

    +

    挿入

    +

    +

    ✔️

    +

    ✔️

    +

    削除

    +

    +

    ✔️

    +

    ✔️

    +

    アップサート

    +

    +

    ✔️

    +

    ✔️

    +

    インポート

    +

    +

    ✔️

    +

    ✔️

    +

    フラッシュ

    +

    +

    ✔️

    +

    ✔️

    +

    圧縮

    +

    +

    ✔️

    +

    ✔️

    +

    ロードバランス

    +

    +

    ✔️

    +

    ✔️

    +

    エイリアス作成

    +

    +

    +

    ✔️

    +

    エイリアスの削除

    +

    +

    +

    ✔️

    +
    +

    データベースレベル

      +
    • DB_RO: データベース・データの読み取り権限を含む

    • +
    • DB_RW: データベースの読み書き権限を含む

    • +
    • DB_Admin : デー タ ベース デー タ の読み取 り と 書 き込み、 デー タ ベース を管理す る 権限が含まれます。

    • +
    +

    以下の表は、データベース・レベルの 3 つの組み込み特権グループに含まれる具体的な特権の一覧です。

    +

    **特権

    +

    **データベースReadOnly**。

    +

    **データベース読み取り専用

    +

    **データベース管理者

    +

    コレクションを表示

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    データベース

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    コレクション作成

    +

    +

    +

    ✔️

    +

    コレクションの削除

    +

    +

    +

    ✔️

    +

    アルターデータベース

    +

    +

    ✔️

    +

    ✔️

    +
    +

    クラスタレベル

      +
    • Cluster_RO: インスタンス・データの読み取り権限を含む

    • +
    • Cluster_RW: インスタンス・データを読み書きする権限が含まれます。

    • +
    • Cluster_Admin: インスタンス・データの読み取りと書き込み、およびインスタンスの管理を行う権限が含まれます。

    • +
    +

    以下の表は、インスタンス・レベルの3つの組み込み権限グループに含まれる特定の権限の一覧です。

    +

    **特権

    +

    **ClusterReadOnly**: インスタンス・データの読み取りと書き込みおよびインスタンスの管理が含まれます。

    +

    **ClusterReadWrite**

    +

    **クラスタ管理者

    +

    リスト・データベース

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    名前の変更

    +

    +

    +

    ✔️

    +

    オーナーシップの作成

    +

    +

    +

    ✔️

    +

    ユーザーの更新

    +

    +

    +

    ✔️

    +

    ドロップオーナーシップ

    +

    +

    +

    ✔️

    +

    セレクトオーナーシップ

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    オーナーシップの管理

    +

    +

    +

    ✔️

    +

    ユーザー選択

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    バックアップRBAC

    +

    +

    +

    ✔️

    +

    リストアRBAC

    +

    +

    +

    ✔️

    +

    リソースグループの作成

    +

    +

    +

    ✔️

    +

    リソースグループの削除

    +

    +

    +

    ✔️

    +

    リソースグループの更新

    +

    +

    ✔️

    +

    ✔️

    +

    DescribeResourceGroup

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    リソースグループの一覧

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    転送ノード

    +

    +

    ✔️

    +

    ✔️

    +

    トランスファーレプリカ

    +

    +

    ✔️

    +

    ✔️

    +

    データベースの作成

    +

    +

    +

    ✔️

    +

    データベースの削除

    +

    +

    +

    ✔️

    +

    フラッシュオール

    +

    +

    ✔️

    +

    ✔️

    +

    特権グループの作成

    +

    +

    +

    ✔️

    +

    特権グループの削除

    +

    +

    +

    ✔️

    +

    特権グループのリスト

    +

    +

    +

    ✔️

    +

    特権グループの操作

    +

    +

    +

    ✔️

    +
    +

    手順

    特権グループを作成し、その特権グループに特権を追加します。

    +

    特権グループの作成

    次の例では、privilege_group_1 という名前の特権グループを作成する方法を示します。

    + +
    from pymilvus import MilvusClient​
    +client.create_privileg_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
    +​
    +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    +

    特権グループへの特権の追加

    次の例では、作成したばかりの特権グループprivilege_group_1 に特権PrivilegeBackupRBACPrivilegeRestoreRBAC を追加する方法を示します。

    + +
    from pymilvus import MilvusClient​
    +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
    +​
    +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Arrays.asList("Query", "Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Query", "Search"]​
    +}'​
    +
    +
    +

    特権グループからの特権の削除

    次の例では、特権グループprivilege_group_1 から特権PrivilegeRestoreRBAC を削除する方法を示します。

    + +
    from pymilvus import MilvusClient​
    +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
    +​
    +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Collections.singletonList("Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Search"]​
    +}'​
    +
    +
    +

    特権グループの一覧表示

    次の例は、既存の特権グループをすべて一覧表示する方法を示しています。

    + +
    from pymilvus import MilvusClient​
    +client.list_privilege_groups()​
    +
    +
    +
    import io.milvus.v2.service.rbac.PrivilegeGroup;​
    +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
    +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
    +​
    +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
    +        .build());​
    +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.ListPrivilegeGroups(context.Background())​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    以下は出力例です。

    +
    PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
    +
    +
    +

    特権グループの削除

    次の例では、特権グループprivilege_group_1 を削除する方法を示します。

    + +
    from pymilvus import MilvusClient​
    +client.drop_privilege_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
    +​
    +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/ja/adminGuide/rbac.json b/localization/v2.5.x/site/ja/adminGuide/rbac.json index 60e466309..02b29bdcc 100644 --- a/localization/v2.5.x/site/ja/adminGuide/rbac.json +++ b/localization/v2.5.x/site/ja/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"RBACの有効化","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1.Milvusクライアントを起動して接続を確立する","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2.ユーザの作成","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3.ロールの作成","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4.ロールへの権限の付与","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5.ユーザにロールを付与する","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6.権限の取り消し","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"次へ","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBACの説明","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"RBACの主な概念","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"手続き","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/rbac.md b/localization/v2.5.x/site/ja/adminGuide/rbac.md index f928638aa..33808f63f 100644 --- a/localization/v2.5.x/site/ja/adminGuide/rbac.md +++ b/localization/v2.5.x/site/ja/adminGuide/rbac.md @@ -1,10 +1,12 @@ --- id: rbac.md related_key: enable RBAC -summary: ユーザー、ロール、権限を管理する方法を学びます。 -title: RBACの有効化 +summary: >- + RBAC(Role-Based Access + Control)は、ロールに基づくアクセス制御手法です。RBACを使用すると、ユーザーが実行できる操作をコレクション、データベース、およびインスタンス・レベルで細かく制御できるため、データ・セキュリティが強化されます。 +title: RBACの説明 --- -

    RBACの有効化

    RBACを有効にすることで、特定のMilvusリソース(コレクションやパーティションなど)へのアクセスを制御したり、ユーザの役割や権限に基づいてパーミッションを制御することができます。現在、この機能は Python と Java でのみ利用可能です。

    -

    このトピックでは、RBACを有効にし、ユーザとロールを管理する方法について説明します。

    -
    -

    このページのコードスニペットでは、新しいMilvusClient(Python)を使用してMilvusと対話します。他の言語用の新しいMilvusClient SDKは今後のアップデートでリリースされる予定です。

    -
    -

    1.Milvusクライアントを起動して接続を確立する

    RBAC(Role-Based Access Control)とは、ロールに基づくアクセス制御手法である。RBACを使用すると、ユーザーが実行できる操作をコレクション、データベース、インスタンスの各レベルで細かく制御できるため、データ・セキュリティが強化されます。

    +

    従来のユーザー・アクセス制御モデルとは異なり、RBAC ではロールの概念が導入されています。RBAC モデルでは、ロールに特権を付与し、そのロールをユーザに付与します。その後、ユーザーは特権を取得できます。

    +

    RBACモデルは、アクセス制御管理の効率を向上させることができる。たとえば、複数のユーザーが同じ権限セットを必要とする場合、ユーザーごとに権限を手動で設定する必要はありません。代わりに、ロールを作成し、そのロールをユーザーに割り当てることができます。これらのユーザーの権限を調整したい場合は、ロールの権限を調整するだけで、このロールを持つすべてのユーザーに変更が適用されます。

    +

    RBACの主な概念

    ユーザ認証を有効にした後、ユーザ名とパスワードで構成されるtoken 、Milvusインスタンスに接続します。デフォルトでは、Milvus はroot ユーザとパスワードMilvus を使用します。

    -
    from pymilvus import MilvusClient
    -
    -client = MilvusClient(
    -    uri='http://localhost:19530', # replace with your own Milvus server address
    -    token='root:Milvus' # replace with your own Milvus server token
    -)
    -
    -

    2.ユーザの作成

    パスワードP@ssw0rduser_1 というユーザーを作成します:

    -
    client.create_user(
    -    user_name='user_1',
    -    password='P@ssw0rd'
    -)
    -
    -

    ユーザーを作成した後、次のことができます:

    -
      -
    • ユーザーパスワードの更新.元のパスワードと新しいパスワードの両方を入力する必要があります。
    • -
    -
    client.update_password(
    -    user_name='user_1',
    -    old_password='P@ssw0rd',
    -    new_password='P@ssw0rd123'
    -)
    -
    -
      -
    • すべてのユーザをリストアップする。
    • -
    -
    client.list_users()
    -
    -# output:
    -# ['root', 'user_1']
    -
    -
      -
    • 特定のユーザーの役割をチェックする。
    • -
    -
    client.describe_user(user_name='user_1')
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ()}
    -
    -

    3.ロールの作成

    以下の例では、roleA という名前のロールを作成しています。

    -
    client.create_role(
    -    role_name="roleA",
    -)
    -
    -

    ロールを作成した後、以下のことができます:

    +

    + + Users, roles, and privileges + ユーザー、ロール、権限

    +

    RBACモデルには4つの主要コンポーネントがあります。

      -
    • すべてのロールを一覧表示します。
    • +
    • **リソース:**アクセス可能なリソース・エンティティ。Milvusのリソースにはインスタンス、データベース、コレクションの3つのレベルがあります。

    • +
    • **特権:**Milvusリソースに対する特定の操作(例: コレクションの作成、データの挿入など)を実行する権限。

    • +
    • **特権グループ:**複数の権限のグループ。

    • +
    • **ロール:**ロールは特権とリソースの2つの部分から構成されます。特権はロールが実行できる操作の種類を定義し、リソースは操作が実行できる対象リソースを定義します。例えば、データベース管理者ロールは、特定のデータベースに対して読み取り、書き込み、管理の操作を実行できます。

    • +
    • **ユーザ: Milvusを利用する人のことです。各ユーザは一意のIDを持ち、ロールまたは複数のロールを付与されます。

    -
    client.list_roles()
    -
    -# output:
    -# ['admin', 'public', 'roleA']
    -
    -

    4.ロールへの権限の付与

    以下の例では、roleA という名前のロールにすべてのコレクションを検索する権限を付与する方法を示します。

    -

    object_type 、オブジェクトタイプを指定します。これはリソースタイプとしても理解できます。現在、有効な値はCollection/User/Globalなどで、Globalは特定のリソースタイプがないことを意味します。object_name はリソース名です。objecttypeがCollectionの場合、object nameは特定のコレクション名を参照するか、*を使用してすべてのコレクションを指定することができます。objecttypeがGlobalの場合、オブジェクト名は*しか指定できません。付与できる他の種類の権限については、ユーザとロールを参照してください。

    -

    ロール権限を管理する前に、ユーザ認証が有効になっていることを確認してください。そうしないと、エラーが発生することがあります。ユーザ認証を有効にする方法については、「ユーザ・アクセスの認証」を参照してください。

    -
    # grant privilege to a role
    -
    -client.grant_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -

    ロールに権限を付与すると、以下のことが可能になります:

    -
      -
    • ロールに付与された権限を表示する。
    • -
    -
    client.describe_role(
    -    role_name='roleA'
    -)
    -
    -# output:
    -# {'role': 'roleA',
    -#  'privileges': [{'object_type': 'User',
    -#    'object_name': 'user_1',
    -#    'db_name': 'default',
    -#    'role_name': 'roleA',
    -#    'privilege': 'SelectUser',
    -#    'grantor_name': 'root'}]}
    -
    -

    5.ユーザにロールを付与する

    ユーザにロールを付与し、このユーザがロールのすべての権限を継承できるようにします。

    -
    # grant a role to a user
    -
    -client.grant_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -

    ロールを付与した後、ロールが付与されたことを確認します:

    -
    client.describe_user(
    -    user_name='user_1'
    -)
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ('roleA')}
    -
    -

    6.権限の取り消し

    -

    以下の操作は不可逆であるため、実行時には注意してください。

    -
    -
      -
    • ロールから権限を削除する。ロールに付与されていない権限を取り消すと、エラーが発生します。
    • -
    -
    client.revoke_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -
      -
    • ロールからユーザを削除してください。ユーザに付与されていないロールを取り消すと、エラーが発生します。
    • -
    -
    client.revoke_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -
      -
    • ロールを削除する。
    • -
    -
    client.drop_role(role_name='roleA')
    -
    -
      -
    • ユーザーを削除します。
    • -
    -
    client.drop_user(user_name='user_1')
    -
    -

    次へ

    +

    RBACによるアクセス制御を行うには、以下の手順が必要です。

    +
      +
    1. ユーザを作成します:ユーザの作成: Milvusのデフォルトユーザroot に加え、新しいユーザを作成し、データセキュリティを保護するためのパスワードを設定することができます。

    2. +
    3. ロールを作成する:ニーズに応じてカスタマイズしたロールを作成することができます。ロールの具体的な機能はその権限によって決定されます。

    4. +
    5. 特権グループの作成:複数の権限を1つの権限グループにまとめることで、ロールへの権限付与プロセスを効率化できます。

    6. +
    7. ロールに特権または特権グループを付与します:このロールに特権または特権グループを付与することで、ロールの能力を定義します。

    8. +
    9. ユーザにロールを付与する:ユーザがロールの特権を持てるように、特定の特権を持つロールをユーザに付与します。1つのロールを複数のユーザに付与することができます。

    10. +
    diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.json index 018f59f2f..f314c21e2 100644 --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Docker Composeを使用したMilvusクラスタのアップグレード","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Milvusのイメージ変更によるアップグレード","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"次のステップ","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Docker Composeを使用したMilvusクラスタのアップグレード","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Milvusのイメージ変更によるアップグレード","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"次のステップ","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.md index 32e7c2205..2bce70a78 100644 --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: Docker Composeを使用したMilvusクラスタのアップグレード >

    このトピックでは、Docker Composeを使用してMilvusをアップグレードする方法について説明します。

    -

    通常の場合、Milvusのイメージを変更することでアップグレードが可能です。ただし、v2.1.xからv2.5.0-betaにアップグレードする場合は、事前にメタデータを移行する必要があります。

    +

    通常の場合、Milvusのイメージを変更することでアップグレードが可能です。ただし、v2.1.xからv2.5.0にアップグレードする場合は、事前にメタデータを移行する必要があります。

    Milvusのイメージ変更によるアップグレード

    通常の場合、以下の手順でMilvusをアップグレードすることができます:

    1. Milvus のイメージタグをdocker-compose.yaml で変更する。

      -

      プロキシ、全コーディネータ、全ワーカーノードのイメージタグを変更する必要があることに注意してください。

      +

      プロキシ、すべてのコーディネータ、すべてのワーカーノードのイメージタグを変更する必要があることに注意してください。

      ...
       rootcoord:
         container_name: milvus-rootcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       proxy:
         container_name: milvus-proxy
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       querycoord:
         container_name: milvus-querycoord
      -  image: milvusdb/milvus:v2.5.0-beta  
      +  image: milvusdb/milvus:v2.5.0  
       ...
       querynode:
         container_name: milvus-querynode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexcoord:
         container_name: milvus-indexcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexnode:
         container_name: milvus-indexnode
      -  image: milvusdb/milvus:v2.5.0-beta 
      +  image: milvusdb/milvus:v2.5.0 
       ...
       datacoord:
         container_name: milvus-datacoord
      -  image: milvusdb/milvus:v2.5.0-beta   
      +  image: milvusdb/milvus:v2.5.0   
       ...
       datanode:
         container_name: milvus-datanode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       
    2. 以下のコマンドを実行してアップグレードを実行します。

      docker compose down
      @@ -105,7 +105,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.json
      index 558bd5d97..c583c9e43 100644
      --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.json
      +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"HelmチャートによるMilvusクラスタのアップグレード","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus Helmチャートのチェック","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Helmを使用したMilvusのアップグレード","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"HelmチャートによるMilvusクラスタのアップグレード","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus Helmチャートのチェック","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Helmを使用したMilvusのアップグレード","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.md
      index efd67eeb5..28a3af17c 100644
      --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.md
      +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      Milvusのアップグレードパスは以下のように選択できます:

      -
      - Milvus v2.2.3以降からv2.5.0-betaへの[ローリングアップグレード](#conduct-a-rolling-upgrade)。
      +
      - Milvus v2.2.3以降からv2.5.0への[ローリングアップグレード](#conduct-a-rolling-upgrade)。

      ローリングアップグレードの実施

      Milvus 2.2.3以降では、Milvusコーディネータをアクティブスタンバイ モードで動作するように設定し、コーディネータのローリングアップグレード機能を有効にすることで、コーディネータのアップグレード中にMilvusが受信したリクエストに応答できるようになりました。以前のリリースでは、アップグレード中にコーディネータを削除してから作成するため、サービスのダウンタイムが発生する可能性がありました。

      +

      Milvus 2.2.3以降では、Milvusコーディネータをアクティブスタンバイ モードで動作するように設定し、コーディネータのローリングアップグレード機能を有効にすることで、コーディネータのアップグレード中にMilvusが受信したリクエストに応答できるようになります。以前のリリースでは、アップグレード中にコーディネータを削除してから作成するため、サービスのダウンタイムが発生する可能性がありました。

      ローリングアップグレードでは、コーディネータをアクティブスタンバイで動作させる必要があります。弊社が提供するスクリプトを使用して、コーディネーターをアクティブスタンバイ モードで動作するように設定し、ローリングアップグレードを開始できます。

      Kubernetesが提供するローリングアップデートの機能に基づいて、上記のスクリプトは、デプロイメントの依存関係に従って順序付けられたアップデートを強制します。さらに、Milvusはアップグレード中もそのコンポーネントに依存しているコンポーネントとの互換性を維持するメカニズムを実装し、潜在的なサービスのダウンタイムを大幅に削減します。

      このスクリプトは、HelmとともにインストールされたMilvusのアップグレードにのみ適用されます。次の表は、スクリプトで使用可能なコマンドフラグの一覧です。

      @@ -145,14 +145,14 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope o操作方法update偽 -

      Milvusインスタンスのすべてのデプロイが正常な状態であることを確認したら、以下のコマンドを実行してください。以下のコマンドを実行することで、Milvusインスタンスを2.5.0-betaにアップグレードすることができます。

      -
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
      +

      Milvusインスタンスのすべてのデプロイが正常な状態であることを確認したら、以下のコマンドを実行してください。以下のコマンドを実行することで、Milvusインスタンスを2.5.0にアップグレードすることができます。

      +
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
       
        -
      1. このスクリプトはデプロイのアップグレード順序をハードコードしており、変更することはできません。
      2. -
      3. このスクリプトでは、kubectl patch を使用してデプロイメントを更新し、kubectl rollout status を使用してステータスを監視します。
      4. -
      5. スクリプトはkubectl patch を使って、デプロイメントのapp.kubernetes.io/version ラベルを、コマンドの-t フラグの後に指定したラベルに更新します。
      6. +
      7. スクリプトはデプロイのアップグレード順序をハードコードしており、変更することはできません。
      8. +
      9. このスクリプトは、kubectl patch を使用してデプロイメントを更新し、kubectl rollout status を使用してステータスを監視します。
      10. +
      11. スクリプトはkubectl patch を使用して、デプロイメントのapp.kubernetes.io/version ラベルを、コマンドの-t フラグの後に指定したラベルに更新します。
      @@ -239,7 +239,7 @@ my-release-pulsar-zookeeper-2 iMilvusインスタンス名。NonenMilvusがインストールされている名前空間。defaultFalse -sMilvusのソースバージョン。None真 +sMilvusのバージョン。Nonetインストール先のMilvusのバージョン。NonerMilvusメタのルートパス。by-devwMilvusの新しい画像タグ。milvusdb/milvus:v2.2.0False diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.json index 3e4fd5754..48564df41 100644 --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Milvus OperatorでMilvusクラスタをアップグレードする","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvus operatorのアップグレード","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"イメージを変更してMilvusをアップグレードする","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Milvus OperatorでMilvusクラスタをアップグレードする","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvus operatorのアップグレード","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"イメージを変更してMilvusをアップグレードする","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.md index 85aed26f5..a9ece7816 100644 --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

    Milvus operatorを最新バージョンにアップグレードすると、以下の選択肢があります:

    ローリングアップグレードの実施

    上記の設定ファイルでは、spec.components.enableRollingUpdatetrue に設定し、spec.components.image を任意の Milvus バージョンに設定します。

    デフォルトでは、Milvusはコーディネーターのローリングアップグレードを順番に実行し、コーディネーターのポッドイメージを次々に置き換えていきます。アップグレード時間を短縮するには、spec.components.imageUpdateModeall に設定し、Milvus がすべてのポッドイメージを同時に置き換えるようにします。

    @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

    Milvusがコーディネータポッドイメージを低いバージョンに置き換えるようにするには、spec.components.imageUpdateModerollingDowngrade に設定します。

    apiVersion: milvus.io/v1beta1
    @@ -128,7 +128,7 @@ metadata:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    その後、以下を実行してアップグレードを実行します:

    kubectl patch -f milvusupgrade.yaml
    @@ -148,8 +148,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Milvus 2.2.0以降、メタデータは以前のリリースと互換性がありません。以下の例は、Milvus 2.1.4からMilvus 2.5.0-betaへのアップグレードを想定しています。

    -

    1.メタデータ移行用ファイル.yaml の作成

    メタデータ移行用ファイルを作成します。以下はその例です。設定ファイルにはname,sourceVersion,targetVersion を指定する必要があります。以下の例では、namemy-release-upgrade に、sourceVersionv2.1.4 に、targetVersionv2.5.0-beta に設定しています。これは、Milvusクラスタがv2.1.4からv2.5.0-betaにアップグレードされることを意味します。

    +

    Milvus 2.2.0以降、メタデータは以前のリリースと互換性がありません。以下の例は、Milvus 2.1.4からMilvus 2.5.0へのアップグレードを想定しています。

    +

    1.メタデータ移行用ファイル.yaml の作成

    メタデータ移行ファイルを作成します。以下はその例です。設定ファイルには、namesourceVersiontargetVersion を指定する必要があります。以下の例では、namemy-release-upgrade に、sourceVersionv2.1.4 に、targetVersionv2.5.0 に設定しています。これは、Milvusクラスタがv2.1.4からv2.5.0にアップグレードされることを意味します。

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -159,9 +159,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.json
    index 572b4cf0e..4f5ec6532 100644
    --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.json
    +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.json
    @@ -1 +1 @@
    -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Docker Composeを使用したMilvusスタンドアロンのアップグレード","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"イメージを変更してMilvusをアップグレードする","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"次のステップ","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Docker Composeを使用したMilvusスタンドアロンのアップグレード","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"イメージを変更してMilvusをアップグレードする","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"次のステップ","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.md
    index 95601d8f3..f5aad1426 100644
    --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.md
    +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-docker.md
    @@ -24,9 +24,9 @@ title: Docker Composeを使用したMilvusスタンドアロンのアップグ
             >
           
         

    このトピックでは、Docker Composeを使用してMilvusをアップグレードする方法について説明します。

    -

    通常の場合、イメージを変更することでMilvusをアップグレードすることができます。ただし、v2.1.xからv2.5.0-betaへアップグレードする場合は、事前にメタデータを移行する必要があります。

    +

    通常の場合、イメージを変更することでMilvusをアップグレードすることができます。ただし、v2.1.xからv2.5.0へアップグレードする場合は、事前にメタデータを移行する必要があります。

    -

    セキュリティ上の問題から、Milvusはv2.2.5のリリースと同時にMinIOをRELEASE.2023-03-20T20-16-18Zにアップグレードしています。Docker Composeを使用してインストールされた以前のMilvus Standaloneリリースからアップグレードする前に、Single-Node Single-Drive MinIOデプロイメントを作成し、既存のMinIO設定とコンテンツを新しいデプロイメントに移行する必要があります。詳細については、このガイドを参照してください。

    +

    セキュリティ上の問題から、Milvusはv2.2.5のリリースと同時にMinIOをRELEASE.2023-03-20T20-16-18Zにアップグレードしています。Docker Composeを使用してインストールされた以前のMilvus Standaloneリリースからのアップグレードの前に、Single-Node Single-Drive MinIOデプロイメントを作成し、既存のMinIO設定とコンテンツを新しいデプロイメントに移行する必要があります。詳細については、このガイドを参照してください。

    イメージを変更してMilvusをアップグレードする

  • 以下のコマンドを実行してアップグレードを実行します。

    docker compose down
    @@ -83,7 +83,7 @@ cmd:
       runWithBackup: true
     config:
       sourceVersion: 2.1.4   # Specify your milvus version
    -  targetVersion: 2.5.0-beta
    +  targetVersion: 2.5.0
       backupFilePath: /tmp/migration.bak
     metastore:
       type: etcd
    diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.json
    index ecf144ff7..f14333e0d 100644
    --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.json
    +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.json
    @@ -1 +1 @@
    -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"MilvusスタンドアロンとHelmチャートのアップグレード","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvusバージョンの確認","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Helmを使用したMilvusのアップグレード","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"MilvusスタンドアロンとHelmチャートのアップグレード","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvusバージョンの確認","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Helmを使用したMilvusのアップグレード","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.md
    index 08ac2de06..d86d1cae9 100644
    --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.md
    +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-helm.md
    @@ -66,7 +66,7 @@ title: MilvusスタンドアロンとHelmチャートのアップグレード
     $ helm search repo zilliztech/milvus --versions
     
    -

    Milvus Helm Chartsのレポ(https://milvus-io.github.io/milvus-helm/ )はアーカイブされ、https://zilliztech.github.io/milvus-helm/

    +

    https://zilliztech.github.io/milvus-helm/ Milvus Helm Charts リポジトリhttps://milvus-io.github.io/milvus-helm/ はアーカイブされました:

    helm repo add zilliztech https://zilliztech.github.io/milvus-helm
     helm repo update zilliztech
     # upgrade existing helm release
    @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
     zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
     

    Milvusのアップグレードパスは以下のように選択できます:

    -
    - Milvus v2.2.3以降からv2.5.0-betaへの[ローリングアップグレード](#conduct-a-rolling-upgrade)。
    +
    - Milvus v2.2.3以降からv2.5.0への[ローリングアップグレード](#conduct-a-rolling-upgrade)。

    ローリングアップグレードの実施

    Milvus 2.2.3以降では、Milvusコーディネータをアクティブスタンバイ モードで動作するように設定し、コーディネータのローリングアップグレード機能を有効にすることで、コーディネータのアップグレード中にMilvusが受信したリクエストに応答できるようになりました。以前のリリースでは、アップグレード中にコーディネータを削除してから作成するため、サービスのダウンタイムが発生する可能性がありました。

    +

    Milvus 2.2.3以降では、Milvusコーディネータをアクティブスタンバイ モードで動作するように設定し、コーディネータのローリングアップグレード機能を有効にすることで、コーディネータのアップグレード中にMilvusが受信したリクエストに応答できるようになります。以前のリリースでは、アップグレード中にコーディネータを削除してから作成するため、サービスのダウンタイムが発生する可能性がありました。

    ローリングアップグレードでは、コーディネータをアクティブスタンバイで動作させる必要があります。弊社が提供するスクリプトを使用して、コーディネーターをアクティブスタンバイ モードで動作するように設定し、ローリングアップグレードを開始できます。

    Kubernetesが提供するローリングアップデートの機能に基づいて、上記のスクリプトは、デプロイメントの依存関係に従って順序付けられたアップデートを強制します。さらに、Milvusはアップグレード中もそのコンポーネントに依存しているコンポーネントとの互換性を維持するメカニズムを実装し、潜在的なサービスのダウンタイムを大幅に削減します。

    このスクリプトは、HelmとともにインストールされたMilvusのアップグレードにのみ適用されます。次の表は、スクリプトで使用可能なコマンドフラグの一覧です。

    @@ -145,12 +145,12 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope o操作方法update偽 -

    Milvusインスタンスのすべてのデプロイが正常な状態であることを確認したら、以下のコマンドを実行してください。以下のコマンドを実行することで、Milvusインスタンスを2.5.0-betaにアップグレードすることができます。

    -
    sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
    +

    Milvusインスタンスのすべてのデプロイが正常な状態であることを確認したら、以下のコマンドを実行してください。以下のコマンドを実行することで、Milvusインスタンスを2.5.0にアップグレードすることができます。

    +
    sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
     
      -
    1. このスクリプトはRocksMQと一緒にインストールされたMilvusインスタンスには適用されません
    2. +
    3. このスクリプトはRocksMQと共にインストールされたMilvusインスタンスには適用されません
    4. スクリプトはデプロイのアップグレード順序をハードコードしており、変更することはできません。
    5. このスクリプトでは、kubectl patch を使用してデプロイメントを更新し、kubectl rollout status を使用してデプロイメントの状態を監視します。
    6. スクリプトはkubectl patch を使用して、デプロイメントのapp.kubernetes.io/version ラベルをコマンドの-t フラグの後に指定されたものに更新します。
    7. @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
    8. Milvusメタデータを移行します。
    9. 新しいイメージでMilvusコンポーネントを起動する。
    -

    2.Milvusをv2.1.xから2.5.0-betaにアップグレードする。

    以下のコマンドは、Milvusをv2.1.4から2.5.0-betaにアップグレードすることを前提としています。必要なバージョンに変更してください。

    +

    2.Milvusをv2.1.xから2.5.0にアップグレードする。

    以下のコマンドは、Milvusをv2.1.4から2.5.0にアップグレードすることを想定しています。必要なバージョンに変更してください。

      -
    1. Milvusインスタンス名、ソースMilvusバージョン、ターゲットMilvusバージョンを指定する。

      -
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
      +
    2. Milvusインスタンス名、ソースMilvusバージョン、ターゲットMilvusバージョンを指定します。

      +
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
       
    3. -
    4. MilvusがデフォルトのK8s名前空間にインストールされていない場合は-n

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
      +
    5. MilvusがデフォルトのK8s名前空間にインストールされていない場合は、-n で名前空間を指定します。

      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
       
    6. Milvusがカスタムrootpath でインストールされている場合は、-r でルートパスを指定してください。

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
       
    7. Milvusがカスタムimage でインストールされている場合は、-w でイメージタグを指定してください。

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
       
    8. マイグレーション完了後にマイグレーションポッドを自動的に削除する場合は、-d true を設定します。

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
       
    9. マイグレーションに失敗した場合は、ロールバックしてマイグレーションをやり直します。

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
       
    diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.json index 93993063b..4195f0ba4 100644 --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Milvus OperatorによるMilvusスタンドアロンのアップグレード","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvusオペレータのアップグレード","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"イメージを変更してMilvusをアップグレードする","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Milvus OperatorによるMilvusスタンドアロンのアップグレード","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvusオペレータのアップグレード","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"ローリングアップグレードの実施","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"イメージを変更してMilvusをアップグレードする","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"メタデータの移行","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.md index 936360c38..2fd1eaff9 100644 --- a/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/ja/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

    Milvusオペレータを最新バージョンにアップグレードすると、以下の選択肢があります:

    ローリングアップグレードの実施

  • 上記の設定ファイルでは、spec.components.enableRollingUpdatetrue に設定し、spec.components.image を任意の Milvus バージョンに設定します。

    デフォルトでは、Milvusはコーディネーターのローリングアップグレードを順番に実行し、コーディネーターのポッドイメージを次々に置き換えていきます。アップグレード時間を短縮するには、spec.components.imageUpdateModeall に設定し、Milvus がすべてのポッドイメージを同時に置き換えるようにします。

    @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

    Milvusがコーディネータポッドイメージを低いバージョンに置き換えるようにするには、spec.components.imageUpdateModerollingDowngrade に設定します。

    apiVersion: milvus.io/v1beta1
    @@ -130,7 +130,7 @@ labels:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    その後、以下を実行してアップグレードを実行します:

    kubectl patch -f milvusupgrade.yaml
    @@ -150,8 +150,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Milvus 2.2.0以降、メタデータは以前のリリースと互換性がありません。以下の例は、Milvus 2.1.4からMilvus v2.5.0-betaへのアップグレードを想定しています。

    -

    1.メタデータ移行用ファイル.yaml の作成

    メタデータ移行用ファイルを作成します。以下はその例です。設定ファイルには、namesourceVersiontargetVersion を指定する必要があります。以下の例では、namemy-release-upgrade に、sourceVersionv2.1.4 に、targetVersionv2.5.0-beta に設定しています。 これは、Milvusインスタンスがv2.1.4からv2.5.0-betaにアップグレードされることを意味します。

    +

    Milvus 2.2.0以降、メタデータは以前のリリースと互換性がありません。以下の例は、Milvus 2.1.4からMilvus v2.5.0へのアップグレードを想定しています。

    +

    1.メタデータ移行用ファイル.yaml の作成

    メタデータ移行用ファイルを作成します。以下はその例です。設定ファイルには、namesourceVersiontargetVersion を指定する必要があります。以下の例では、namemy-release-upgrade に、sourceVersionv2.1.4 に、targetVersionv2.5.0 に設定しています。 これは、Milvusインスタンスがv2.1.4からv2.5.0にアップグレードされることを意味します。

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -161,9 +161,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/ja/adminGuide/users_and_roles.json b/localization/v2.5.x/site/ja/adminGuide/users_and_roles.json
    new file mode 100644
    index 000000000..515e3b4e9
    --- /dev/null
    +++ b/localization/v2.5.x/site/ja/adminGuide/users_and_roles.json
    @@ -0,0 +1 @@
    +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"ユーザーとロールの作成","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"ユーザ","href":"User​","type":2,"isActive":false},{"label":"ロール","href":"Role​","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ja/adminGuide/users_and_roles.md b/localization/v2.5.x/site/ja/adminGuide/users_and_roles.md
    new file mode 100644
    index 000000000..2d24a9484
    --- /dev/null
    +++ b/localization/v2.5.x/site/ja/adminGuide/users_and_roles.md
    @@ -0,0 +1,256 @@
    +---
    +id: users_and_roles.md
    +related_key: 'users, roles'
    +summary: >-
    +  MilvusはRBACによってきめ細かなアクセス制御を実現します。ユーザとロールの作成から始め、ロールに特権や特権グループを割り当て、最後にユーザにロールを付与してアクセス制御を管理します。この方法により、アクセス管理の効率性と安全性を確保することができます。ここでは、Milvusにおけるユーザとロールの作成方法を紹介します。
    +title: ユーザーとロールの作成
    +---
    +

    ユーザーとロールの作成

    MilvusはRBACによりきめ細かなアクセスコントロールを実現します。まずユーザとロールを作成し、次にロールに特権または特権グループを割り当て、最後にユーザにロールを付与してアクセス制御を管理します。この方法により、アクセス管理の効率性と安全性を確保することができます。ここでは、Milvusにおけるユーザとロールの作成方法を紹介します。

    +

    ユーザ

    Milvusインスタンスの初期化後、Milvusへの初回接続時に認証用のルートユーザが自動生成されます。ルートユーザのユーザ名はroot で、パスワードはMilvus です。ルートユーザのデフォルトロールはadmin で、すべてのリソースにアクセスできます。データの安全性を確保するため、不正アクセスを防止するためにルートユーザの認証情報を安全に管理してください。

    +

    日常的な運用では、ルート・ユーザーを使用する代わりに、ユーザーを作成することをお勧めします。

    +

    ユーザーの作成

    以下の例では、ユーザー名user_1 、パスワードP@ssw0rd でユーザーを作成する方法を示しています。ユーザーのユーザー名とパスワードは、以下の規則に従う必要があります。

    +
      +
    • ユーザー名:文字で始まり、大文字または小文字、数字、アンダースコアのみを含む。

    • +
    • パスワード:8~64文字で、大文字、小文字、数字、特殊文字のうち3つを含むこと。

    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.create_user(user_name="user_1", password="P@ssw0rd")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.CreateUserReq;​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +CreateUserReq createUserReq = CreateUserReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .build();​
    +        ​
    +client.createUser(createUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +await milvusClient.createUser({​
    +   username: 'user_1',​
    +   password: 'P@ssw0rd',​
    + });​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    パスワードの更新

    ユーザーを作成した後、パスワードを忘れた場合は更新することができます。

    +

    また、新しいパスワードは以下のルールに従わなければなりません。

    +
      +
    • 8~64文字で、大文字、小文字、数字、特殊文字のうち3つを含むこと。
    • +
    +

    次の例は、ユーザーuser_1 のパスワードをNewP@ssw0rd に更新する方法を示している。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.update_password(​
    +    user_name="user_1",​
    +    old_password="P@ssw0rd",​
    +    new_password="NewP@ssw0rd"​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
    +​
    +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .newPassword("NewP@ssw0rd")​
    +        .build();​
    +client.updatePassword(updatePasswordReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.updateUser({​
    +   username: 'user_1',​
    +   newPassword: 'P@ssw0rd',​
    +   oldPassword: 'NewP@ssw0rd',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "newPassword": "P@ssw0rd!",​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    ユーザーの一覧表示

    複数のユーザーを作成した後、すべての既存ユーザーを一覧表示することができます。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listUsers();​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    以下は出力例です。root は Milvus で自動的に生成されたデフォルトユーザーです。user_1 は作成されたばかりの新しいユーザーです。

    +
    ['root', 'user_1']​
    +
    +
    +

    ロール

    Milvusには、admin という組み込みロールが用意されています。これは、すべてのインスタンス配下のリソースにアクセスでき、すべての操作に権限を持つ管理者ロールです。よりきめ細かいアクセス管理とデータセキュリティの強化のためには、ニーズに応じてカスタムロールを作成することをお勧めします。

    +

    ロールの作成

    以下の例では、role_a という名前のロールを作成する方法を示します。

    +

    ロール名は以下の規則に従わなければなりません。

    +
      +
    • 文字で始まり、大文字または小文字、数字、アンダースコアのみを含むことができます。"
    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.create_role(role_name="role_a")​
    +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
    +
    +
    +
    CreateRoleReq createRoleReq = CreateRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +       ​
    +
    +
    +
    client.createRole(createRoleReq);​
    +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.createRole({​
    +   roleName: 'role_a',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    ロールの一覧表示

    いくつかのロールを作成した後、既存のすべてのロールを一覧表示できます。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> roles = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listRoles(​
    +    includeUserInfo: True​
    +);​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    以下は出力例です。admin はmilvusのデフォルトのロールです。role_a は作成されたばかりの新しいロールです。

    +
    ['admin', 'role_a']​
    +
    +
    diff --git a/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.json index c488c5190..7385ae22a 100644 --- a/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Docker ComposeでMilvusを起動する(Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvusのインストール","href":"Install-Milvus","type":2,"isActive":false},{"label":"次のステップ","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Docker ComposeでMilvusを起動する(Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvusのインストール","href":"Install-Milvus","type":2,"isActive":false},{"label":"次のステップ","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.md index d4e321349..322e5c504 100644 --- a/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/ja/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Docker ComposeでMilvusを起動する(Linux)

    MilvusはDocker Composeの設定ファイルをMilvusリポジトリに用意しています。Docker Composeを使用してMilvusをインストールするには、以下のコマンドを実行してください。

    # Download the configuration file
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     
     # Start Milvus
     $ sudo docker compose up -d
    @@ -76,7 +76,7 @@ Creating milvus-standalone ... done
     
    • milvus-standalonemilvus-miniomilvus-etcdという名前のコンテナが立ち上がっています。
      • milvus-etcdコンテナはホストにポートを公開せず、カレントフォルダ内のvolumes/etcdにデータをマッピングする。
      • -
      • milvus-minioコンテナは、デフォルトの認証情報を使用してポート9090および9091をローカルに提供し、そのデータをカレントフォルダ内のvolumes/minioにマップする。
      • +
      • milvus-minioコンテナは、デフォルトの認証情報を使用してポート9090および9091をローカルに提供し、そのデータを現在のフォルダ内のvolumes/minioにマップする。
      • milvus-standaloneコンテナは、デフォルト設定でローカルにポート19530を提供し、そのデータを現在のフォルダ内のvolumes/milvusにマップする。
    diff --git a/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json index 4087ec47e..f71480500 100644 --- a/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json +++ b/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json @@ -1 +1 @@ -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Docker Composeを使用したGPUサポート付きMilvusの実行","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvusのインストール","href":"Install-Milvus","type":2,"isActive":false},{"label":"メモリプールの設定","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"次の作業","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Docker Composeを使用したGPUサポート付きMilvusの実行","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvusのインストール","href":"Install-Milvus","type":2,"isActive":false},{"label":"メモリプールの設定","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"次の作業","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md index 8b9c0d476..042fa3bbf 100644 --- a/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md +++ b/localization/v2.5.x/site/ja/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md @@ -59,8 +59,8 @@ title: Docker Composeを使用したGPUサポート付きMilvusの実行 >

    Docker Composeを使用してGPUをサポートしたMilvusをインストールするには、以下の手順に従ってください。

    -

    1.YAMLファイルのダウンロードと設定

    ダウンロード milvus-standalone-docker-compose-gpu.ymlをダウンロードし、docker-compose.ymlとして手動または以下のコマンドで保存します。

    -
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
    +

    1.YAMLファイルのダウンロードと設定

    ダウンロード milvus-standalone-docker-compose-gpu.ymlをダウンロードし、docker-compose.ymlとして手動または以下のコマンドで保存します。

    +
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
     

    YAMLファイル内のスタンドアロンサービスの環境変数に、以下のように変更を加える必要があります:

      @@ -119,7 +119,7 @@ milvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 23 milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp milvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp
    -

    docker-compose.ymlでMilvusに複数のGPUデバイスを割り当てている場合は、どのGPUデバイスを可視または使用可能にするかを指定できます。

    +

    docker-compose.ymlでMilvusに複数のGPUデバイスを割り当てている場合は、どのGPUデバイスを可視化するか、または使用可能にするかを指定できます。

    GPU デバイス0 を Milvus から見えるようにします:

    $ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone
     
    diff --git a/localization/v2.5.x/site/ja/menuStructure/ja.json b/localization/v2.5.x/site/ja/menuStructure/ja.json index f76d55055..09a74da1a 100644 --- a/localization/v2.5.x/site/ja/menuStructure/ja.json +++ b/localization/v2.5.x/site/ja/menuStructure/ja.json @@ -433,7 +433,7 @@ "children": [] }, { - "label": "番号フィールド", + "label": "数字フィールド", "id": "number.md", "order": 6, "children": [] @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "フィルタリング", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "フィルタリングの説明", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "ベーシック・オペレーター", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "フィルタリング・テンプレート", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "JSON演算子", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "配列演算子", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "全文検索", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "テキストマッチ", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "検索イテレータ", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "パーティション・キーの使用", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "メタデータのフィルタリング", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "再ランキング", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -894,7 +925,7 @@ ] }, { - "label": "Milvus移住", + "label": "Milvusマイグレーション", "id": "milvus_migration", "isMenu": true, "order": 6, @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "ユーザー、権限、役割", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "RBACを有効にする", - "id": "rbac.md", + "label": "リレーショナルアクセス制御", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "RBACの説明", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "ユーザーとロールの作成", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "特権グループの作成", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "特権の付与", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "補助金の役割", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "ユーザーとロールの削除", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "輸送中の暗号化", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Milvusサイジングツール", "id": "sizing", @@ -2017,7 +2085,7 @@ "children": [] }, { - "label": "レコメンダー・システム", + "label": "推薦システム", "id": "recommendation_system.md", "order": 6, "children": [] diff --git a/localization/v2.5.x/site/ja/release_notes.json b/localization/v2.5.x/site/ja/release_notes.json index b71aac54e..320212c56 100644 --- a/localization/v2.5.x/site/ja/release_notes.json +++ b/localization/v2.5.x/site/ja/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"リリースノート","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0ベータ","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"リリースノート","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/release_notes.md b/localization/v2.5.x/site/ja/release_notes.md index 87066b3b1..63c119b26 100644 --- a/localization/v2.5.x/site/ja/release_notes.md +++ b/localization/v2.5.x/site/ja/release_notes.md @@ -19,7 +19,7 @@ title: リリースノート >

    Milvusの新機能をご確認ください!このページでは、各リリースの新機能、改善点、既知の問題、バグ修正についてまとめています。v2.5.0以降の各バージョンのリリースノートはこのセクションにあります。定期的にこのページをご覧いただき、アップデート情報をご確認ください。

    -

    v2.5.0ベータ

    リリース日: 2024年11月26日

    +

    リリース日: 2024年12月23日

    - +
    MilvusバージョンPython SDKバージョンNode.js SDKバージョンJava SDKバージョン
    2.5.0ベータ2.5.02.5.02.5.0
    2.5.02.5.12.5.22.5.2
    -

    Milvus 2.5.0-betaは、ベクトル検索や大規模なデータ管理を扱うユーザーにとって、ユーザビリティ、スケーラビリティ、パフォーマンスを向上させるための大きな進歩をもたらします。本リリースにより、Milvusはタームベース検索、最適化されたクエリのためのクラスタリングコンパクション、スパースおよびデンスベクトル検索メソッドの多目的なサポートといった強力な新機能を統合しました。クラスタ管理、インデックス作成、データ処理の強化により、Milvusは新たなレベルの柔軟性と使いやすさを導入し、より堅牢で使いやすいベクトルデータベースとなりました。

    +

    Milvus 2.5.0は、ベクトル検索や大規模データ管理を扱うユーザーにとって、ユーザビリティ、スケーラビリティ、パフォーマンスを向上させるための大きな進歩をもたらします。本リリースにより、Milvusはタームベース検索、最適化されたクエリのためのクラスタリングコンパクション、スパースおよびデンスベクトル検索メソッドの多目的なサポートといった強力な新機能を統合しました。クラスタ管理、インデックス作成、データ処理の強化により、Milvusは新たなレベルの柔軟性と使いやすさを導入し、より堅牢で使いやすいベクトルデータベースとなりました。

    主な機能

    Milvus2.5はSparse-BM25で実装された全文検索に対応しています!この機能は、Milvusの強力なセマンティック検索機能を補完する重要な機能であり、特に希少語や専門用語が含まれるシナリオで威力を発揮します。以前のバージョンでは、Milvusはキーワード検索シナリオを支援するためにスパースベクトルをサポートしていました。これらのスパースベクトルはSPLADEv2/BGE-M3のようなニューラルモデルやBM25アルゴリズムのような統計モデルによってMilvusの外部で生成されていました。

    Tantivyを搭載したMilvus 2.5は、アナライザとスパースベクトル抽出を内蔵しており、APIは入力としてベクトルを受け取るだけでなく、テキストを直接受け取れるように拡張されています。BM25の統計情報は、データが挿入されるとリアルタイムで更新され、使いやすさと精度が向上します。さらに、近似最近傍(ANN)アルゴリズムに基づくスパース・ベクトルは、標準的なキーワード検索システムよりも強力なパフォーマンスを提供します。

    詳細については、Analyzer OverviewおよびFull Text Searchをご参照ください。

    @@ -60,7 +60,7 @@ title: リリースノート

    FaissベースのHNSW SQ/PQ/PRQ

    Faissコミュニティとの緊密な連携により、FaissのHNSWアルゴリズムは、機能と性能の両面で大幅に改善されました。安定性と保守性を考慮し、Milvus 2.5はHNSWのサポートをhnswlibからFaissに正式に移行しました。

    Faissに基づき、Milvus 2.5はHNSWの複数の量子化方式をサポートし、様々なシナリオのニーズに応えます:SQ (Scalar Quantizers)、PQ (Product Quantizer)、PRQ (Product Residual Quantizer)です。SQとPQはより一般的で、SQは優れたクエリ性能と構築速度を提供し、PQは同じ圧縮率でより優れたリコールを提供する。多くのベクトルデータベースでは、SQ量子化の単純な形式であるバイナリ量子化が一般的に使用されている。

    PRQはPQとAQ(Additive Quantizer)の融合である。PQと比較すると、特にバイナリ圧縮と言って、高い圧縮率でより良いリコールを実現するために、より長い構築時間を必要とする。

    -

    クラスタリング圧縮(ベータ)

    Milvus 2.5では、クラスタリングコンパクションが導入され、大規模なコレクションの検索を高速化し、コストを削減する。クラスタリングキーとしてスカラーフィールドを指定することで、データを範囲ごとに再分散し、保存と検索を最適化します。グローバルインデックスのように動作するこの機能により、Milvusはクラスタリングメタデータに基づいたクエリ時に効率的にデータを刈り込み、スカラーフィルタが適用された際の検索パフォーマンスを向上させることができます。

    +

    クラスタリング圧縮(ベータ)

    Milvus2.5では、大規模なコレクションの検索を高速化し、コストを削減するために、クラスタリングコンパクションが導入された。クラスタリングキーとしてスカラーフィールドを指定することで、データを範囲ごとに再分散し、保存と検索を最適化します。グローバルインデックスのように動作するこの機能により、Milvusはクラスタリングメタデータに基づいたクエリ時に効率的にデータを刈り込み、スカラーフィルタが適用された際の検索パフォーマンスを向上させることができます。

    詳細はクラスタリング・コンパクションをご参照ください。

    その他の機能

    ストリーミングノード(ベータ版)

    Milvus 2.5では、Write-Ahead Logging (WAL)サービスを提供するストリーミングノードという新しいコンポーネントが導入されました。これにより、Milvusはチャネルの読み書きの前後でコンセンサスを得ることができるようになり、新たな機能、特徴、最適化を実現します。この機能はMilvus 2.5ではデフォルトで無効になっており、バージョン3.0で正式に利用可能になる。

    IPv6サポート

    MilvusはIPv6をサポートし、ネットワーク接続と互換性の拡張を可能にしました。

    @@ -81,3 +81,6 @@ title: リリースノート

    式解析の最適化

    繰り返し式のキャッシュの実装、ANTLRのアップグレード、NOT IN 節のパフォーマンスの最適化により、式の解析を改善。

    DDL 同時実行性能の向上

    データ定義言語(DDL)操作の同時実行パフォーマンスを最適化しました。

    RESTful API 機能の調整

    RESTful API の機能を他の SDK と整合させました。

    +

    セキュリティと設定の更新

    より複雑な環境またはエンタープライズ環境でノード間通信を保護するためにTLSをサポートしました。詳細については、セキュリティ設定を参照してください。

    +

    コンパクション・パフォーマンスの向上

    混合コンパクションにおける最大セグメント数の制限を撤廃し、より小さなセグメントを優先的に処理することで、効率が向上し、大規模または断片化されたデータセットに対するクエリが高速化されました。

    +

    スコアベースのチャネル・バランシング

    チャネル間の負荷を動的に分散するポリシーを導入し、大規模な展開におけるリソースの使用率と全体的な安定性を向上。

    diff --git a/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.json index 21c717086..019f04091 100644 --- a/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"コレクションの変更","href":"Modify-Collection​","type":1,"isActive":false},{"label":"コレクションの名前の変更","href":"Rename-Collection​","type":2,"isActive":false},{"label":"コレクションTTLの設定","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"コレクションの変更","href":"Modify-Collection​","type":1,"isActive":false},{"label":"コレクションの名前の変更","href":"Rename-Collection​","type":2,"isActive":false},{"label":"コレクションTTLの設定","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.md index 5ef75ca3b..a344540c6 100644 --- a/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/ja/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    コレクションを特定の期間だけ削除する必要がある場合、TTL(Time-To-Live)を秒単位で設定することを検討してください。TTLがタイムアウトすると、milvusはコレクション内のエンティティを削除し、コレクションを削除します。削除は非同期で行われるため、削除が完了するまで検索やクエリが可能です。

    -

    次のコード・スニペットは、コレクションのTTLを変更する方法を示しています。

    +

    コレクションを特定の期間だけ削除する必要がある場合、TTL(Time-To-Live)を秒単位で設定することを検討してください。TTLがタイムアウトすると、Milvusはコレクション内のエンティティを削除します。削除は非同期で行われるため、削除が完了するまで検索やクエリが可能です。

    +

    次のコードスニペットは、コレクションのTTLを変更する方法を示しています。

    -
    # Currently not available for Python
    +
    from pymilvus import MilvusClient
     
    +client.alter_collection_properties(
    +  collection_name="collection_name",
    +  properties = {"collection.ttl.seconds": 500}
    +)
     
    import io.milvus.v2.service.collection.request.AlterCollectionReq;​
     import java.util.HashMap;​
    diff --git a/localization/v2.5.x/site/ja/userGuide/schema/string.md b/localization/v2.5.x/site/ja/userGuide/schema/string.md
    index 7dfc6077f..ca8257d84 100644
    --- a/localization/v2.5.x/site/ja/userGuide/schema/string.md
    +++ b/localization/v2.5.x/site/ja/userGuide/schema/string.md
    @@ -2,7 +2,7 @@
     id: string.md
     title: 文字列フィールド
     summary: >-
    -  Milvusでは、VARCHARは文字列型データの格納に使用されるデータ型で、可変長の文字列の格納に適しています。シングルバイト文字とマルチバイト文字の両方の文字列を格納することができ、最大長は60,535文字までです。VARCHARフィールドを定義する際には、最大長パラメータmax_lengthも指定する必要があります。VARCHAR文字列型は、テキスト・データの格納と管理に効率的で柔軟な方法を提供し、さまざまな長さの文字列を扱うアプリケーションに最適です。
    +  Milvusでは、VARCHARは文字列型データの格納に使用されるデータ型で、可変長の文字列の格納に適しています。シングルバイト文字とマルチバイト文字の両方の文字列を格納することができ、最大長は65,535文字までです。VARCHARフィールドを定義する際には、最大長パラメータmax_lengthも指定する必要があります。VARCHAR文字列型は、テキスト・データの格納と管理に効率的で柔軟な方法を提供し、さまざまな長さの文字列を扱うアプリケーションに最適です。
     ---
     

    文字列フィールド

    Milvusでは、VARCHAR は文字列型データを格納するためのデータ型で、可変長の文字列を格納するのに適しています。シングルバイト文字とマルチバイト文字の両方の文字列を格納することができ、最大長は60,535文字までです。VARCHAR フィールドを定義する際には、最大長パラメータmax_length も指定する必要がある。VARCHAR 文字列型は、テキスト・データを格納・管理する効率的で柔軟な方法を提供し、さまざまな長さの文字列を扱うアプリケーションに最適です。

    +

    Milvusでは、VARCHAR は文字列型データを格納するためのデータ型で、可変長の文字列を格納するのに適しています。シングルバイト文字とマルチバイト文字の両方の文字列を格納することができ、最大長は65,535文字までです。VARCHAR フィールドを定義する際には、最大長パラメータmax_length も指定する必要がある。VARCHAR 文字列型は、テキスト・データを格納・管理する効率的で柔軟な方法を提供し、さまざまな長さの文字列を扱うアプリケーションに最適です。

    VARCHAR フィールドの追加

    Milvusは、配列フィールドをクエリするための強力な演算子を提供しており、配列の内容に基づいてエンティティをフィルタリングして取得することができます。

    +
    +

    配列内の要素はすべて同じ型でなければならず、配列内の入れ子構造はプレーンな文字列として扱われます。したがって、ARRAYフィールドを扱う際には、過度な深い入れ子は避け、 できるだけ平坦なデータ構造にしてパフォーマンスを最適化することを推奨します。

    +
    +

    使用可能なARRAY演算子

    Milvusでは、ARRAY演算子により、配列フィールドに対するきめ細かな問い合わせが可能です。これらの演算子は以下の通りです。

    + +

    ARRAY_CONTAINS

    ARRAY_CONTAINS 演算子は、配列フィールドに特定の要素が存在するかどうかを調べます。指定した要素が配列に存在するエンティティを見つけたい場合に便利です。

    +

    +

    さまざまな年の最低気温の記録を含む配列フィールドhistory_temperatures があるとします。配列に値23 が含まれるすべてのエンティティを検索するには、以下のフィルタ式を使用できます。

    +
    filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
    +
    +
    +

    これは、配列history_temperatures に値23 が含まれるすべてのエンティティを返します。

    +

    array_contains_all

    ARRAY_CONTAINS_ALL 演算子は、指定したリストのすべての要素が配列フィールドに存在することを保証します。この演算子は、配列に複数の値が含まれるエンティティにマッチさせたい場合に便利です。

    +

    +

    history_temperatures 配列に2324 の両方が含まれるエンティティをすべて検索する場合は、この演算子を使 用できます。

    +
    filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
    +
    +
    +

    これは、history_temperatures 配列に指定した値の両方が含まれるすべてのエンティティを返します。

    +

    array_contains_any

    ARRAY_CONTAINS_ANY 演算子は、指定したリストの要素が配列フィールドに存在するかどうかを調べます。これは、指定された値の少なくとも 1 つが配列に含まれるエンティティにマッチする場合に便利です。

    +

    +

    history_temperatures 配列に23 または24 のいずれかが含まれるエンティティをすべて検索するには、 を使用できます。

    +
    filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
    +
    +
    +

    これは、history_temperatures 配列に値23 または24 の少なくともいずれかが含まれるすべてのエンティティを返します。

    +

    ARRAY_LENGTH

    ARRAY_LENGTH 演算子を使用すると、配列フィールドの要素数に基づいてエンティティをフィルタリングできます。これは、特定の長さの配列を持つエンティティを見つける必要がある場合に便利です。

    +

    +

    history_temperatures 配列の要素数が 10 未満のエンティティをすべて見つけたい場合は、次のようにします。

    +
    filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
    +
    +
    +

    これは、history_temperatures 配列の要素数が 10 未満のエンティティをすべて返します。

    diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..251b8bcd9 --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"基本演算子","href":"Basic-Operators​","type":1,"isActive":false},{"label":"比較演算子","href":"Comparison-operators​","type":2,"isActive":false},{"label":"範囲演算子","href":"Range-operators​","type":2,"isActive":false},{"label":"算術演算子","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"論理演算子","href":"Logical-Operators​","type":2,"isActive":false},{"label":"JSONとARRAYフィールドで基本演算子を使うヒント","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"結論","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..58a54c3f5 --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,232 @@ +--- +id: basic-operators.md +summary: >- + Milvusはデータのフィルタリングやクエリを効率的に行うための豊富な基本演算子を提供しています。これらの演算子を使用すると、スカラーフィールド、数値計算、論理条件などに基づいて検索条件を絞り込むことができます。これらの演算子の使い方を理解することは、正確なクエリを構築し、検索の効率を最大化するために非常に重要です。 +title: ベーシック・オペレーター +--- +

    基本演算子

    Milvusはデータのフィルタリングやクエリを効率的に行うための豊富な基本演算子を提供しています。これらの演算子を使用すると、スカラーフィールド、数値計算、論理条件などに基づいて検索条件を絞り込むことができます。これらの演算子の使い方を理解することは、正確なクエリを構築し、検索の効率を最大限に高めるために非常に重要です。

    +

    比較演算子

    比較演算子は、等式、不等式、またはサイズに基づいてデータをフィルタリングするために使用されます。数値フィールド、テキストフィールド、日付フィールドに適用できます。

    +

    サポートされている比較演算子

      +
    • == (等しい

    • +
    • != (等しくない

    • +
    • > (より大きい

    • +
    • < (より小さい

    • +
    • >= (大以上)

    • +
    • <= 以下

    • +
    +

    例 1:Equal To (==) によるフィルタリング

    status というフィールドがあり、status が "active" であるすべてのエンティティを検索したいとします。等号演算子== を使用できます。

    +
    filter = 'status == "active"'​
    +
    +
    +

    例 2:Not Equal To (!=) を使ったフィルタリング

    status が「非アクティブ」でないエンティティを見つける。

    +
    filter = 'status != "inactive"'​
    +
    +
    +

    例 3:Greater Than (>) によるフィルタリング

    age が 30 より大きいエンティティをすべて検索する場合。

    +
    filter = 'age > 30'​
    +
    +
    +

    例4: Less Than (<) によるフィルタリング

    price が 100 未満のエンティティを検索する場合。

    +
    filter = 'price < 100'​
    +
    +
    +

    例 5:Greater Than または Equal To (>=) によるフィルタリング

    rating が 4 以上のエンティティをすべて検索する場合。

    +
    filter = 'rating >= 4'​
    +
    +
    +

    例 6:Less Than or Equal To (<=) によるフィルタリング

    discount が 10% 以下のエンティティを検索する場合。

    +
    filter = 'discount <= 10'​
    +
    +
    +

    範囲演算子

    範囲演算子は、特定の値の集合または範囲に基づいてデータをフィルタリングするのに役立ちます。

    +

    サポートされている範囲演算子。

      +
    • IN:特定のセットまたは範囲内の値をマッチさせるために使用されます。

    • +
    • LIKE:パターンにマッチさせるために使用します(主にテキストフィールドの場合)。

    • +
    +

    例 1:IN を使用して複数の値に一致させる

    color が "red"、"green"、または "blue" のいずれかであるすべてのエンティティを検索する場合。

    +
    filter = 'color in ["red", "green", "blue"]'​
    +
    +
    +

    これは、値のリストに含まれるかどうかを調べたいときに便利です。

    +

    例 2:LIKE を使ったパターンマッチング

    LIKE 演算子は文字列フィールドのパターンマッチングに使われます。この演算子は、プレフィックスインフィックスサフィックスなど、テキスト内のさまざまな位置の部分文字列にマッチさせることができます。LIKE 演算子は% シンボルをワイルドカードとして使い、任意の文字数(ゼロを含む)にマッチさせることができます。

    +

    プレフィックスマッチ(Starts With)

    文字列が指定したパターンで始まるようなプレフィックスマッチを行うには、パターンを先頭に置き、% を使って、それに続く文字にマッチさせることができます。たとえば、name が "Prod" で始まるすべての製品を検索する場合。

    +
    filter = 'name LIKE "Prod%"'​
    +
    +
    +

    これは、"Product A"、"Product B "など、商品名が "Prod "で始まるすべての商品にマッチします。

    +

    接尾辞マッチ(End With

    文字列が指定されたパターンで終わる接尾辞マッチの場合、% シンボルをパターンの先頭に置きます。例えば、name が "XYZ" で終わるすべての製品を検索する場合。

    +
    filter = 'name LIKE "%XYZ"'​
    +
    +
    +

    この場合、"ProductXYZ"、"SampleXYZ "など、製品名が "XYZ "で終わるすべての製品にマッチします。

    +

    接尾辞マッチ(含む

    文字列のどこにでもパターンが出現するようなinfixマッチを行うには、% シンボルをパターンの最初と最後の両方に置きます。たとえば、name に "Pro" という単語が含まれるすべての製品を検索します。

    +
    filter = 'name LIKE "%Pro%"'​
    +
    +
    +

    これは、"Product"、"ProLine"、"SuperPro "など、製品名に "Pro "という部分文字列が含まれるすべての製品にマッチします。

    +

    算術演算子

    算術演算子を使用すると、数値フィールドを含む計算に基づいて条件を作成できます。

    +

    サポートされる算術演算子

      +
    • + (加算)

    • +
    • - (減算)

    • +
    • * (乗算)

    • +
    • / (除算)

    • +
    • % (モジュラス

    • +
    • ** 指数

    • +
    +

    例 1: 足し算の使用 (+)

    total の価格がbase_pricetax の合計であるエンティティを見つける。

    +
    filter = 'total == base_price + tax'​
    +
    +
    +

    例2: 減算 (-) の使用

    quantity が 50 より大きく、quantity_sold が 30 より小さいエンティティを見つける。

    +
    filter = 'quantity - quantity_sold > 50'​
    +
    +
    +

    例3: 乗算を使う (*)

    price が 100 より大きく、quantity が 10 より大きい、乗算されたエンティティを見つけるには。

    +
    filter = 'price * quantity > 1000'​
    +
    +
    +

    例 4: 除算の使用 (/)

    total_pricequantity で割った値が 50 未満である実体を見つける。

    +
    filter = 'total_price / quantity < 50'​
    +
    +
    +

    例5:モジュラス (%) の使用

    id が偶数(すなわち、2で割り切れる)である実体を見つけるには。

    +
    filter = 'id % 2 == 0'​
    +
    +
    +

    例6: 指数を使う (**)

    price の 2 乗が 1000 より大きいエンティティを見つける。

    +
    filter = 'price ** 2 > 1000'​
    +
    +
    +

    論理演算子

    論理演算子は、複数の条件を組み合わせて、より複雑なフィルタ式にするために使用します。これにはANDOR 、およびNOT が含まれます。

    +

    サポートされている論理演算子

      +
    • AND:すべて真でなければならない複数の条件を組み合わせます。

    • +
    • OR:少なくとも1つが真でなければならない条件を組み合わせる。

    • +
    • NOT:条件を否定する。

    • +
    +

    例 1:AND を使って条件を組み合わせる

    price が 100 より大きく、stock が 50 より大きい製品をすべて見つける。

    +
    filter = 'price > 100 AND stock > 50'​
    +
    +
    +

    例 2:OR を使って条件を組み合わせる

    color が「赤」または「青」であるすべての製品を検索する。

    +
    filter = 'color == "red" OR color == "blue"'​
    +
    +
    +

    例 3:NOT を使って条件を除外する

    color が "green" でないすべての商品を見つける。

    +
    filter = 'NOT color == "green"'​
    +
    +
    +

    JSONとARRAYフィールドで基本演算子を使うヒント

    Milvusの基本演算子は汎用性が高く、スカラーフィールドに適用することができますが、JSONやARRAYフィールドのキーやインデックスにも効果的に使用することができます。

    +

    例えば、price,model,tags のような複数のキーを含むproduct フィールドがある場合、常にキーを直接参照します。

    +
    filter = 'product["price"] > 1000'​
    +
    +
    +

    記録された気温の配列の最初の気温が特定の値を超えているレコードを検索するには、次のように使用する。

    +
    filter = 'history_temperatures[0] > 30'​
    +
    +
    +

    結論

    Milvusには基本的な演算子が揃っており、データのフィルタリングやクエリを柔軟に行うことができます。比較演算子、範囲演算子、算術演算子、論理演算子を組み合わせることで、検索結果を絞り込み、必要なデータを効率的に取得するための強力なフィルタ式を作成することができます。

    diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..787205be8 --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"フィルタリングの説明","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"基本演算子","href":"Basic-operators​","type":2,"isActive":false},{"label":"フィルタ式のテンプレート","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"データ型固有の演算子","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..82f5c1aa2 --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,142 @@ +--- +id: boolean.md +summary: >- + Milvusはデータの正確なクエリを可能にする強力なフィルタリング機能を提供します。フィルタ式を使用すると、特定のスカラーフィールドを対象とし、さまざまな条件で検索結果を絞り込むことができます。このガイドでは、Milvusにおけるフィルタ式の使用方法を、クエリ操作に焦点を当てた例を用いて説明します。また、検索および削除リクエストでこれらのフィルタを適用することもできます。 +title: フィルタリングの説明 +--- +

    フィルタリングの説明

    Milvusはデータの正確なクエリを可能にする強力なフィルタリング機能を提供します。フィルタ式を使用すると、特定のスカラーフィールドを対象とし、さまざまな条件で検索結果を絞り込むことができます。このガイドでは、Milvusにおけるフィルタ式の使用方法を、クエリ操作に焦点を当てた例を用いて説明します。また、検索や削除のリクエストでもこれらのフィルタを適用することができます。

    +

    基本演算子

    Milvusはデータをフィルタリングするためのいくつかの基本的な演算子をサポートしています。

    +
      +
    • 比較演算子== !=,>,<,>=, および<= では、数値、テキスト、または日付フィールドに基づくフィルタリングが可能です。

    • +
    • 範囲フィルターINLIKE は、特定の値の範囲やセットにマッチさせるのに役立ちます。

    • +
    • 算術演算子+ -,*,/,%, および** は、数値フィールドを含む計算に使用されます。

    • +
    • 論理演算子AND ORNOT は、複数の条件を組み合わせて複雑な式にします。

    • +
    +

    例色によるフィルタリング

    スカラー・フィールドcolor で原色(赤、緑、青)を持つエンティティを検索するには、以下のフィルタ式を使用します。

    +
    filter='color in ["red", "green", "blue"]'​
    +
    +
    +

    例JSONフィールドのフィルタリング

    MilvusではJSONフィールドのキーを参照することができます。たとえば、price およびmodel をキーとする JSON フィールドproduct があり、特定のモデルで価格が 1,850 より低い製品を検索したい場合は、次のフィルタ式を使用します。

    +
    filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
    +
    +
    +

    例配列フィールドのフィルタリング

    例:配列フィールドのフィルタリングhistory_temperatures に気温の記録があり、10番目に記録された気温が23℃を超える観測所を見つけたい場合、この式を使用します。

    +
    filter='history_temperatures[10] > 23'​
    +
    +
    +

    これらの基本演算子についての詳細は、基本演算子を参照してください。

    +

    フィルタ式のテンプレート

    日中韓の文字を使ってフィルタリングを行う場合、文字セットとエンコーディングの違いが大きいため、処理が複雑になることがあります。その結果、特にIN 演算子のパフォーマンスが低下することがあります。

    +

    Milvusでは、日中韓文字を扱う際のパフォーマンスを最適化するために、フィルター式のテンプレート化を導入しています。フィルター式から動的な値を分離することで、クエリーエンジンはパラメーターの挿入をより効率的に処理します。

    +

    北京」(北京)または「上海」(上海)に住む25歳以上の個人を検索するには、次のテンプレート式を使用します。

    +
    filter = "age > 25 AND city IN ['北京', '上海']"​
    +
    +
    +

    パフォーマンスを向上させるには、パラメータ付きのこのバリエーションを使用します。

    +
    filter = "age > {age} AND city in {city}",​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    この方法は、解析のオーバーヘッドを減らし、クエリの速度を向上させます。詳細はフィルタのテンプレート化 を参照してください。

    +

    データ型固有の演算子

    Milvusは、JSON、ARRAY、VARCHARフィールドなどの特定のデータ型に対する高度なフィルタリング演算子を提供しています。

    +

    JSON フィールド固有の演算子

    MilvusはJSONフィールドをクエリするための高度な演算子を提供し、複雑なJSON構造内の正確なフィルタリングを可能にします。

    +

    **JSON_CONTAINS(identifier, jsonExpr)**:フィールドにJSON式が存在するかどうかをチェックします。

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains(tags, "sale")'​
    +
    +
    +

    **JSON_CONTAINS_ALL(identifier, jsonExpr)**:JSON式のすべての要素が存在することを確認します。

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    **JSON_CONTAINS_ANY(identifier, jsonExpr)**:JSON 式に少なくとも 1 つの要素が存在するエンティティをフィルタリングします。

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    JSON 演算子の詳細については、「JSON 演算子」を参照してください。

    +

    ARRAY フィールド固有の演算子

    Milvusは、ARRAY_CONTAINSARRAY_CONTAINS_ALLARRAY_CONTAINS_ANYARRAY_LENGTH のような配列フィールド用の高度なフィルタリング演算子を提供しており、配列データに対するきめ細かな制御が可能です。

    +

    **ARRAY_CONTAINS**:特定の要素を含むエンティティをフィルタリングします。

    +
    filter="ARRAY_CONTAINS(history_temperatures, 23)"​
    +
    +
    +

    **ARRAY_CONTAINS_ALL**:リスト内のすべての要素が存在するエンティティをフィルタリングする。

    +
    filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_CONTAINS_ANY**:リストから任意の要素を含むエンティティをフィルタリングする。

    +
    filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_LENGTH**:配列の長さに基づいてフィルタリングする。

    +
    filter="ARRAY_LENGTH(history_temperatures) < 10"​
    +
    +
    +

    配列演算子の詳細については、ARRAY 演算子を参照してください。

    +

    VARCHAR フィールド固有の演算子

    **Text_Match** 演算子を使うと、特定のクエリ語に基づいてドキュメントを正確に検索できます。スカラーフィルタとベクトル類似検索を組み合わせたフィルタ検索に特に便利です。セマンティック検索とは異なり、Text Matchは正確な用語の出現に焦点を当てる。

    +

    MilvusはTantivyを使用して、転置インデックスと用語ベースのテキスト検索をサポートしている。プロセスには以下が含まれる。

    +
      +
    1. アナライザー:入力テキストをトークン化し、処理する。

    2. +
    3. インデックス作成:一意のトークンを文書にマッピングする転置インデックスを作成する。

    4. +
    +

    詳細はテキストマッチを参照。

    diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..7f904305d --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"フィルタテンプレート","href":"Filter-Templating​","type":1,"isActive":false},{"label":"概要","href":"Overview​","type":2,"isActive":false},{"label":"検索オペレーション","href":"Search-Operations​","type":2,"isActive":false},{"label":"クエリ操作","href":"Query-Operations​","type":2,"isActive":false},{"label":"削除操作","href":"Delete-Operations​","type":2,"isActive":false},{"label":"結論","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..95546a9bf --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,149 @@ +--- +id: filtering-templating.md +summary: >- + Milvusでは、多数の要素を含む複雑なフィルタ式、特に日中韓文字のような非ASCII文字を含むフィルタ式は、クエリのパフォーマンスに大きな影響を与える可能性があります。この問題に対処するため、Milvusでは複雑な式の解析にかかる時間を短縮し、効率を向上させることを目的としたフィルタ式のテンプレート化機構を導入しています。このページでは、検索、クエリー、削除操作におけるフィルター式のテンプレート化について説明します。 +title: フィルタリング・テンプレート +--- +

    フィルタテンプレート

    Milvusでは、多数の要素を含む複雑なフィルタ式、特に日中韓文字のような非ASCII文字を含むフィルタ式は、クエリのパフォーマンスに大きな影響を与える可能性があります。この問題に対処するため、Milvusでは複雑な式の解析にかかる時間を短縮し、効率を向上させることを目的としたフィルタ式のテンプレート化機構を導入しています。このページでは、検索、クエリ、削除操作におけるフィルタ式のテンプレート化について説明します。

    +

    概要

    フィルタ式のテンプレート化により、プレースホルダを持つフィルタ式を作成し、クエリ実行中に動的に値を代入することができます。テンプレート化を使用すると、大きな配列や複雑な式を直接フィルタに埋め込む必要がなくなるので、解析時間が短縮され、クエリのパフォーマンスが向上します。

    +

    例えば、agecity という2つのフィールドを含むフィルタ式があり、年齢が25歳以上で、"北京"(北京)か "上海"(上海)のどちらかに住んでいる人をすべて見つけたいとします。フィルター式に値を直接埋め込む代わりに、テンプレートを使うことができます。

    +
    filter = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    ここで、{age}{city} はプレースホルダで、クエリ実行時にfilter_params の実際の値に置き換えられます。

    +

    Milvusでフィルタ式のテンプレート化を使用すると、いくつかの重要な利点があります。

    +
      +
    • 解析時間の短縮: 大きく複雑なフィルタ式をプレースホルダに置き換えることで、フィルタの解析と処理にかかる時間を短縮できます。

    • +
    • クエリパフォーマンスの向上:解析のオーバーヘッドが減ることで、クエリのパフォーマンスが向上し、QPSの向上とレスポンスタイムの短縮につながります。

    • +
    • スケーラビリティ:データセットが大きくなり、フィルター式が複雑になっても、テンプレート化によってパフォーマンスが効率的かつスケーラブルに維持されます。

    • +
    +

    検索オペレーション

    Milvusの検索操作では、filter 式を使用してフィルタリング条件を定義し、filter_params パラメータを使用してプレースホルダの値を指定します。filter_params 辞書には、Milvusがフィルター式に代入するために使用する動的な値が含まれています。

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.search(​
    +    "hello_milvus",​
    +    vectors[:nq],​
    +    filter=expr,​
    +    limit=10,​
    +    output_fields=["age", "city"],​
    +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
    +    filter_params=filter_params,​
    +)​
    +
    +
    +

    この例では、Milvusは検索を実行する際に、{age}25 に、{city}["北京", "上海"] に動的に置き換えます。

    +

    クエリ操作

    Milvusのクエリーオペレーションにも同じテンプレート機構を適用することができます。query 、フィルタ式を定義し、filter_params 、置換する値を指定します。

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.query(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    output_fields=["age", "city"],​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    filter_params を使用することで、Milvusは値の動的挿入を効率的に処理し、クエリの実行速度を向上させます。

    +

    削除操作

    削除操作でもフィルタ式のテンプレート化を使用することができます。検索や問い合わせと同様に、filter 式が条件を定義し、filter_params がプレースホルダの動的値を提供します。

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.delete(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    この方法は、特に複雑なフィルター条件を扱う場合に、削除操作のパフォーマンスを向上させます。

    +

    結論

    フィルタ式のテンプレート化は、Milvusのクエリ性能を最適化するために不可欠なツールです。プレースホルダとfilter_params 辞書を使用することで、複雑なフィルタ式の解析にかかる時間を大幅に短縮することができます。これにより、問い合わせの実行が速くなり、全体的なパフォーマンスが向上します。

    diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..f2319a8da --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"JSONオペレータ","href":"JSON-Operators​","type":1,"isActive":false},{"label":"利用可能なJSON演算子","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"json_contains_all","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"json_cotains_any","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..db5cca07c --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,118 @@ +--- +id: json-operators.md +summary: >- + MilvusはJSONフィールドのクエリやフィルタリングのための高度な演算子をサポートしており、複雑な構造化データの管理に最適です。これらの演算子を使用すると、JSON + ドキュメントを非常に効率的にクエリすることができ、JSON + フィールド内の特定の要素、値、または条件に基づいてエンティティを取得することができます。このセクションでは、MilvusにおけるJSON固有の演算子の使用方法について、実用的な例を示しながら、その機能を説明します。 +title: JSON演算子 +--- +

    JSONオペレータ

    MilvusはJSONフィールドのクエリやフィルタリングのための高度な演算子をサポートしており、複雑な構造化データの管理に最適です。これらの演算子を使用すると、JSON ドキュメントを非常に効率的にクエリすることができ、JSON フィールド内の特定の要素、値、または条件に基づいてエンティティを取得することができます。このセクションでは、MilvusにおけるJSON固有の演算子の使用方法について、実用的な例を示しながら、その機能を説明します。

    +
    +

    JSON フィールドは複雑な入れ子構造を扱うことができず、すべての入れ子構造をプレーンな文字列として扱います。そのため、JSONフィールドを扱う際には、過度に深い入れ子を避け、データ構造を可能な限りフラットにすることが最適なパフォーマンスを実現するために推奨されます。

    +
    +

    利用可能なJSON演算子

    Milvusは、JSONデータのフィルタリングやクエリに役立つ強力なJSON演算子をいくつか提供しています。

    + +

    これらの演算子が実際のシナリオでどのように適用されるか、例を挙げて調べてみましょう。

    +

    JSON_CONTAINS

    json_contains 演算子は、JSON フィールド内に特定の要素またはサブ配列が存在するかどうかをチェックします。JSONの配列やオブジェクトに特定の値が含まれていることを確認したい場合に便利です。

    +

    +

    ["electronics", "sale", "new"] のような文字列の JSON 配列を含むtags フィールドを持つ商品のコレクションがあるとします。タグ"sale" を持つ製品をフィルタリングしたいとします。

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains(tags, "sale")'​
    +
    +
    +

    この例では、Milvusは、tags フィールドが要素"sale" を含むすべての製品を返します。

    +

    json_contains_all

    json_contains_all 演算子は、指定されたJSON式のすべての要素が対象フィールドに存在することを保証します。これは、JSON配列内の複数の値にマッチする必要がある場合に特に便利です。

    +

    +

    商品タグのシナリオを続けると、"electronics""sale""new" のタグを持つすべての商品を検索する場合は、json_contains_all 演算子を使用できます。

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    このクエリは、tags 配列に指定した 3 つの要素すべてが含まれるすべての製品を返します:"electronics","sale", および"new"

    +

    json_cotains_any

    json_contains_any 演算子は、JSON 式の少なくとも 1 つのメンバがフィールド内に存在するエンティティをフィルタリングします。これは、複数の可能な値のいずれかに基づいてエンティティをマッチさせたい場合に便利です。

    +

    +

    "electronics""sale""new" のいずれかのタグを少なくとも1つ持つ製品をフィルタリングしたいとします。これを実現するには、json_contains_any 演算子を使用できます。

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    この場合、Milvusはリスト["electronics", "new", "clearance"] にあるタグのうち少なくとも1つを持つすべての商品を返します。これらのタグを1つしか持たない商品であっても、結果に含まれます。

    diff --git a/localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..6124ff7e9 --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"概要","href":"Overview","type":2,"isActive":false},{"label":"ホーム","href":"Home","type":2,"isActive":false},{"label":"コレクション","href":"Collections","type":2,"isActive":false},{"label":"クエリ","href":"Query","type":2,"isActive":false},{"label":"データ","href":"Data","type":2,"isActive":false},{"label":"タスク","href":"Tasks","type":2,"isActive":false},{"label":"スローリクエスト","href":"Slow-requests","type":2,"isActive":false},{"label":"設定","href":"Configurations","type":2,"isActive":false},{"label":"ツール","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..b2357c0dd --- /dev/null +++ b/localization/v2.5.x/site/ja/userGuide/tools/milvus-webui.md @@ -0,0 +1,279 @@ +--- +id: milvus-webui.md +summary: >- + Milvus Web + UIはMilvusのグラフィカルな管理ツールです。シンプルで直感的なインターフェイスにより、システムの観測性を高めます。以下のことが可能です。 +title: Milvus WebUI +--- +

    Milvus WebUI

    Milvus WebUIはMilvusのグラフィカルな管理ツールです。シンプルで直感的なインターフェースにより、システムの観測性を向上させます。Milvus Web UIを使用することで、Milvusのコンポーネントや依存関係の統計やメトリクスの観察、データベースやコレクションの詳細の確認、Milvusの詳細な設定の一覧表示などを行うことができます。

    +

    概要

    Milvus Web UIは、BirdwatcherやAttuとは異なり、シンプルで直感的なインターフェースでシステム全体の観測性を提供するビルトインツールです。

    +

    以下の表は、Milvus Web UIとBirdwatcher/Attuの機能を比較したものです:

    + + + + + + + + + + + +
    特徴Milvus Web UIバードウォッチャーAttu
    運用形態GUICLIGUI
    対象ユーザー保守者、開発者保守者開発者
    インストール組み込みスタンドアロンツールスタンドアロンツール
    依存関係MilvusMilvus / etcdMilvus
    主な機能実行環境、データベース/コレクションの詳細、セグメント、チャンネル、タスク、スロークエリリクエストメタデータの検査とMilvus APIの実行データベース管理と運用タスク
    +

    Milvus Web UIは以下の機能を提供します:

    +

    + + Milvus Web UI overview + Milvus Web UIの概要

    +
      +
    • ホーム

      +

      現在稼働中のMilvusインスタンス、そのコンポーネント、接続クライアント、依存関係に関する情報を確認することができます。

    • +
    • コレクション

      +

      現在Milvusに登録されているデータベースやコレクションの一覧を表示し、その詳細を確認することができます。

    • +
    • クエリ

      +

      クエリノードおよびクエリコーディネータのセグメント、チャネル、レプリカ、リソースグループの統計情報を確認できます。

    • +
    • データ

      +

      データノードの収集された統計情報をセグメントおよびチャネル単位で確認できます。

    • +
    • タスク

      +

      Querycoordスケジューラタスク、コンパクションタスク、インデックス構築タスク、インポートタスク、データ同期タスクなど、Milvusで実行されているタスクのリストを表示することができます。

    • +
    • スローリクエスト

      +

      Milvusのスローリクエストの一覧を表示します。リクエストタイプ、リクエスト時間、リクエストパラメータが表示されます。

    • +
    • 設定

      +

      Milvusの設定とその値の一覧を表示します。

    • +
    • ツール

      +

      WebUIからpprofとMilvusデータ可視化ツールの2つのビルトインツールにアクセスできます。

    • +
    +

    ホーム

    Home ページでは、以下の情報をご覧いただけます:

    +

    + + Milvus Web UI Home + Milvus Web UI ホーム

    +
      +
    • システム情報配置モード、配置に使用されたイメージ、および関連情報などのシステム情報を表示します。

    • +
    • コンポーネント情報:クエリ ノード、データ ノード、インデックス ノード、コーディネータ、プロキシなど、Milvus のコンポーネントのステータスとメトリックを表示します。

    • +
    • 接続クライアントSDKの種類とバージョン、ユーザー名、アクセス履歴など、接続されているクライアントとその情報を表示します。

    • +
    • システム依存関係:Milvusの依存関係(メタストア、メッセージキュー、オブジェクトストレージ)のステータスとメトリクスを表示します。

    • +
    +

    コレクション

    Collectionsページでは、現在Milvusに登録されているデータベースやコレクションの一覧を表示し、その詳細を確認することができます。

    +

    + + Milvus Web UI Collections + Milvus Web UI コレクション

    +
      +
    • データベース現在Milvusに登録されているデータベースの一覧とその詳細を表示します。

    • +
    • コレクション各データベース内のコレクションの一覧と詳細を表示します。

    • +
    +

    クエリ

    + + Milvus Web UI Query Page + Milvus Web UI クエリページ

    +
      +
    • セグメントセグメントID、対応するコレクション、状態、サイズなど、セグメントのリストとその詳細を表示します。

      +

      From列にはセグメントのソースが表示されます。表示可能なソースは以下のとおりです:

      +
        +
      • QN: クエリ・ノード

      • +
      • CT: クエリコード内の現在のターゲット

      • +
      • NT: クエリコード内の次のターゲット

      • +
      • DIST:QueryCoord内の分布

      • +
    • +
    • チャンネル:チャネル名、対応するコレクションなど、チャネルのリストとその詳細を表示します。

      +

      From列には、セグメントのソースが表示されます。表示可能なソースは以下のとおりです:

      +
        +
      • QN: クエリ・ノード

      • +
      • CT: クエリコード内の現在のターゲット

      • +
      • NT: クエリコード内の次のターゲット

      • +
      • DIST:QueryCoord 内の分布

      • +
    • +
    • レプリカレプリカのリストと、レプリカID、対応するコレクションなどの詳細を表示します。

    • +
    • リソースグループリソースグループのリストとその詳細(リソースグループ名、グループ内のクエリノード数、構成など)を表示します。

    • +
    +

    データ

    + + Milvus Web UI Data Page + Milvus Web UI データページ

    +
      +
    • セグメントデータノード/コーディネーターからのセグメントのリストと、セグメントID、対応するコレクション、状態、サイズなどの詳細を表示します。

    • +
    • チャンネルデータノード/コーディネーターからのチャンネルのリストと、チャンネル名、対応するコレクションなどの詳細を表示します。

    • +
    +

    タスク

    + + Milvus Web UI Tasks Page + Milvus Web UI タスクページ

    +
      +
    • タスクMilvusで実行中のタスクのリストとタスクタイプ、状態、アクションを表示します。

      +
        +
      • QueryCoordタスク過去15分間のバランサー、インデックス、セグメント、チャンネル、リーダーチェッカーを含む全てのQueryCoordスケジューラタスクを表示します。

      • +
      • コンパクションタスク:過去15分間のデータコーディネータからの全てのコンパクションタスクを表示します。

      • +
      • インデックス構築タスク:過去30分間にデータ・コーディネーターが行ったインデックス構築タスクをすべて表示します。

      • +
      • インポート・タスク:過去 30 分間のデータ・コーディネータからのすべてのインポート・タスクを表示します。

      • +
      • データ同期タスク:直近 15 分間のデータ・ノードからのすべてのデータ同期タスクを表示します。

      • +
    • +
    +

    スローリクエスト

    + + Milvus Web UI Slow Requests Page + Milvus Web UIスローリクエストページ

    +
      +
    • スローリクエスト:スローリクエストとは、設定で指定されたproxy.slowQuerySpanInSeconds の値よりも長いレイテンシを持つ検索またはクエリのことです。スローリクエストのリストには、過去15分以内のすべてのスローリクエストが表示されます。
    • +
    +

    設定

    + + Milvus Web UI Configurations Page + Milvus Web UI 設定ページ

    +
      +
    • コンフィギュレーション:Milvusランタイム設定とその値のリストを表示します。
    • +
    +

    ツール

      +
    • pprof: Milvusのプロファイリングとデバッグのためのpprofツールにアクセスします。

    • +
    • Milvusデータ可視化ツール:Milvusのデータを可視化するためのMilvusデータ可視化ツールにアクセスします。

    • +
    diff --git a/localization/v2.5.x/site/ko/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/ko/adminGuide/config_jaeger_tracing.md index 7c4caecdb..7a5000b46 100644 --- a/localization/v2.5.x/site/ko/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/ko/adminGuide/config_jaeger_tracing.md @@ -65,7 +65,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
    -

    2. 예거 배포

    예거 인스턴스를 만드는 가장 간단한 방법은 다음 예제와 같이 YAML 파일을 만드는 것입니다. 이렇게 하면 기본적으로 인메모리 스토리지를 사용하여 단일 포드에 올인원 이미지(예거 에이전트, 예거 수집기, 예거 쿼리 및 예거 UI를 결합)를 배포하는 기본 올인원 전략이 설치됩니다.

    +

    2. 예거 배포

    예거 인스턴스를 만드는 가장 간단한 방법은 다음 예제와 같이 YAML 파일을 만드는 것입니다. 이렇게 하면 기본적으로 인메모리 스토리지를 사용하여 단일 포드에 올인원 이미지(예거 에이전트, 예거 수집기, 예거 쿼리 및 예거 UI를 결합)를 배포하는 기본 AllInOne 전략이 설치됩니다.

    추적을 장기간 저장하려면 프로덕션 전략을 참조하세요.

    apiVersion: jaegertracing.io/v1
     kind: Jaeger
    diff --git a/localization/v2.5.x/site/ko/adminGuide/configure-docker.json b/localization/v2.5.x/site/ko/adminGuide/configure-docker.json
    index 8eb02f8b2..58053d967 100644
    --- a/localization/v2.5.x/site/ko/adminGuide/configure-docker.json
    +++ b/localization/v2.5.x/site/ko/adminGuide/configure-docker.json
    @@ -1 +1 @@
    -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Docker Compose로 Milvus 구성하기","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"구성 파일 다운로드","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"구성 파일 수정하기","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"설치 파일 다운로드","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"설치 파일 수정하기","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Milvus 시작","href":"Start-Milvus","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Docker Compose로 Milvus 구성하기","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"구성 파일 다운로드","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"구성 파일 수정하기","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"설치 파일 다운로드","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"설치 파일 수정하기","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Milvus 시작","href":"Start-Milvus","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ko/adminGuide/configure-docker.md b/localization/v2.5.x/site/ko/adminGuide/configure-docker.md
    index 520a73a36..455162e3c 100644
    --- a/localization/v2.5.x/site/ko/adminGuide/configure-docker.md
    +++ b/localization/v2.5.x/site/ko/adminGuide/configure-docker.md
    @@ -38,8 +38,8 @@ title: Docker Compose로 Milvus 구성하기
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    milvus.yaml 을 직접다운로드하거나 다음 명령을 사용하여다운로드합니다.

    -
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
    +    

    milvus.yaml 을 직접다운로드하거나 다음 명령을 사용하여다운로드합니다.

    +
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
     

    구성 파일 수정하기

    Milvus 스탠드얼론용 설치 파일을 다운로드하고 docker-compose.yml 에 저장합니다.

    +

    Milvus 스탠드얼론용 설치 파일을 다운로드하고 docker-compose.yml 에 저장합니다.

    다음 명령을 간단히 실행할 수도 있습니다.

    # For Milvus standalone
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     

    설치 파일 수정하기

    데이터 보안을 위해 더 이상 사용하지 않는 사용자 및 역할은 삭제하는 것이 좋습니다. 이 가이드에서는 사용자 및 역할을 삭제하는 방법을 소개합니다.

    +

    사용자 삭제하기

    다음 예는 사용자를 삭제하는 방법을 보여줍니다 user_1.

    +
    +

    root 사용자는 삭제할 수 없습니다.

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +# create a user​
    +client.drop_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig​
    +import io.milvus.v2.client.MilvusClientV2​
    +import io.milvus.v2.service.rbac.request.DropUserReq​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +DropUserReq dropUserReq = DropUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +client.dropUser(dropUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.deleteUser({​
    +    username: 'user_1'​
    +})​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    사용자가 삭제되면 기존 사용자를 모두 나열하여 삭제 작업이 성공했는지 확인할 수 있습니다.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.listUsersReq​
    +​
    +List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listUsers()​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    다음은 출력 예시입니다. 목록에 user_1 이 없습니다. 삭제 작업이 성공했습니다.

    +
    ['root']​
    +
    +
    +

    역할 삭제하기

    다음 예는 role_a 역할을 삭제하는 방법을 보여줍니다.

    +
    +

    기본 제공 역할 admin 은 삭제할 수 없습니다.

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.drop_role(role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropRoleReq​
    +​
    +DropRoleReq dropRoleReq = DropRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +client.dropRole(dropRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.dropRole({​
    +   roleName: 'role_a',​
    + })​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    역할이 삭제되면 기존의 모든 역할을 나열하여 삭제 작업이 성공했는지 확인할 수 있습니다.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> resp = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listRoles(​
    +    includeUserInfo: True​
    +)​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    다음은 출력 예시입니다. 목록에 role_a 이 없습니다. 삭제 작업이 성공했습니다.

    +
    ['admin']​
    +
    +
    diff --git a/localization/v2.5.x/site/ko/adminGuide/grant_privileges.json b/localization/v2.5.x/site/ko/adminGuide/grant_privileges.json new file mode 100644 index 000000000..98b84f62d --- /dev/null +++ b/localization/v2.5.x/site/ko/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"역할에 권한 또는 권한 그룹 부여하기","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"역할에 권한 또는 권한 그룹 부여하기","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"역할 설명","href":"Describe-a-role","type":2,"isActive":false},{"label":"역할에서 권한 또는 권한 그룹 해지하기","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/grant_privileges.md b/localization/v2.5.x/site/ko/adminGuide/grant_privileges.md new file mode 100644 index 000000000..119e43788 --- /dev/null +++ b/localization/v2.5.x/site/ko/adminGuide/grant_privileges.md @@ -0,0 +1,540 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: 역할이 만들어지면 해당 역할에 권한을 부여할 수 있습니다. 이 가이드에서는 역할에 권한 또는 권한 그룹을 부여하는 방법을 소개합니다. +title: 역할에 권한 또는 권한 그룹 부여하기 +--- +

    역할에 권한 또는 권한 그룹 부여하기

    역할이 만들어지면 해당 역할에 권한을 부여할 수 있습니다. 이 가이드에서는 역할에 권한 또는 권한 그룹을 부여하는 방법을 소개합니다.

    +

    역할에 권한 또는 권한 그룹 부여하기

    Milvus 2.5에서는 권한 부여 작업을 간소화하는 새로운 버전의 API가 도입되었습니다. 역할에 권한을 부여할 때 더 이상 개체 유형을 조회할 필요가 없습니다. 다음은 매개변수와 해당 설명입니다.

    +
      +
    • role_name: 권한 또는 권한 그룹을 부여해야 하는 대상 역할의 이름입니다.

    • +
    • 리소스: 특정 인스턴스, 데이터베이스 또는 컬렉션이 될 수 있는 권한의 대상 리소스입니다. 다음 표에서는 client.grantV2() 메서드에서 리소스를 지정하는 방법을 설명합니다.

    • +
    +

    레벨

    +

    리소스

    +

    부여 방법

    +

    참고

    +

    컬렉션

    +

    +

    특정 컬렉션

    +

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

    +

    대상 컬렉션의 이름과 대상 컬렉션이 속한 데이터베이스의 이름을 입력합니다.

    +

    +

    특정 데이터베이스 아래의 모든 컬렉션

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

    +

    대상 데이터베이스의 이름과 와일드카드 `*` 를 컬렉션 이름으로 입력합니다.

    +

    **데이터베이스**

    +

    특정 데이터베이스

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

    +

    대상 데이터베이스의 이름과 와일드카드 `*` 를 컬렉션 이름으로 입력합니다.

    +

    +

    현재 인스턴스 아래의 모든 데이터베이스

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

    +

    데이터베이스 이름으로 `*`, 컬렉션 이름으로 `*` 을 입력합니다.

    +

    **인스턴스**

    +

    현재 인스턴스

    +

    client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

    +

    데이터베이스 이름으로 `*`, 컬렉션 이름으로 `*` 을 입력합니다.

    +
    +
      +
    • 권한: 역할에 부여해야 하는 특정 권한 또는 권한 그룹입니다. 현재 Milvus는 부여할 수 있는 56가지 유형의 권한을 제공합니다. 아래 표에는 Milvus의 권한이 나열되어 있습니다.

      +

      +

      아래 표의 유형 열은 권한을 빠르게 조회할 수 있도록 사용자별로 구분한 것으로, 분류 목적으로만 사용됩니다. 권한을 부여할 때 유형을 이해할 필요는 없습니다. 해당 권한을 입력하기만 하면 됩니다.

      +

    • +
    +

    **유형 **

    +

    **권한**

    +

    **설명**

    +

    클라이언트 측의 관련 API 설명****

    +

    데이터베이스 권한

    +

    ListDatabases

    +

    현재 인스턴스의 모든 데이터베이스 보기

    +

    [ListDatabases](https://milvus.io/docs/manage_databases.md)

    +

    DescribeDatabase

    +

    데이터베이스의 세부 정보 보기

    +

    [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

    +

    CreateDatabase

    +

    데이터베이스 생성

    +

    [CreateDatabase](https://milvus.io/docs/manage_databases.md)

    +

    DropDatabase

    +

    데이터베이스 삭제

    +

    [DropDatabase](https://milvus.io/docs/manage_databases.md)

    +

    AlterDatabase

    +

    데이터베이스 속성 수정

    +

    [AlterDatabase](https://milvus.io/docs/manage_databases.md)

    +

    수집 권한

    +

    +

    GetFlushState

    +

    컬렉션 플러시 작업 상태 확인

    +

    [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    GetLoadState

    +

    컬렉션의 로드 상태 확인

    +

    [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    GetLoadingProgress

    +

    컬렉션의 로딩 진행률 확인

    +

    [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

    +

    ShowCollections

    +

    컬렉션 권한이 있는 모든 컬렉션 보기

    +

    [ShowCollections](https://milvus.io/docs/view-collections.md)

    +

    ListAliases

    +

    컬렉션의 모든 별칭 보기

    +

    [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

    +

    컬렉션 설명

    +

    컬렉션의 세부 정보 보기

    +

    [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

    +

    DescribeAlias

    +

    별칭의 세부 정보 보기

    +

    [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

    +

    통계 가져오기

    +

    컬렉션의 통계(예: 컬렉션의 엔티티 수)를 가져옵니다.

    +

    [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

    +

    CreateCollection

    +

    컬렉션을 생성합니다.

    +

    [CreateCollection](https://milvus.io/docs/create-collection.md)

    +

    DropCollection

    +

    컬렉션 삭제

    +

    [DropCollection](https://milvus.io/docs/drop-collection.md)

    +

    Load

    +

    컬렉션 로드

    +

    [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    릴리스

    +

    컬렉션 릴리스

    +

    [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

    +

    Flush

    +

    +

    컬렉션의 모든 엔티티를 봉인된 세그먼트에 유지합니다. 플러시 작업 후에 삽입된 모든 엔티티는 새 세그먼트에 저장됩니다.

    +

    [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    압축

    +

    수동으로 압축 트리거

    +

    [Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

    +

    RenameCollection

    +

    컬렉션 이름 바꾸기

    +

    [컬렉션 이름바꾸기](https://milvus.io/docs/modify-collection.md)

    +

    별칭 만들기

    +

    컬렉션의 별칭 만들기

    +

    [CreateAlias](https://milvus.io/docs/manage-aliases.md)

    +

    DropAlias

    +

    컬렉션의 별칭 삭제

    +

    [DropAlias](https://milvus.io/docs/manage-aliases.md)

    +

    FlushAll

    +

    데이터베이스의 모든 컬렉션을 플러시합니다.

    +

    [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

    +

    파티션 권한

    +

    HasPartition

    +

    파티션 존재 여부 확인

    +

    [HasPartition](https://milvus.io/docs/manage-partitions.md)

    +

    ShowPartitions

    +

    컬렉션의 모든 파티션 보기

    +

    [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

    +

    CreatePartition

    +

    파티션 만들기

    +

    [CreatePartition](https://milvus.io/docs/manage-partitions.md)

    +

    DropPartition

    +

    파티션 삭제

    +

    [DropPartition](https://milvus.io/docs/manage-partitions.md)

    +

    인덱스 권한

    +

    IndexDetail

    +

    인덱스의 세부 정보 보기

    +

    +

    [색인 설명/색인 상태 가져오기/색인 빌드 진행률 가져오기](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    CreateIndex

    +

    인덱스 생성

    +

    [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    DropIndex

    +

    인덱스 삭제

    +

    [DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    리소스 관리 권한

    +

    +

    LoadBalance

    +

    로드 밸런스 달성

    +

    [LoadBalance](https://milvus.io/docs/resource_group.md)

    +

    CreateResourceGroup

    +

    리소스 그룹 생성

    +

    [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

    +

    DropResourceGroup

    +

    리소스 그룹 삭제

    +

    [DropResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    업데이트 리소스 그룹

    +

    리소스 그룹 업데이트

    +

    [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    DescribeResourceGroup

    +

    리소스 그룹의 세부 정보 보기

    +

    [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    리소스 그룹 목록

    +

    현재 인스턴스의 모든 리소스 그룹 보기

    +

    [ListResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    TransferNode

    +

    리소스 그룹 간 노드 전송

    +

    [TransferNode](https://milvus.io/docs/resource_group.md)

    +

    TransferReplica

    +

    리소스 그룹 간 복제본 전송

    +

    [TransferReplica](https://milvus.io/docs/resource_group.md)

    +

    BackupRBAC

    +

    현재 인스턴스에서 모든 RBAC 관련 작업에 대한 백업을 생성합니다.

    +

    BackupRBAC

    +

    RestoreRBAC

    +

    현재 인스턴스의 모든 RBAC 관련 작업의 백업을 복원합니다.

    +

    RestoreRBAC

    +

    엔터티 권한

    +

    +

    쿼리

    +

    쿼리 수행

    +

    [쿼리](https://milvus.io/docs/get-and-scalar-query.md)

    +

    검색

    +

    검색 수행

    +

    [검색](https://milvus.io/docs/single-vector-search.md)

    +

    삽입

    +

    엔티티 삽입

    +

    [삽입](https://milvus.io/docs/insert-update-delete.md)

    +

    삭제

    +

    엔티티 삭제

    +

    [삭제](https://milvus.io/docs/delete-entities.md)

    +

    Upsert

    +

    엔터티 삽입

    +

    [업서트](https://milvus.io/docs/upsert-entities.md)

    +

    가져오기

    +

    엔티티 대량 삽입 또는 가져오기

    +

    [대량 삽입/가져오기](https://milvus.io/docs/import-data.md)

    +

    RBAC 권한

    +

    소유권 만들기

    +

    사용자 또는 역할 만들기

    +

    [사용자 만들기/역할 만들기](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    UpdateUser

    +

    사용자의 비밀번호 업데이트

    +

    [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    DropOwnership

    +

    사용자 비밀번호 또는 역할 삭제

    +

    [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

    +

    SelectOwnership

    +

    특정 역할이 부여된 모든 사용자 보기

    +

    [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    소유권 관리

    +

    사용자 또는 역할을 관리하거나 사용자에게 역할을 부여합니다.

    +

    [사용자 역할 운영/권한 운영/권한 운영V2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    사용자 선택

    +

    사용자에게 부여된 모든 역할 보기

    +

    [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    권한 그룹 만들기

    +

    권한 그룹 만들기

    +

    [CreatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    DropPrivilegeGroup

    +

    권한 그룹 삭제

    +

    [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    ListPrivilegeGroups

    +

    현재 인스턴스의 모든 권한 그룹 보기

    +

    [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    권한 그룹 운영

    +

    권한 그룹에 권한을 추가하거나 권한 그룹에서 권한을 제거합니다.

    +

    [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +
    +

    다음 예는 기본 데이터베이스 아래의 collection_01privilege_group_1 라는 권한 그룹과 role_a 역할에 PrivilegeSearch 권한을 부여하는 방법을 보여줍니다.

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +const address = "http://localhost:19530";
    +const token = "root:Milvus";
    +const client = new MilvusClient({address, token});
    +
    +await milvusClient.grantPrivilege({
    +   roleName: 'role_a',
    +   object: 'Collection', 
    +   objectName: 'collection_01',
    +   privilegeName: 'Search'
    + });
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "privilege_group_1",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    +

    역할 설명

    다음 예제는 describe_role 메서드를 사용하여 role_a 역할에 부여된 권한을 보는 방법을 보여줍니다.

    + +
    from pymilvus import MilvusClient
    +
    +client.describe_role(role_name="role_a")
    +
    +
    import io.milvus.v2.service.rbac.response.DescribeRoleResp;
    +import io.milvus.v2.service.rbac.request.DescribeRoleReq
    +
    +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
    +        .roleName("role_a")
    +        .build();
    +DescribeRoleResp resp = client.describeRole(describeRoleReq);
    +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.ListRoles(context.Background())
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +await milvusClient.describeRole({roleName: 'role_a'});
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a"
    +}'
    +
    +

    아래는 출력 예시입니다.

    +
    {
    +     "role": "role_a",
    +     "privileges": [
    +         {
    +             "collection_name": "collection_01",
    +             "db_name": "default",
    +             "role_name": "role_a",
    +             "privilege": "Search",
    +             "grantor_name": "root"
    +         },
    +         "privilege_group_1"
    +     ]
    +}
    +
    +

    역할에서 권한 또는 권한 그룹 해지하기

    다음은 기본 데이터베이스 아래의 collection_01 에 대한 PrivilegeSearch 권한과 역할 role_a 에 부여된 privilege_group_1 권한 그룹을 해지하는 예제입니다.

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    diff --git a/localization/v2.5.x/site/ko/adminGuide/grant_roles.json b/localization/v2.5.x/site/ko/adminGuide/grant_roles.json new file mode 100644 index 000000000..3f9ef6b53 --- /dev/null +++ b/localization/v2.5.x/site/ko/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"사용자에게 역할 부여하기","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"사용자에게 역할 부여하기","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"사용자 설명","href":"Describe-user​","type":2,"isActive":false},{"label":"역할 해지하기","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/grant_roles.md b/localization/v2.5.x/site/ko/adminGuide/grant_roles.md new file mode 100644 index 000000000..e50769b78 --- /dev/null +++ b/localization/v2.5.x/site/ko/adminGuide/grant_roles.md @@ -0,0 +1,202 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + 역할을 만들고 역할에 권한을 부여한 후에는 사용자에게 역할을 부여하여 사용자가 리소스에 액세스하고 역할에 정의된 작업을 수행할 수 있도록 할 + 수 있습니다. 한 사용자에게 여러 역할을 부여하거나 여러 사용자에게 역할을 부여할 수 있습니다. 이 가이드에서는 사용자에게 역할을 부여하는 + 방법을 소개합니다. +title: 사용자에게 역할 부여하기 +--- +

    사용자에게 역할 부여하기

    역할을 만들고 역할에 권한을 부여한 후에는 사용자에게 역할을 부여하여 사용자가 리소스에 액세스하고 역할에 정의된 작업을 수행할 수 있도록 할 수 있습니다. 한 사용자에게 여러 개의 역할을 부여하거나 여러 사용자에게 역할을 부여할 수 있습니다. 이 가이드에서는 사용자에게 역할을 부여하는 방법을 소개합니다.

    +

    Milvus의 기본 제공 사용자 root 에게는 이미 모든 권한이 있는 admin 역할이 부여되어 있습니다. 다른 역할을 할당할 필요가 없습니다.

    +

    사용자에게 역할 부여하기

    다음 예는 user_1 사용자에게 role_a 역할을 부여하는 방법을 보여줍니다.

    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.grant_role(user_name="user_1", role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
    +​
    +String CLUSTER_ENDPOINT = "http://localhost:19530";​
    +String TOKEN = "root:Milvus";​
    +​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +    .uri(CLUSTER_ENDPOINT)​
    +    .token(TOKEN)​
    +    .build();​
    +    ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
    +        .roleName("role_a")​
    +        .userName("user_1")​
    +        .build();​
    +client.grantRole(grantRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.grantRole({​
    +   username: 'user_1',​
    +   roleName: 'role_a'​
    + })​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a",​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    사용자 설명

    사용자에게 역할을 부여한 후에는 describe_user() 메서드를 통해 부여 작업이 성공했는지 확인할 수 있습니다.

    +

    다음 예는 사용자의 역할을 확인하는 방법을 보여줍니다 user_1.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.describe_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DescribeUserReq;​
    +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
    +​
    +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.describeUser({username: 'user_1'})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    아래는 출력 예시입니다.

    +
    {'user_name': 'user_1', 'roles': 'role_a'}​
    +
    +
    +

    역할 해지하기

    사용자에게 할당된 역할을 해지할 수도 있습니다.

    +

    다음 예는 사용자에게 할당된 role_a 역할을 해지하는 방법을 보여줍니다. user_1.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.revoke_role(​
    +    user_name='user_1',​
    +    role_name='role_a'​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
    +​
    +client.revokeRole(RevokeRoleReq.builder()​
    +        .userName("user_1")​
    +        .roleName("role_a")​
    +        .build());​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/ko/adminGuide/privilege_group.json b/localization/v2.5.x/site/ko/adminGuide/privilege_group.json new file mode 100644 index 000000000..6a7d71d1b --- /dev/null +++ b/localization/v2.5.x/site/ko/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"권한 그룹 만들기","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"권한 그룹과 권한 비교","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"기본 제공 권한 그룹","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"절차","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/privilege_group.md b/localization/v2.5.x/site/ko/adminGuide/privilege_group.md new file mode 100644 index 000000000..035a649e2 --- /dev/null +++ b/localization/v2.5.x/site/ko/adminGuide/privilege_group.md @@ -0,0 +1,489 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: 권한을 부여하는 프로세스를 간소화하려면 여러 권한을 하나의 권한 그룹으로 결합하는 것이 좋습니다. +title: 권한 그룹 만들기 +--- +

    권한 그룹 만들기

    권한을 부여하는 프로세스를 간소화하려면 여러 권한을 하나의 권한 그룹으로 결합하는 것이 좋습니다.

    +

    권한 그룹과 권한 비교

    권한 그룹은 여러 권한으로 구성됩니다.

    +

    + + Privilege group illustrated + 권한 그룹 예시

    +

    위 그림과 같이 한 역할에 세 가지 다른 권한을 부여해야 한다고 가정해 보겠습니다.

    +
      +
    • 권한 그룹을 사용하지 않는 경우에는 권한을 세 번 부여해야 합니다.

    • +
    • 권한 그룹을 사용하는 경우에는 권한 그룹을 만든 다음 이 권한 그룹에 세 가지 권한을 추가하고 역할 A에 권한 그룹을 부여하기만 하면 됩니다.

    • +
    +

    권한 그룹을 사용하면 한 역할에 여러 권한을 일괄적으로 부여할 수 있습니다.

    +

    기본 제공 권한 그룹

    Milvus는 사용 편의성을 위해 컬렉션, 데이터베이스, 인스턴스 수준에서 총 9개의 기본 제공 권한을 제공합니다: COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW 및 Cluster_Admin입니다.

    +
    +

    기본 제공 권한 그룹의 세 가지 수준은 계단식 관계가 없습니다. 인스턴스 수준에서 권한 그룹을 설정한다고 해서 해당 인스턴스 아래의 모든 데이터베이스 및 컬렉션에 대한 권한이 자동으로 설정되는 것은 아닙니다. 데이터베이스 및 컬렉션 수준에서의 권한은 수동으로 설정해야 합니다.

    +
    +

    다음 표에서는 각 기본 제공 권한 그룹에 포함된 권한에 대해 설명합니다.

    +

    컬렉션 수준

      +
    • COLL_RO: 컬렉션 데이터를 읽을 수 있는 권한이 포함됩니다.

    • +
    • COLL_RW: 컬렉션 데이터를 읽고 쓸 수 있는 권한 포함

    • +
    • COLL_ADMIN: 컬렉션 데이터를 읽고 쓸 수 있는 권한과 컬렉션을 관리할 수 있는 권한이 포함됩니다.

    • +
    +

    아래 표에는 컬렉션 수준에서 세 가지 기본 제공 권한 그룹에 포함된 특정 권한이 나열되어 있습니다.

    +

    **권한**

    +

    **컬렉션 읽기 전용**

    +

    컬렉션읽기** **컬렉션쓰기**

    +

    **CollectionAdmin**

    +

    쿼리

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    검색

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    IndexDetail

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetFlushState

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetLoadState

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetLoadingProgress

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    HasPartition

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    ShowPartitions

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    ListAliases

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    DescribeCollection

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    DescribeAlias

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetStatistics

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    CreateIndex

    +

    +

    ✔️

    +

    ✔️

    +

    DropIndex

    +

    +

    ✔️

    +

    ✔️

    +

    CreatePartition

    +

    +

    ✔️

    +

    ✔️

    +

    DropPartition

    +

    +

    ✔️

    +

    ✔️

    +

    Load

    +

    +

    ✔️

    +

    ✔️

    +

    릴리스

    +

    +

    ✔️

    +

    ✔️

    +

    Insert

    +

    +

    ✔️

    +

    ✔️

    +

    삭제

    +

    +

    ✔️

    +

    ✔️

    +

    Upsert

    +

    +

    ✔️

    +

    ✔️

    +

    Import

    +

    +

    ✔️

    +

    ✔️

    +

    Flush

    +

    +

    ✔️

    +

    ✔️

    +

    Compaction

    +

    +

    ✔️

    +

    ✔️

    +

    LoadBalance

    +

    +

    ✔️

    +

    ✔️

    +

    CreateAlias

    +

    +

    +

    ✔️

    +

    DropAlias

    +

    +

    +

    ✔️

    +
    +

    데이터베이스 수준

      +
    • DB_RO: 데이터베이스 데이터를 읽을 수 있는 권한 포함

    • +
    • DB_RW: 데이터베이스 데이터를 읽고 쓸 수 있는 권한을 포함합니다.

    • +
    • DB_Admin: 데이터베이스 데이터를 읽고 쓸 수 있는 권한과 데이터베이스를 관리할 수 있는 권한을 포함합니다.

    • +
    +

    아래 표에는 데이터베이스 수준에서 세 가지 기본 제공 권한 그룹에 포함된 특정 권한이 나열되어 있습니다.

    +

    **권한**

    +

    **데이터베이스 읽기 전용**

    +

    **데이터베이스 읽기/쓰기**

    +

    **DatabaseAdmin**

    +

    ShowCollections

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    DescribeDatabase

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    CreateCollection

    +

    +

    +

    ✔️

    +

    DropCollection

    +

    +

    +

    ✔️

    +

    AlterDatabase

    +

    +

    ✔️

    +

    ✔️

    +
    +

    클러스터 수준

      +
    • Cluster_RO: 인스턴스 데이터를 읽을 수 있는 권한 포함

    • +
    • Cluster_RW: 인스턴스 데이터를 읽고 쓸 수 있는 권한을 포함합니다.

    • +
    • Cluster_Admin: 인스턴스 데이터 읽기 및 쓰기 권한과 인스턴스 관리 권한이 포함됩니다.

    • +
    +

    아래 표에는 인스턴스 수준에서 세 가지 기본 제공 권한 그룹에 포함된 특정 권한이 나열되어 있습니다.

    +

    **권한**

    +

    **클러스터 읽기 전용**

    +

    **클러스터 읽기/쓰기**

    +

    **ClusterAdmin**

    +

    ListDatabases

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    RenameCollection

    +

    +

    +

    ✔️

    +

    CreateOwnership

    +

    +

    +

    ✔️

    +

    UpdateUser

    +

    +

    +

    ✔️

    +

    DropOwnership

    +

    +

    +

    ✔️

    +

    SelectOwnership

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    ManageOwnership

    +

    +

    +

    ✔️

    +

    SelectUser

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    BackupRBAC

    +

    +

    +

    ✔️

    +

    RestoreRBAC

    +

    +

    +

    ✔️

    +

    CreateResourceGroup

    +

    +

    +

    ✔️

    +

    DropResourceGroup

    +

    +

    +

    ✔️

    +

    업데이트 리소스 그룹

    +

    +

    ✔️

    +

    ✔️

    +

    DescribeResourceGroup

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    리소스 그룹 나열

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    TransferNode

    +

    +

    ✔️

    +

    ✔️

    +

    TransferReplica

    +

    +

    ✔️

    +

    ✔️

    +

    CreateDatabase

    +

    +

    +

    ✔️

    +

    DropDatabase

    +

    +

    +

    ✔️

    +

    FlushAll

    +

    +

    ✔️

    +

    ✔️

    +

    CreatePrivilegeGroup

    +

    +

    +

    ✔️

    +

    DropPrivilegeGroup

    +

    +

    +

    ✔️

    +

    ListPrivilegeGroups

    +

    +

    +

    ✔️

    +

    OperatePrivilegeGroup

    +

    +

    +

    ✔️

    +
    +

    절차

    권한 그룹을 만든 다음 권한 그룹에 권한을 추가할 수 있습니다.

    +

    권한 그룹 만들기

    다음 예에서는 privilege_group_1 라는 이름의 권한 그룹을 만드는 방법을 보여 줍니다.

    + +
    from pymilvus import MilvusClient​
    +client.create_privileg_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
    +​
    +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    +

    권한 그룹에 권한 추가하기

    다음 예에서는 방금 만든 권한 그룹 privilege_group_1PrivilegeBackupRBACPrivilegeRestoreRBAC 권한을 추가하는 방법을 보여 줍니다.

    + +
    from pymilvus import MilvusClient​
    +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
    +​
    +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Arrays.asList("Query", "Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Query", "Search"]​
    +}'​
    +
    +
    +

    권한 그룹에서 권한 제거하기

    다음은 권한 그룹 privilege_group_1 에서 PrivilegeRestoreRBAC 권한을 제거하는 방법을 보여 줍니다.

    + +
    from pymilvus import MilvusClient​
    +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
    +​
    +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Collections.singletonList("Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Search"]​
    +}'​
    +
    +
    +

    권한 그룹 나열하기

    다음은 기존의 모든 권한 그룹을 나열하는 방법을 보여주는 예제입니다.

    + +
    from pymilvus import MilvusClient​
    +client.list_privilege_groups()​
    +
    +
    +
    import io.milvus.v2.service.rbac.PrivilegeGroup;​
    +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
    +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
    +​
    +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
    +        .build());​
    +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.ListPrivilegeGroups(context.Background())​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    아래는 출력 예시입니다.

    +
    PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
    +
    +
    +

    권한 그룹 삭제하기

    다음은 권한 그룹을 삭제하는 방법을 설명하는 예제입니다. privilege_group_1.

    + +
    from pymilvus import MilvusClient​
    +client.drop_privilege_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
    +​
    +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/ko/adminGuide/rbac.json b/localization/v2.5.x/site/ko/adminGuide/rbac.json index f3864118e..755d0d630 100644 --- a/localization/v2.5.x/site/ko/adminGuide/rbac.json +++ b/localization/v2.5.x/site/ko/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"RBAC 활성화","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Milvus 클라이언트를 시작하여 연결 설정하기","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. 사용자 만들기","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. 역할 만들기","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. 역할에 권한 부여하기","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. 사용자에게 역할 부여하기","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. 권한 취소하기","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBAC 설명","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"RBAC 주요 개념","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"절차","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/rbac.md b/localization/v2.5.x/site/ko/adminGuide/rbac.md index 23d5ff5ba..e96c0c1b3 100644 --- a/localization/v2.5.x/site/ko/adminGuide/rbac.md +++ b/localization/v2.5.x/site/ko/adminGuide/rbac.md @@ -1,10 +1,12 @@ --- id: rbac.md related_key: enable RBAC -summary: '사용자, 역할 및 권한을 관리하는 방법을 알아보세요.' -title: RBAC 활성화 +summary: >- + RBAC(역할 기반 액세스 제어)는 역할에 기반한 액세스 제어 방식입니다. RBAC를 사용하면 사용자가 수행할 수 있는 작업을 컬렉션, + 데이터베이스, 인스턴스 수준에서 세밀하게 제어하여 데이터 보안을 강화할 수 있습니다. +title: RBAC 설명 --- -

    RBAC 활성화

    RBAC를 활성화하면 특정 Milvus 리소스(예: 컬렉션 또는 파티션)에 대한 액세스 또는 사용자 역할 및 권한에 따른 권한을 제어할 수 있습니다. 현재 이 기능은 Python과 Java에서만 사용할 수 있습니다.

    -

    이 주제에서는 RBAC를 활성화하고 사용자 및 역할을 관리하는 방법에 대해 설명합니다.

    -
    -

    이 페이지의 코드 스니펫은 새로운 MilvusClient (Python)를 사용하여 Milvus와 상호 작용합니다. 다른 언어에 대한 새로운 MilvusClient SDK는 향후 업데이트를 통해 출시될 예정입니다.

    -
    -

    1. Milvus 클라이언트를 시작하여 연결 설정하기

    RBAC(역할 기반 액세스 제어)는 역할에 기반한 액세스 제어 방식입니다. RBAC를 사용하면 사용자가 수행할 수 있는 작업을 컬렉션, 데이터베이스, 인스턴스 수준에서 세밀하게 제어하여 데이터 보안을 강화할 수 있습니다.

    +

    기존의 사용자 접근 제어 모델과 달리 RBAC는 역할이라는 개념을 도입합니다. RBAC 모델에서는 역할에 권한을 부여한 다음 사용자에게 해당 역할을 부여합니다. 그러면 사용자는 권한을 얻을 수 있습니다.

    +

    RBAC 모델은 액세스 제어 관리의 효율성을 향상시킬 수 있습니다. 예를 들어 여러 사용자에게 동일한 권한 집합이 필요한 경우 각 사용자에 대한 권한을 수동으로 설정할 필요가 없습니다. 대신 역할을 만들어 사용자에게 역할을 할당하면 됩니다. 이러한 사용자의 권한을 조정하려는 경우 역할 권한을 조정하기만 하면 이 역할이 있는 모든 사용자에게 수정 사항이 적용됩니다.

    +

    RBAC 주요 개념

    사용자 인증을 활성화한 후 사용자 이름과 비밀번호로 구성된 token 을 사용하여 Milvus 인스턴스에 연결합니다. 기본적으로 Milvus는 root 사용자와 비밀번호 Milvus 를 사용합니다.

    -
    from pymilvus import MilvusClient
    -
    -client = MilvusClient(
    -    uri='http://localhost:19530', # replace with your own Milvus server address
    -    token='root:Milvus' # replace with your own Milvus server token
    -)
    -
    -

    2. 사용자 만들기

    user_1 라는 이름의 사용자와 P@ssw0rd 이라는 비밀번호를 생성합니다:

    -
    client.create_user(
    -    user_name='user_1',
    -    password='P@ssw0rd'
    -)
    -
    -

    사용자를 생성한 후 다음을 수행할 수 있습니다:

    -
      -
    • 사용자 비밀번호를 업데이트합니다. 기존 비밀번호와 새 비밀번호를 모두 입력해야 합니다.
    • -
    -
    client.update_password(
    -    user_name='user_1',
    -    old_password='P@ssw0rd',
    -    new_password='P@ssw0rd123'
    -)
    -
    -
      -
    • 모든 사용자를 나열합니다.
    • -
    -
    client.list_users()
    -
    -# output:
    -# ['root', 'user_1']
    -
    -
      -
    • 특정 사용자의 역할을 확인합니다.
    • -
    -
    client.describe_user(user_name='user_1')
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ()}
    -
    -

    3. 역할 만들기

    다음 예에서는 roleA 라는 이름의 역할을 만듭니다.

    -
    client.create_role(
    -    role_name="roleA",
    -)
    -
    -

    역할을 만든 후에는 다음과 같이 할 수 있습니다:

    +

    + + Users, roles, and privileges + 사용자, 역할 및 권한

    +

    RBAC 모델에는 네 가지 주요 구성 요소가 있습니다.

      -
    • 모든 역할을 나열합니다.
    • +
    • **리소스: 리소스: **액세스할 수 있는 리소스 엔티티입니다. Milvus에는 인스턴스, 데이터베이스, 컬렉션의 세 가지 리소스 레벨이 있습니다.

    • +
    • **권한: **Milvus 리소스에서 특정 작업(예: 컬렉션 생성, 데이터 삽입 등)을 수행할 수 있는 권한입니다.

    • +
    • **권한 그룹: **권한 그룹: **여러 권한의 그룹.

    • +
    • **역할: **역할은 권한과 리소스의 두 부분으로 구성됩니다. 권한은 역할이 수행할 수 있는 작업의 유형을 정의하고, 리소스는 작업을 수행할 수 있는 대상 리소스를 정의합니다. 예를 들어 데이터베이스 관리자 역할은 특정 데이터베이스에 대해 읽기, 쓰기 및 관리 작업을 수행할 수 있습니다.

    • +
    • **사용자: **사용자는 Milvus를 사용하는 사람입니다. 각 사용자는 고유 ID를 가지며 하나 또는 여러 개의 역할이 부여됩니다.

    -
    client.list_roles()
    -
    -# output:
    -# ['admin', 'public', 'roleA']
    -
    -

    4. 역할에 권한 부여하기

    다음 예는 roleA 라는 역할에 모든 컬렉션을 검색할 수 있는 권한을 부여하는 방법을 보여줍니다.

    -

    object_type 은 리소스 유형으로도 이해할 수 있는 객체 유형을 지정합니다. 현재 유효한 값으로는 컬렉션/사용자/글로벌 등이 있으며, 여기서 글로벌은 특정 리소스 유형이 없음을 의미합니다. object_name 은 리소스 이름입니다. 객체 유형이Collection인 경우 객체 이름은 특정 컬렉션 이름을 참조하거나 *를 사용하여 모든 컬렉션을 지정할 수 있습니다.개체유형이Global인 경우에는 개체 이름을 *로만 지정할 수 있습니다. 부여할 수 있는 다른 유형의 권한은 사용자 및 역할을 참조하세요.

    -

    역할 권한을 관리하기 전에 사용자 인증을 사용 설정했는지 확인하세요. 그렇지 않으면 오류가 발생할 수 있습니다. 사용자 인증을 사용 설정하는 방법에 대한 자세한 내용은 사용자 액세스 인증하기를 참조하세요.

    -
    # grant privilege to a role
    -
    -client.grant_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -

    역할에 권한을 부여한 후에는 다음과 같이 할 수 있습니다:

    -
      -
    • 역할에 부여된 권한을 봅니다.
    • -
    -
    client.describe_role(
    -    role_name='roleA'
    -)
    -
    -# output:
    -# {'role': 'roleA',
    -#  'privileges': [{'object_type': 'User',
    -#    'object_name': 'user_1',
    -#    'db_name': 'default',
    -#    'role_name': 'roleA',
    -#    'privilege': 'SelectUser',
    -#    'grantor_name': 'root'}]}
    -
    -

    5. 사용자에게 역할 부여하기

    사용자에게 역할을 부여하여 이 사용자가 역할의 모든 권한을 상속받을 수 있도록 합니다.

    -
    # grant a role to a user
    -
    -client.grant_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -

    역할을 부여한 후 역할이 부여되었는지 확인합니다:

    -
    client.describe_user(
    -    user_name='user_1'
    -)
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ('roleA')}
    -
    -

    6. 권한 취소하기

    -

    다음 작업은 되돌릴 수 없으므로 수행할 때 주의하세요.

    -
    -
      -
    • 역할에서 권한 제거하기. 역할에 부여되지 않은 권한을 취소하면 오류가 발생합니다.
    • -
    -
    client.revoke_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -
      -
    • 역할에서 사용자를 제거합니다. 사용자에게 부여되지 않은 역할을 취소하면 오류가 발생합니다.
    • -
    -
    client.revoke_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -
      -
    • 역할을 삭제합니다.
    • -
    -
    client.drop_role(role_name='roleA')
    -
    -
      -
    • 사용자를 삭제합니다.
    • -
    -
    client.drop_user(user_name='user_1')
    -
    -

    다음 단계

    +

    RBAC를 통해 액세스 제어를 달성하려면 아래 단계를 따라야 합니다.

    +
      +
    1. 사용자를 만듭니다: Milvus의 기본 사용자 root 외에도 새 사용자를 만들고 데이터 보안을 보호하기 위해 비밀번호를 설정할 수 있습니다.

    2. +
    3. 역할 만들기: 필요에 따라 사용자 지정 역할을 만들 수 있습니다. 역할의 구체적인 기능은 해당 권한에 따라 결정됩니다.

    4. +
    5. 권한 그룹을 만듭니다: 여러 권한을 하나의 권한 그룹으로 결합하여 역할에 권한을 부여하는 프로세스를 간소화할 수 있습니다.

    6. +
    7. 역할에 권한 또는 권한 그룹을 부여합니다: 역할의 기능을 정의하여 이 역할에 권한 또는 권한 그룹을 부여할 수 있도록 합니다.

    8. +
    9. 사용자에게 역할 부여하기: 사용자에게 특정 권한이 있는 역할을 부여하여 사용자가 역할의 권한을 가질 수 있도록 합니다. 하나의 역할을 여러 사용자에게 부여할 수 있습니다.

    10. +
    diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.json index 48a8ad5ec..8e023426a 100644 --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"도커 컴포즈로 밀버스 클러스터 업그레이드하기","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드하기","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"도커 컴포즈로 밀버스 클러스터 업그레이드하기","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드하기","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.md index 5f164b9ba..d1b051799 100644 --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-docker.md @@ -19,8 +19,8 @@ title: 도커 컴포즈로 밀버스 클러스터 업그레이드하기 d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    이 항목에서는 도커 컴포즈를 사용하여 Milvus를 업그레이드하는 방법을 설명합니다.

    -

    일반적인 경우, 이미지를 변경하여 Milvus를 업그레이드할 수 있습니다. 그러나 v2.1.x에서 v2.5.0-beta로 업그레이드하기 전에 메타데이터를 마이그레이션해야 합니다.

    +

    이 항목은 도커 컴포즈를 사용하여 Milvus를 업그레이드하는 방법을 설명합니다.

    +

    일반적인 경우, 이미지를 변경하여 Milvus를 업그레이드할 수 있습니다. 그러나 v2.1.x에서 v2.5.0으로 업그레이드하기 전에 메타데이터를 마이그레이션해야 합니다.

    이미지를 변경하여 Milvus 업그레이드하기

    일반적인 경우 다음과 같이 Milvus를 업그레이드할 수 있습니다:

    1. docker-compose.yaml 에서 Milvus 이미지 태그를 변경합니다.

      -

      프록시, 모든 코디네이터, 모든 워커 노드의 이미지 태그를 변경해야 한다는 점에 유의하세요.

      +

      프록시, 모든 코디네이터, 모든 워커 노드에 대한 이미지 태그를 변경해야 한다는 점에 유의하세요.

      ...
       rootcoord:
         container_name: milvus-rootcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       proxy:
         container_name: milvus-proxy
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       querycoord:
         container_name: milvus-querycoord
      -  image: milvusdb/milvus:v2.5.0-beta  
      +  image: milvusdb/milvus:v2.5.0  
       ...
       querynode:
         container_name: milvus-querynode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexcoord:
         container_name: milvus-indexcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexnode:
         container_name: milvus-indexnode
      -  image: milvusdb/milvus:v2.5.0-beta 
      +  image: milvusdb/milvus:v2.5.0 
       ...
       datacoord:
         container_name: milvus-datacoord
      -  image: milvusdb/milvus:v2.5.0-beta   
      +  image: milvusdb/milvus:v2.5.0   
       ...
       datanode:
         container_name: milvus-datanode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       
    2. 다음 명령을 실행하여 업그레이드를 수행합니다.

      docker compose down
      @@ -105,7 +105,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.json
      index dc18240fc..01c1ae5ae 100644
      --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.json
      +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"헬름 차트로 Milvus 클러스터 업그레이드하기","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"밀버스 헬름 차트 확인","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"헬름을 사용하여 밀버스 업그레이드","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"헬름 차트로 Milvus 클러스터 업그레이드하기","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"밀버스 헬름 차트 확인","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"헬름을 사용하여 밀버스 업그레이드","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.md
      index 5401a2f30..81ff10867 100644
      --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.md
      +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      Milvus의 업그레이드 경로는 다음과 같이 선택할 수 있습니다:

      -
      - 밀버스 v2.2.3 이상 릴리스에서 v2.5.0-beta로 [롤링 업그레이드 수행](#conduct-a-rolling-upgrade).
      +
      - 밀버스 v2.2.3 이상 릴리스에서 v2.5.0으로 [롤링 업그레이드 수행](#conduct-a-rolling-upgrade).

      롤링 업그레이드 수행

      @@ -259,7 +259,7 @@ my-release-pulsar-zookeeper-2

    2. Milvus를 v2.1.x에서 2.2.0으로 업그레이드합니다.

    다음 명령은 Milvus를 v2.1.4에서 2.2.0으로 업그레이드한다고 가정합니다. 필요에 맞는 버전으로 변경하세요.

      -
    1. 밀버스 인스턴스 이름, 소스 밀버스 버전, 대상 밀버스 버전을 지정합니다.

      +
    2. Milvus 인스턴스 이름, 소스 Milvus 버전, 대상 Milvus 버전을 지정합니다.

      ./migrate.sh -i my-release -s 2.1.4 -t 2.2.0
       
    3. Milvus가 기본 K8s 네임스페이스에 설치되지 않은 경우 -n 로 네임스페이스를 지정합니다.

      diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.json index d84e87654..8aa7581eb 100644 --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"밀버스 오퍼레이터로 밀버스 클러스터 업그레이드하기","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvus 오퍼레이터 업그레이드","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"밀버스 오퍼레이터로 밀버스 클러스터 업그레이드하기","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvus 오퍼레이터 업그레이드","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.md index bccadfd8e..8a450b47e 100644 --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

    Milvus 운영자를 최신 버전으로 업그레이드한 후에는 다음과 같은 옵션을 선택할 수 있습니다:

    롤링 업그레이드 수행

    위의 구성 파일에서 spec.components.enableRollingUpdatetrue 으로 설정하고 spec.components.image 을 원하는 Milvus 버전으로 설정합니다.

    기본적으로 Milvus는 코디네이터에 대한 롤링 업그레이드를 수행하여 코디네이터 포드 이미지를 차례로 교체하는 순서대로 진행합니다. 업그레이드 시간을 줄이려면 spec.components.imageUpdateModeall 으로 설정하여 Milvus가 모든 포드 이미지를 동시에 교체하도록 하세요.

    @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

    spec.components.imageUpdateModerollingDowngrade 으로 설정하여 Milvus가 코디네이터 파드 이미지를 하위 버전으로 대체하도록 할 수 있습니다.

    apiVersion: milvus.io/v1beta1
    @@ -128,7 +128,7 @@ metadata:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    그런 다음 다음을 실행하여 업그레이드를 수행합니다:

    kubectl patch -f milvusupgrade.yaml
    @@ -148,8 +148,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Milvus 2.2.0부터는 메타데이터가 이전 릴리즈의 메타데이터와 호환되지 않습니다. 다음 예제 코드 조각은 Milvus 2.1.4에서 Milvus 2.5.0-beta로 업그레이드하는 경우를 가정합니다.

    -

    1. 메타데이터 마이그레이션을 위한 .yaml 파일 만들기

    메타데이터 마이그레이션 파일을 만듭니다. 다음은 예시입니다. 설정 파일에 name, sourceVersion, targetVersion 을 지정해야 합니다. 다음 예에서는 namemy-release-upgrade 으로 , sourceVersionv2.1.4 으로 , targetVersionv2.5.0-beta 으로 설정합니다. 즉, Milvus 클러스터가 v2.1.4에서 v2.5.0-beta로 업그레이드됩니다.

    +

    Milvus 2.2.0부터는 메타데이터가 이전 릴리즈의 메타데이터와 호환되지 않습니다. 다음 예제 코드 조각은 Milvus 2.1.4에서 Milvus 2.5.0으로 업그레이드하는 경우를 가정합니다.

    +

    1. 메타데이터 마이그레이션을 위한 .yaml 파일 만들기

    메타데이터 마이그레이션 파일을 만듭니다. 다음은 예시입니다. 설정 파일에 name, sourceVersion, targetVersion 을 지정해야 합니다. 다음 예에서는 namemy-release-upgrade 으로 , sourceVersionv2.1.4 으로 , targetVersionv2.5.0 으로 설정합니다. 즉, Milvus 클러스터가 v2.1.4에서 v2.5.0으로 업그레이드됩니다.

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -159,9 +159,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.json
    index 107141b1f..0eb788e52 100644
    --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.json
    +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.json
    @@ -1 +1 @@
    -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Docker Compose로 Milvus 독립형 업그레이드하기","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Docker Compose로 Milvus 독립형 업그레이드하기","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.md
    index f65ba4376..0e3e1f610 100644
    --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.md
    +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-docker.md
    @@ -24,7 +24,7 @@ title: Docker Compose로 Milvus 독립형 업그레이드하기
             >
           
         

    이 항목에서는 Docker Compose를 사용하여 Milvus를 업그레이드하는 방법을 설명합니다.

    -

    일반적인 경우에는 이미지를 변경하여 Milvus를 업그레이드할 수 있습니다. 그러나 v2.1.x에서 v2.5.0-beta로 업그레이드하기 전에 메타데이터를 마이그레이션해야 합니다.

    +

    일반적인 경우, Milvus의 이미지를 변경하여 업그레이드할 수 있습니다. 그러나 v2.1.x에서 v2.5.0으로 업그레이드하기 전에 메타데이터를 마이그레이션해야 합니다.

    보안 문제로 인해 Milvus는 v2.2.5 릴리스와 함께 MinIO를 RELEASE.2023-03-20T20-16-18Z로 업그레이드합니다. Docker Compose를 사용하여 설치된 이전 Milvus 독립 실행형 릴리스에서 업그레이드하기 전에 단일 노드 단일 드라이브 MinIO 배포를 생성하고 기존 MinIO 설정 및 콘텐츠를 새 배포로 마이그레이션해야 합니다. 자세한 내용은 이 가이드를 참조하세요.

    @@ -49,7 +49,7 @@ title: Docker Compose로 Milvus 독립형 업그레이드하기
    ...
     standalone:
       container_name: milvus-standalone
    -  image: milvusdb/milvus:v2.5.0-beta
    +  image: milvusdb/milvus:v2.5.0
     
  • 다음 명령을 실행하여 업그레이드를 수행합니다.

    docker compose down
    @@ -83,7 +83,7 @@ cmd:
       runWithBackup: true
     config:
       sourceVersion: 2.1.4   # Specify your milvus version
    -  targetVersion: 2.5.0-beta
    +  targetVersion: 2.5.0
       backupFilePath: /tmp/migration.bak
     metastore:
       type: etcd
    diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.json
    index d5d0bfcbf..db04f9e58 100644
    --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.json
    +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.json
    @@ -1 +1 @@
    -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"헬름 차트로 Milvus 스탠드얼론 업그레이드하기","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus 버전 확인","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"헬름을 사용하여 밀버스 업그레이드","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"헬름 차트로 Milvus 스탠드얼론 업그레이드하기","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus 버전 확인","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"헬름을 사용하여 밀버스 업그레이드","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.md
    index ec489dc4a..9eca3b1a1 100644
    --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.md
    +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-helm.md
    @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
     zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
     

    Milvus의 업그레이드 경로는 다음과 같이 선택할 수 있습니다:

    -
    - 밀버스 v2.2.3 이상 릴리스에서 v2.5.0-beta로 [롤링 업그레이드 수행](#conduct-a-rolling-upgrade).
    +
    - 밀버스 v2.2.3 이상 릴리스에서 v2.5.0으로 [롤링 업그레이드 수행](#conduct-a-rolling-upgrade).

    롤링 업그레이드 수행

    1. @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
    2. Milvus 메타데이터를 마이그레이션합니다.
    3. 새 이미지로 Milvus 구성 요소를 시작합니다.
    -

    2. Milvus를 v2.1.x에서 2.5.0-beta로 업그레이드하기

    다음 명령은 Milvus를 v2.1.4에서 2.5.0-beta로 업그레이드한다고 가정합니다. 필요에 맞는 버전으로 변경하세요.

    +

    2. Milvus를 v2.1.x에서 2.5.0으로 업그레이드합니다.

    다음 명령은 Milvus를 v2.1.4에서 2.5.0으로 업그레이드한다고 가정합니다. 필요에 맞는 버전으로 변경하세요.

      -
    1. 밀버스 인스턴스 이름, 소스 밀버스 버전, 대상 밀버스 버전을 지정합니다.

      -
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
      +
    2. Milvus 인스턴스 이름, 소스 Milvus 버전, 대상 Milvus 버전을 지정합니다.

      +
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
       
    3. -
    4. Milvus가 기본 K8s 네임스페이스에 설치되지 않은 경우 -n 으로 네임스페이스를 지정합니다.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
      +
    5. Milvus가 기본 K8s 네임스페이스에 설치되지 않은 경우 -n 로 네임스페이스를 지정합니다.

      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
       
    6. Milvus가 사용자 지정 rootpath 과 함께 설치된 경우 -r 으로 루트 경로를 지정합니다.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
       
    7. Milvus가 사용자 지정 image 과 함께 설치된 경우 이미지 태그를 -w 으로 지정합니다.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
       
    8. 마이그레이션이 완료된 후 마이그레이션 파드를 자동으로 제거하려면 -d true 을 설정합니다.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
       
    9. 마이그레이션이 실패하면 롤백하고 다시 마이그레이션하세요.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
       
    diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.json index a6839b983..76360ea14 100644 --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Milvus 오퍼레이터로 Milvus 스탠드얼론 업그레이드하기","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvus 오퍼레이터 업그레이드","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Milvus 오퍼레이터로 Milvus 스탠드얼론 업그레이드하기","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Milvus 오퍼레이터 업그레이드","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"롤링 업그레이드 수행","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"이미지를 변경하여 Milvus 업그레이드","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"메타데이터 마이그레이션","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.md index 94ba61773..ecbbb80ee 100644 --- a/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/ko/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

    Milvus 운영자를 최신 버전으로 업그레이드한 후에는 다음과 같은 옵션을 선택할 수 있습니다:

    롤링 업그레이드 수행

    위의 구성 파일에서 spec.components.enableRollingUpdatetrue 으로 설정하고 spec.components.image 을 원하는 Milvus 버전으로 설정합니다.

    기본적으로 Milvus는 코디네이터에 대해 순차적으로 롤링 업그레이드를 수행하여 코디네이터 포드 이미지를 차례로 교체합니다. 업그레이드 시간을 줄이려면 spec.components.imageUpdateModeall 으로 설정하여 Milvus가 모든 포드 이미지를 동시에 교체하도록 하세요.

    @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

    spec.components.imageUpdateModerollingDowngrade 으로 설정하여 Milvus가 코디네이터 파드 이미지를 하위 버전으로 대체하도록 할 수 있습니다.

    apiVersion: milvus.io/v1beta1
    @@ -130,7 +130,7 @@ labels:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    그런 다음 다음을 실행하여 업그레이드를 수행합니다:

    kubectl patch -f milvusupgrade.yaml
    @@ -150,8 +150,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Milvus 2.2.0부터는 메타데이터가 이전 릴리즈의 메타데이터와 호환되지 않습니다. 다음 예제 코드 조각은 Milvus 2.1.4에서 Milvus v2.5.0-beta로 업그레이드하는 경우를 가정합니다.

    -

    1. 메타데이터 마이그레이션을 위한 .yaml 파일 만들기

    메타데이터 마이그레이션 파일을 만듭니다. 다음은 예시입니다. 설정 파일에 name, sourceVersion, targetVersion 을 지정해야 합니다. 다음 예에서는 namemy-release-upgrade 으로 , sourceVersionv2.1.4 으로 , targetVersionv2.5.0-beta 으로 설정합니다. 즉, Milvus 인스턴스가 v2.1.4에서 v2.5.0-beta로 업그레이드됩니다.

    +

    Milvus 2.2.0부터는 메타데이터가 이전 릴리즈의 메타데이터와 호환되지 않습니다. 다음 예제 코드 조각은 Milvus 2.1.4에서 Milvus v2.5.0으로 업그레이드하는 경우를 가정합니다.

    +

    1. 메타데이터 마이그레이션을 위한 .yaml 파일 만들기

    메타데이터 마이그레이션 파일을 만듭니다. 다음은 예시입니다. 설정 파일에 name, sourceVersion, targetVersion 을 지정해야 합니다. 다음 예에서는 namemy-release-upgrade 으로 , sourceVersionv2.1.4 으로 , targetVersionv2.5.0 으로 설정합니다. 즉, Milvus 인스턴스가 v2.1.4에서 v2.5.0으로 업그레이드됩니다.

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -161,9 +161,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/ko/adminGuide/users_and_roles.json b/localization/v2.5.x/site/ko/adminGuide/users_and_roles.json
    new file mode 100644
    index 000000000..b7378752b
    --- /dev/null
    +++ b/localization/v2.5.x/site/ko/adminGuide/users_and_roles.json
    @@ -0,0 +1 @@
    +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"사용자 및 역할 생성","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"사용자","href":"User​","type":2,"isActive":false},{"label":"역할","href":"Role​","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/ko/adminGuide/users_and_roles.md b/localization/v2.5.x/site/ko/adminGuide/users_and_roles.md
    new file mode 100644
    index 000000000..38a8ca0cc
    --- /dev/null
    +++ b/localization/v2.5.x/site/ko/adminGuide/users_and_roles.md
    @@ -0,0 +1,258 @@
    +---
    +id: users_and_roles.md
    +related_key: 'users, roles'
    +summary: >-
    +  Milvus는 RBAC을 통해 세분화된 접근 제어를 실현합니다. 먼저 사용자와 역할을 생성한 다음, 역할에 권한 또는 권한 그룹을 할당하고
    +  마지막으로 사용자에게 역할을 부여하여 액세스 제어를 관리할 수 있습니다. 이 방법은 액세스 관리의 효율성과 보안을 보장합니다. 이
    +  페이지에서는 Milvus에서 사용자 및 역할을 만드는 방법을 소개합니다.
    +title: 사용자 및 역할 생성
    +---
    +

    사용자 및 역할 생성

    Milvus는 RBAC을 통해 세분화된 접근 제어를 실현합니다. 먼저 사용자와 역할을 생성한 다음, 역할에 권한 또는 권한 그룹을 할당하고 마지막으로 사용자에게 역할을 부여하여 액세스 제어를 관리할 수 있습니다. 이 방법은 액세스 관리의 효율성과 보안을 보장합니다. 이 페이지에서는 Milvus에서 사용자 및 역할을 만드는 방법을 소개합니다.

    +

    사용자

    Milvus 인스턴스를 초기화한 후, Milvus에 처음 접속할 때 인증을 위해 루트 사용자가 자동으로 생성됩니다. 루트 사용자의 사용자 이름은 root 이고 비밀번호는 Milvus 입니다. 루트 사용자의 기본 역할은 admin 이며 모든 리소스에 대한 액세스 권한이 있습니다. 데이터 보안을 위해 루트 사용자의 자격 증명을 안전하게 보관하여 무단 액세스를 방지하세요.

    +

    일상적인 작업의 경우 루트 사용자를 사용하는 대신 사용자를 만드는 것이 좋습니다.

    +

    사용자 만들기

    다음 예는 사용자 아이디 user_1 와 비밀번호 P@ssw0rd 를 사용하여 사용자를 만드는 방법을 보여줍니다. 사용자의 사용자 아이디와 비밀번호는 다음 규칙을 따라야 합니다.

    +
      +
    • 사용자 아이디: 문자로 시작해야 하며 대문자 또는 소문자, 숫자, 밑줄만 포함할 수 있습니다.

    • +
    • 비밀번호: 8~64자 길이여야 하며 대문자, 소문자, 숫자, 특수 문자 중 세 가지를 포함해야 합니다.

    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.create_user(user_name="user_1", password="P@ssw0rd")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.CreateUserReq;​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +CreateUserReq createUserReq = CreateUserReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .build();​
    +        ​
    +client.createUser(createUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +await milvusClient.createUser({​
    +   username: 'user_1',​
    +   password: 'P@ssw0rd',​
    + });​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    비밀번호 업데이트

    사용자를 만든 후 비밀번호를 잊어버린 경우 비밀번호를 업데이트할 수 있습니다.

    +

    새 비밀번호는 다음 규칙을 따라야 합니다.

    +
      +
    • 8~64자 길이여야 하며 대문자, 소문자, 숫자, 특수 문자 중 세 가지를 포함해야 합니다.
    • +
    +

    다음 예는 user_1 사용자의 비밀번호를 NewP@ssw0rd 으로 업데이트하는 방법을 보여줍니다.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.update_password(​
    +    user_name="user_1",​
    +    old_password="P@ssw0rd",​
    +    new_password="NewP@ssw0rd"​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
    +​
    +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .newPassword("NewP@ssw0rd")​
    +        .build();​
    +client.updatePassword(updatePasswordReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.updateUser({​
    +   username: 'user_1',​
    +   newPassword: 'P@ssw0rd',​
    +   oldPassword: 'NewP@ssw0rd',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "newPassword": "P@ssw0rd!",​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    사용자 나열하기

    여러 사용자를 만든 후 기존 사용자를 모두 나열하고 볼 수 있습니다.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listUsers();​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    아래는 출력 예시입니다. root 은 Milvus에서 자동으로 생성된 기본 사용자이고, user_1 은 방금 생성한 새 사용자입니다.

    +
    ['root', 'user_1']​
    +
    +
    +

    역할

    Milvus는 모든 인스턴스의 리소스에 액세스할 수 있고 모든 작업에 대한 권한이 있는 관리자 역할인 admin 이라는 기본 제공 역할을 제공합니다. 보다 세분화된 액세스 관리와 향상된 데이터 보안을 위해 필요에 따라 사용자 지정 역할을 만드는 것이 좋습니다.

    +

    역할 만들기

    다음 예에서는 role_a 라는 역할을 만드는 방법을 보여 줍니다.

    +

    역할 이름은 다음 규칙을 따라야 합니다.

    +
      +
    • 문자로 시작해야 하며 대문자 또는 소문자, 숫자 및 밑줄만 포함할 수 있습니다."
    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.create_role(role_name="role_a")​
    +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
    +
    +
    +
    CreateRoleReq createRoleReq = CreateRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +       ​
    +
    +
    +
    client.createRole(createRoleReq);​
    +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.createRole({​
    +   roleName: 'role_a',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    역할 나열

    여러 역할을 만든 후 기존의 모든 역할을 나열하고 볼 수 있습니다.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> roles = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listRoles(​
    +    includeUserInfo: True​
    +);​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    아래는 출력 예시입니다. admin 은 Milvus의 기본 역할이고 role_a 은 방금 생성한 새 역할입니다.

    +
    ['admin', 'role_a']​
    +
    +
    diff --git a/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 2e2b8476a..c9d971537 100644 --- a/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Docker Compose로 Milvus 실행하기(Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus 설치","href":"Install-Milvus","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Docker Compose로 Milvus 실행하기(Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus 설치","href":"Install-Milvus","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.md index c8ac6afb1..7af918838 100644 --- a/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/ko/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Docker Compose로 Milvus 실행하기(Linux)

    Milvus는 Milvus 리포지토리에 Docker Compose 구성 파일을 제공합니다. Docker Compose를 사용하여 Milvus를 설치하려면 다음을 실행하세요.

    # Download the configuration file
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     
     # Start Milvus
     $ sudo docker compose up -d
    @@ -134,5 +134,5 @@ $ sudo rm
     
  • Milvus 데이터 백업을 위한 오픈 소스 도구인 Milvus Backup을 살펴보세요.

  • Milvus 디버깅 및 동적 구성 업데이트를 위한 오픈 소스 도구인 Birdwatcher를 살펴보세요.

  • 직관적인 Milvus 관리를 위한 오픈 소스 GUI 도구인 Attu를 살펴보세요.

  • -
  • Prometheus로 Milvus 모니터링.

  • +
  • Prometheus로 Milvus 모니터링하기.

  • diff --git a/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json index 22db45bab..070263070 100644 --- a/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json +++ b/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json @@ -1 +1 @@ -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"도커 컴포즈를 사용하여 GPU 지원으로 Milvus 실행하기","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus 설치하기","href":"Install-Milvus","type":2,"isActive":false},{"label":"메모리 풀 구성","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"도커 컴포즈를 사용하여 GPU 지원으로 Milvus 실행하기","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"전제 조건","href":"Prerequisites","type":2,"isActive":false},{"label":"Milvus 설치하기","href":"Install-Milvus","type":2,"isActive":false},{"label":"메모리 풀 구성","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"다음 단계","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md index 207c133ba..89c65f52d 100644 --- a/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md +++ b/localization/v2.5.x/site/ko/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md @@ -41,7 +41,7 @@ title: 도커 컴포즈를 사용하여 GPU 지원으로 Milvus 실행하기
  • 설치하기 전에하드웨어 및 소프트웨어 요구 사항을 확인하세요.
  • -

    이미지를 가져오는 데 문제가 발생하면 community@zilliz.com 으로 문의하여 문제에 대한 자세한 내용을 알려주시면 필요한 지원을 제공해 드리겠습니다.

    +

    이미지를 가져오는 데 문제가 발생하면 community@zilliz.com 으로 문의해 주시면 필요한 지원을 제공해 드리겠습니다.

    Milvus 설치하기

    Docker Compose를 사용하여 GPU를 지원하는 Milvus를 설치하려면 다음 단계를 따르세요.

    -

    1. YAML 파일 다운로드 및 구성

    다운로드 milvus-standalone-docker-compose-gpu.yml 를 클릭하고 수동으로 또는 다음 명령을 사용하여 docker-compose.yml로 저장합니다.

    -
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
    +

    1. YAML 파일 다운로드 및 구성

    다운로드 milvus-standalone-docker-compose-gpu.yml 를 클릭하고 수동으로 또는 다음 명령을 사용하여 docker-compose.yml로 저장합니다.

    +
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
     
    -

    YAML 파일에서 독립형 서비스의 환경 변수를 다음과 같이 몇 가지 변경해야 합니다:

    +

    YAML 파일에서 독립 실행형 서비스의 환경 변수를 다음과 같이 몇 가지 변경해야 합니다:

    • 특정 GPU 장치를 Milvus에 할당하려면 standalone 서비스 정의에서 deploy.resources.reservations.devices[0].devices_ids 필드를 찾아 해당 값을 원하는 GPU의 ID로 바꿉니다. NVIDIA GPU 디스플레이 드라이버에 포함된 nvidia-smi 도구를 사용하여 GPU 장치의 ID를 확인할 수 있습니다. Milvus는 여러 GPU 장치를 지원합니다.
    @@ -217,5 +217,5 @@ docker start <milvus_container_id>
  • Milvus 데이터 백업을 위한 오픈 소스 도구인 Milvus Backup을 살펴보세요.

  • Milvus 디버깅 및 동적 구성 업데이트를 위한 오픈 소스 도구인 Birdwatcher를 살펴보세요.

  • 직관적인 Milvus 관리를 위한 오픈 소스 GUI 도구인 Attu를 살펴보세요.

  • -
  • Prometheus로 Milvus 모니터링하기.

  • +
  • Prometheus로 Milvus 모니터링.

  • diff --git a/localization/v2.5.x/site/ko/menuStructure/ko.json b/localization/v2.5.x/site/ko/menuStructure/ko.json index 70bdf6cdf..56b8b2ccb 100644 --- a/localization/v2.5.x/site/ko/menuStructure/ko.json +++ b/localization/v2.5.x/site/ko/menuStructure/ko.json @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "필터링", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "필터링 설명", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "기본 연산자", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "필터링 템플릿", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "JSON 연산자", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "배열 연산자", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "전체 텍스트 검색", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "텍스트 일치", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "검색 이터레이터", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "파티션 키 사용", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "메타데이터 필터링", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "순위 재조정", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -944,7 +975,7 @@ "order": 9, "children": [ { - "label": "배포", + "label": "Deployment", "id": "deployment", "order": 0, "isMenu": true, @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "사용자, 권한 및 역할", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "RBAC 사용", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "RBAC 설명", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "사용자 및 역할 만들기", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "권한 그룹 만들기", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "권한 부여", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "역할 부여", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "사용자 및 역할 삭제", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "전송 중 암호화", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "밀버스 사이징 도구", "id": "sizing", @@ -1603,7 +1671,7 @@ "children": [] }, { - "label": "12개의 실험실", + "label": "12개의 랩", "id": "video_search_with_twelvelabs_and_milvus.md", "order": 12, "children": [] diff --git a/localization/v2.5.x/site/ko/release_notes.json b/localization/v2.5.x/site/ko/release_notes.json index f8f8e57f1..5ab440927 100644 --- a/localization/v2.5.x/site/ko/release_notes.json +++ b/localization/v2.5.x/site/ko/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"릴리스 노트","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"릴리스 노트","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/release_notes.md b/localization/v2.5.x/site/ko/release_notes.md index c915ecd35..e408b1442 100644 --- a/localization/v2.5.x/site/ko/release_notes.md +++ b/localization/v2.5.x/site/ko/release_notes.md @@ -19,7 +19,7 @@ title: 릴리스 노트 >

    Milvus의 새로운 기능을 알아보세요! 이 페이지에는 각 릴리스의 새로운 기능, 개선 사항, 알려진 문제 및 버그 수정 사항이 요약되어 있습니다. 이 섹션에서 v2.5.0 이후 출시된 각 버전에 대한 릴리스 노트를 확인할 수 있습니다. 이 페이지를 정기적으로 방문하여 업데이트에 대해 알아보는 것이 좋습니다.

    -

    v2.5.0-beta

    릴리스 날짜: 2024년 11월 26일

    +

    릴리스 날짜: 2024년 12월 23일

    - +
    Milvus 버전Python SDK 버전Node.js SDK 버전Java SDK 버전
    2.5.0-beta2.5.02.5.02.5.0
    2.5.02.5.12.5.22.5.2
    -

    Milvus 2.5.0-beta는 벡터 검색과 대규모 데이터 관리를 다루는 사용자의 사용성, 확장성, 성능을 향상시키기 위해 상당한 발전을 가져왔습니다. 이번 릴리스에서는 용어 기반 검색, 쿼리 최적화를 위한 클러스터링 압축, 희소 및 고밀도 벡터 검색 방법에 대한 다양한 지원과 같은 강력한 새 기능이 통합되었습니다. 클러스터 관리, 인덱싱, 데이터 처리 기능이 향상되어 새로운 수준의 유연성과 사용 편의성이 도입되어 Milvus는 더욱 강력하고 사용자 친화적인 벡터 데이터베이스가 되었습니다.

    +

    Milvus 2.5.0은 벡터 검색과 대규모 데이터 관리를 다루는 사용자들을 위해 사용성, 확장성, 성능을 향상시키는 중요한 발전을 가져왔습니다. 이번 릴리스에서는 용어 기반 검색, 쿼리 최적화를 위한 클러스터 압축, 희소 및 고밀도 벡터 검색 방법에 대한 다양한 지원과 같은 강력한 새 기능이 통합되었습니다. 클러스터 관리, 인덱싱, 데이터 처리 기능이 향상되어 새로운 수준의 유연성과 사용 편의성이 도입되어 Milvus는 더욱 강력하고 사용자 친화적인 벡터 데이터베이스가 되었습니다.

    주요 기능

    Milvus 2.5는 Sparse-BM25로 구현된 전체 텍스트 검색을 지원합니다! 이 기능은 특히 희귀한 단어나 전문 용어가 포함된 시나리오에서 Milvus의 강력한 시맨틱 검색 기능을 보완하는 중요한 기능입니다. 이전 버전에서 Milvus는 키워드 검색 시나리오를 지원하기 위해 스파스 벡터를 지원했습니다. 이러한 희소 벡터는 SPLADEv2/BGE-M3와 같은 신경 모델이나 BM25 알고리즘과 같은 통계 모델에 의해 Milvus 외부에서 생성되었습니다.

    -

    Tantivy를 기반으로 하는 Milvus 2.5는 분석기와 스파스 벡터 추출을 내장하고 있으며, 벡터를 입력으로만 받던 API를 텍스트를 직접 받을 수 있도록 확장했습니다. BM25 통계 정보는 데이터가 입력되는 대로 실시간으로 업데이트되어 사용성과 정확성이 향상되었습니다. 또한 근사 근사 이웃(ANN) 알고리즘을 기반으로 하는 희소 벡터는 표준 키워드 검색 시스템보다 더 강력한 성능을 제공합니다.

    +

    Tantivy를 기반으로 하는 Milvus 2.5는 분석기와 스파스 벡터 추출 기능이 내장되어 있어, 벡터를 입력으로만 받던 API를 텍스트를 직접 받을 수 있도록 확장했습니다. BM25 통계 정보는 데이터가 입력되는 대로 실시간으로 업데이트되어 사용성과 정확성이 향상되었습니다. 또한 근사 근사 이웃(ANN) 알고리즘을 기반으로 하는 희소 벡터는 표준 키워드 검색 시스템보다 더 강력한 성능을 제공합니다.

    자세한 내용은 분석기 개요전체 텍스트 검색을 참조하세요.

    클러스터 관리 웹UI(베타)

    대규모 데이터와 풍부한 기능을 보다 효과적으로 지원하기 위해 Milvus의 정교한 설계에는 다양한 종속성, 수많은 노드 역할, 복잡한 데이터 구조 등이 포함되어 있습니다. 이러한 측면은 사용 및 유지 관리에 어려움을 초래할 수 있습니다.

    Milvus 2.5는 빌트인 클러스터 관리 웹UI를 도입하여 Milvus의 복잡한 런타임 환경 정보를 시각화함으로써 시스템 유지 관리의 어려움을 줄여줍니다. 여기에는 데이터베이스 및 컬렉션, 세그먼트, 채널, 종속성, 노드 상태, 작업 정보, 느린 쿼리 등에 대한 세부 정보가 포함됩니다.

    @@ -58,11 +58,11 @@ title: 릴리스 노트

    기본값과 널 가능 속성은 Milvus에 더 큰 유연성을 제공합니다. 사용자는 컬렉션을 만들 때 값이 불확실한 필드에 이 기능을 활용할 수 있습니다. 또한 다른 데이터베이스 시스템에서 Milvus로 데이터 마이그레이션을 간소화하여 원래의 기본값 설정을 유지하면서 null 값이 포함된 데이터 세트를 처리할 수 있습니다.

    자세한 내용은 Null 가능 및 기본값을 참조하세요.

    Faiss 기반 HNSW SQ/PQ/PRQ

    Faiss 커뮤니티와의 긴밀한 협력을 통해 Faiss의 HNSW 알고리즘은 기능과 성능 모두에서 상당한 개선을 이루었습니다. 안정성과 유지보수성을 고려하여 Milvus 2.5는 HNSW에 대한 지원을 hnswlib에서 Faiss로 공식적으로 마이그레이션했습니다.

    -

    Milvus 2.5는 Faiss를 기반으로 다양한 시나리오의 요구 사항을 충족하기 위해 HNSW에서 여러 양자화 방법을 지원합니다: SQ(스칼라 퀀타이저), PQ(제품 퀀타이저), PRQ(제품 잔여 퀀타이저)가 그것입니다. SQ와 PQ가 더 일반적인데, SQ는 쿼리 성능과 빌드 속도가 우수하고, PQ는 동일한 압축률에서 더 나은 리콜을 제공합니다. 많은 벡터 데이터베이스는 일반적으로 SQ 양자화의 간단한 형태인 이진 양자화를 사용합니다.

    +

    Milvus 2.5는 Faiss를 기반으로 다양한 시나리오의 요구 사항을 충족하기 위해 HNSW에서 여러 양자화 방법을 지원합니다: SQ(스칼라 퀀타이저), PQ(제품 퀀타이저), PRQ(제품 잔여 퀀타이저)가 그것입니다. SQ와 PQ가 더 일반적으로 사용되는데, SQ는 쿼리 성능과 빌드 속도가 우수하고, PQ는 동일한 압축률에서 더 나은 리콜을 제공합니다. 많은 벡터 데이터베이스는 일반적으로 SQ 양자화의 간단한 형태인 이진 양자화를 사용합니다.

    PRQ는 PQ와 AQ(애디티브 퀀타이저)의 융합입니다. PQ와 비교했을 때, 특히 높은 압축률에서 더 나은 리콜을 제공하기 위해 더 긴 빌드 시간이 필요하며, 이진 압축이라고 합니다.

    클러스터링 압축(베타)

    Milvus 2.5에는 대규모 컬렉션에서 검색을 가속화하고 비용을 절감하기 위해 클러스터링 압축이 도입되었습니다. 스칼라 필드를 클러스터링 키로 지정하면 데이터를 범위별로 재분배하여 저장 및 검색을 최적화할 수 있습니다. 글로벌 인덱스처럼 작동하는 이 기능은 클러스터링 메타데이터를 기반으로 쿼리 중에 데이터를 효율적으로 정리하여 스칼라 필터를 적용할 때 검색 성능을 향상시킬 수 있습니다.

    자세한 내용은 클러스터링 압축을 참조하세요.

    -

    기타 기능

    스트리밍 노드(베타)

    Milvus 2.5에는 미리 쓰기 로깅(WAL) 서비스를 제공하는 스트리밍 노드라는 새로운 구성 요소가 도입되었습니다. 이를 통해 Milvus는 채널 읽기 및 쓰기 전후에 합의를 달성하여 새로운 특징, 기능 및 최적화를 실현할 수 있습니다. 이 기능은 Milvus 2.5에서는 기본적으로 비활성화되어 있으며 3.0 버전에서 공식적으로 제공될 예정입니다.

    +

    기타 기능

    스트리밍 노드(베타)

    Milvus 2.5에는 미리 쓰기 로깅(WAL) 서비스를 제공하는 스트리밍 노드라는 새로운 구성 요소가 도입되었습니다. 이를 통해 Milvus는 채널 읽기 및 쓰기 전후에 합의를 달성하여 새로운 특징, 기능 및 최적화를 실현할 수 있습니다. 이 기능은 Milvus 2.5에서 기본적으로 비활성화되어 있으며 3.0 버전에서 공식적으로 제공될 예정입니다.

    IPv6 지원

    Milvus는 이제 IPv6를 지원하여 네트워크 연결성과 호환성을 확장합니다.

    CSV 일괄 가져오기

    이제 Milvus는 JSON 및 Parquet 형식 외에도 CSV 형식의 데이터를 직접 대량으로 가져올 수 있습니다.

    쿼리 가속화를 위한 표현식 템플릿

    Milvus는 이제 표현식 템플릿을 지원하여 특히 복잡한 표현식이 있는 시나리오에서 표현식 구문 분석의 효율성을 향상시킵니다.

    @@ -78,6 +78,9 @@ title: 릴리스 노트

    종속성 업그레이드

    ETCD 3.5.16 및 Pulsar 3.0.7 LTS로 업그레이드하여 기존 CVE를 수정하고 보안을 강화했습니다. 참고: Pulsar 3.x로의 업그레이드는 이전 2.x 버전과 호환되지 않습니다.

    이미 Milvus를 배포한 사용자의 경우, 새로운 기능을 사용하려면 먼저 ETCD 및 Pulsar 구성 요소를 업그레이드해야 합니다. 자세한 내용은 Pulsar를 2.x에서 3.x로 업그레이드하기를 참조하세요.

    로컬 스토리지 V2

    Milvus 2.5에 새로운 로컬 파일 형식이 도입되어 스칼라 데이터의 로딩 및 쿼리 효율성이 향상되고 메모리 오버헤드가 줄어들며 향후 최적화를 위한 토대가 마련되었습니다.

    -

    표현식 구문 분석 최적화

    반복 표현식에 대한 캐싱 구현, ANTLR 업그레이드, NOT IN 절의 성능 최적화를 통해 표현식 구문 분석이 개선되었습니다.

    +

    표현식 구문 분석 최적화

    반복 표현식에 대한 캐싱을 구현하고, ANTLR을 업그레이드하고, NOT IN 절의 성능을 최적화하여 표현식 구문 분석이 개선되었습니다.

    DDL 동시성 성능 개선

    데이터 정의 언어(DDL) 작업의 동시성 성능을 최적화했습니다.

    RESTful API 기능 조정

    일관성을 위해 RESTful API의 기능을 다른 SDK와 정렬했습니다.

    +

    보안 및 구성 업데이트

    보다 복잡한 환경이나 엔터프라이즈 환경에서 노드 간 통신을 보호하기 위해 TLS를 지원합니다. 자세한 내용은 보안 구성을 참조하세요.

    +

    압축 성능 개선

    혼합 압축에서 최대 세그먼트 제한을 제거하고 이제 작은 세그먼트부터 우선순위를 지정하여 효율성이 향상되고 대규모 또는 조각화된 데이터 세트의 쿼리 속도가 빨라졌습니다.

    +

    점수 기반 채널 밸런싱

    채널 간 부하를 동적으로 분산하는 정책을 도입하여 대규모 배포에서 리소스 활용률과 전반적인 안정성을 향상시켰습니다.

    diff --git a/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.json index 31c67eca5..2cffb2342 100644 --- a/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"컬렉션 수정","href":"Modify-Collection​","type":1,"isActive":false},{"label":"컬렉션 이름 바꾸기","href":"Rename-Collection​","type":2,"isActive":false},{"label":"컬렉션 TTL 설정","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"컬렉션 수정","href":"Modify-Collection​","type":1,"isActive":false},{"label":"컬렉션 이름 바꾸기","href":"Rename-Collection​","type":2,"isActive":false},{"label":"컬렉션 TTL 설정","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.md index e6bbe2b1a..cf5d3df98 100644 --- a/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/ko/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    컬렉션을 특정 기간 동안 삭제해야 하는 경우 TTL(Time-To-Live)을 초 단위로 설정하는 것이 좋습니다. TTL이 초과되면 Milvus는 컬렉션의 엔티티를 삭제하고 컬렉션을 삭제합니다. 삭제는 비동기식으로 이루어지므로 삭제가 완료되기 전에도 검색 및 쿼리가 여전히 가능합니다.

    +

    컬렉션을 특정 기간 동안 삭제해야 하는 경우 TTL(Time-To-Live)을 초 단위로 설정하는 것이 좋습니다. TTL이 초과되면 Milvus는 컬렉션의 엔티티를 삭제합니다. 삭제는 비동기식으로 이루어지므로 삭제가 완료되기 전에도 검색과 쿼리가 여전히 가능합니다.

    다음 코드 스니펫은 컬렉션의 TTL을 변경하는 방법을 보여줍니다.

    -
    # Currently not available for Python
    +
    from pymilvus import MilvusClient
     
    +client.alter_collection_properties(
    +  collection_name="collection_name",
    +  properties = {"collection.ttl.seconds": 500}
    +)
     
    import io.milvus.v2.service.collection.request.AlterCollectionReq;​
     import java.util.HashMap;​
    diff --git a/localization/v2.5.x/site/ko/userGuide/schema/string.md b/localization/v2.5.x/site/ko/userGuide/schema/string.md
    index 799a76f5c..e0f13cc3a 100644
    --- a/localization/v2.5.x/site/ko/userGuide/schema/string.md
    +++ b/localization/v2.5.x/site/ko/userGuide/schema/string.md
    @@ -3,9 +3,9 @@ id: string.md
     title: 문자열 필드
     summary: >-
       Milvus에서 VARCHAR는 문자열형 데이터를 저장하는 데 사용되는 데이터 유형으로, 가변 길이 문자열을 저장하는 데 적합합니다. 최대
    -  60,535자의 단일 및 다중 바이트 문자열을 모두 저장할 수 있으며, 최대 길이는 60,535자입니다. VARCHAR 필드를 정의할 때는
    -  최대 길이 매개변수 max_length도 지정해야 합니다. VARCHAR 문자열 유형은 텍스트 데이터를 저장하고 관리하는 효율적이고 유연한
    -  방법을 제공하므로 다양한 길이의 문자열을 처리하는 애플리케이션에 이상적입니다.
    +  65,535자까지 단일 및 멀티바이트 문자로 문자열을 저장할 수 있습니다. VARCHAR 필드를 정의할 때는 최대 길이 매개변수
    +  max_length도 지정해야 합니다. VARCHAR 문자열 유형은 텍스트 데이터를 저장하고 관리하는 효율적이고 유연한 방법을 제공하므로
    +  다양한 길이의 문자열을 처리하는 애플리케이션에 이상적입니다.
     ---
     

    문자열 필드

    Milvus에서 VARCHAR 은 문자열 유형 데이터를 저장하는 데 사용되는 데이터 유형으로, 가변 길이 문자열을 저장하는 데 적합합니다. 최대 60,535자의 단일 및 다중 바이트 문자열을 모두 저장할 수 있으며, 최대 길이는 60,535자입니다. VARCHAR 필드를 정의할 때는 최대 길이 매개변수 max_length 도 지정해야 합니다. VARCHAR 문자열 유형은 텍스트 데이터를 저장하고 관리하는 효율적이고 유연한 방법을 제공하므로 다양한 길이의 문자열을 처리하는 애플리케이션에 이상적입니다.

    +

    Milvus에서 VARCHAR 은 문자열 유형 데이터를 저장하는 데 사용되는 데이터 유형으로, 가변 길이 문자열을 저장하는 데 적합합니다. 최대 65,535자까지 단일 및 멀티바이트 문자로 문자열을 저장할 수 있습니다. VARCHAR 필드를 정의할 때는 최대 길이 매개변수 max_length 도 지정해야 합니다. VARCHAR 문자열 유형은 텍스트 데이터를 저장하고 관리하는 효율적이고 유연한 방법을 제공하므로 다양한 길이의 문자열을 처리하는 애플리케이션에 이상적입니다.

    VARCHAR 필드 추가

    Milvus는 배열 필드를 쿼리하는 강력한 연산자를 제공하여 배열의 내용을 기반으로 엔티티를 필터링하고 검색할 수 있습니다.

    +
    +

    배열 내의 모든 요소는 동일한 유형이어야 하며 배열 내의 중첩 구조는 일반 문자열로 취급됩니다. 따라서 배열 필드로 작업할 때는 최적의 성능을 위해 지나치게 깊은 중첩을 피하고 데이터 구조가 가능한 한 평평한지 확인하는 것이 좋습니다.

    +
    +

    사용 가능한 ARRAY 연산자

    ARRAY 연산자를 사용하면 Milvus에서 배열 필드를 세밀하게 쿼리할 수 있습니다. 이러한 연산자는 다음과 같습니다.

    + +

    ARRAY_CONTAINS

    ARRAY_CONTAINS 연산자는 배열 필드에 특정 요소가 있는지 확인합니다. 배열에 특정 요소가 있는 엔티티를 찾고자 할 때 유용합니다.

    +

    예제

    +

    연도별로 기록된 최저 기온을 포함하는 배열 필드 history_temperatures 가 있다고 가정해 보겠습니다. 배열에 23 값이 포함된 모든 엔터티를 찾으려면 다음 필터 표현식을 사용할 수 있습니다.

    +
    filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
    +
    +
    +

    그러면 history_temperatures 배열에 23 값이 포함된 모든 엔티티가 반환됩니다.

    +

    array_contains_all

    ARRAY_CONTAINS_ALL 연산자는 지정된 목록의 모든 요소가 배열 필드에 있는지 확인합니다. 이 연산자는 배열에 여러 값을 포함하는 엔티티를 일치시키려는 경우에 유용합니다.

    +

    예제

    +

    history_temperatures 배열에 2324 이 모두 포함된 모든 엔티티를 찾으려면 다음을 사용할 수 있습니다.

    +
    filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
    +
    +
    +

    그러면 history_temperatures 배열에 지정된 값이 모두 포함된 모든 엔티티가 반환됩니다.

    +

    array_contains_any

    ARRAY_CONTAINS_ANY 연산자는 지정된 목록의 요소가 배열 필드에 있는지 확인합니다. 이 연산자는 배열에 지정된 값 중 하나 이상이 포함된 엔티티를 일치시키려는 경우에 유용합니다.

    +

    예제

    +

    history_temperatures 배열에 23 또는 24 이 포함된 모든 엔티티를 찾으려면 다음을 사용할 수 있습니다.

    +
    filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
    +
    +
    +

    그러면 history_temperatures 배열에 23 또는 24 값 중 하나 이상이 포함된 모든 엔티티가 반환됩니다.

    +

    ARRAY_LENGTH

    ARRAY_LENGTH 연산자를 사용하면 배열 필드에 있는 요소 수를 기준으로 엔티티를 필터링할 수 있습니다. 이 연산자는 특정 길이의 배열을 가진 엔티티를 찾아야 할 때 유용합니다.

    +

    예제

    +

    history_temperatures 배열의 요소가 10개 미만인 모든 엔티티를 찾고자 하는 경우 다음을 사용할 수 있습니다.

    +
    filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
    +
    +
    +

    그러면 history_temperatures 배열의 요소가 10개 미만인 모든 엔티티가 반환됩니다.

    diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..677dd66b3 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"기본 연산자","href":"Basic-Operators​","type":1,"isActive":false},{"label":"비교 연산자","href":"Comparison-operators​","type":2,"isActive":false},{"label":"범위 연산자","href":"Range-operators​","type":2,"isActive":false},{"label":"산술 연산자","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"논리 연산자","href":"Logical-Operators​","type":2,"isActive":false},{"label":"JSON 및 배열 필드에서 기본 연산자 사용에 대한 팁","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"결론","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..c2250523b --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,234 @@ +--- +id: basic-operators.md +summary: >- + Milvus는 데이터를 효율적으로 필터링하고 쿼리하는 데 도움이 되는 다양한 기본 연산자 세트를 제공합니다. 이러한 연산자를 사용하면 스칼라 + 필드, 숫자 계산, 논리적 조건 등을 기반으로 검색 조건을 세분화할 수 있습니다. 이러한 연산자를 사용하는 방법을 이해하는 것은 정확한 + 쿼리를 작성하고 검색의 효율성을 극대화하는 데 매우 중요합니다. +title: 기본 연산자 +--- +

    기본 연산자

    Milvus는 데이터를 효율적으로 필터링하고 쿼리하는 데 도움이 되는 다양한 기본 연산자 세트를 제공합니다. 이러한 연산자를 사용하면 스칼라 필드, 숫자 계산, 논리적 조건 등을 기반으로 검색 조건을 세분화할 수 있습니다. 이러한 연산자를 사용하는 방법을 이해하는 것은 정확한 쿼리를 작성하고 검색의 효율성을 극대화하는 데 매우 중요합니다.

    +

    비교 연산자

    비교 연산자는 같음, 같지 않음 또는 크기에 따라 데이터를 필터링하는 데 사용됩니다. 숫자, 텍스트, 날짜 필드에 적용할 수 있습니다.

    +

    지원되는 비교 연산자

      +
    • == (같음)

    • +
    • != (같지 않음)

    • +
    • > (보다 큼)

    • +
    • < (보다 작음)

    • +
    • >= (보다 크거나 같음)

    • +
    • <= (다음보다 작거나 같음)

    • +
    +

    예 1: 같음(==)으로 필터링

    status 이라는 필드가 있고 status 이 "활성"인 모든 엔터티를 찾고자 한다고 가정합니다. 같음 연산자 == 를 사용할 수 있습니다.

    +
    filter = 'status == "active"'​
    +
    +
    +

    예 2: 같지 않음 (!=)으로 필터링하기

    status 이 "비활성"이 아닌 엔터티를 찾으려는 경우.

    +
    filter = 'status != "inactive"'​
    +
    +
    +

    예 3: Greater Than (>)으로 필터링하기

    age 이 30보다 큰 모든 엔터티를 찾으려는 경우.

    +
    filter = 'age > 30'​
    +
    +
    +

    예 4: 미만 (<)으로 필터링하기

    price 이 100 미만인 엔터티를 찾으려면 다음과 같이 하세요.

    +
    filter = 'price < 100'​
    +
    +
    +

    예 5: 보다 크거나 같음(>=)으로 필터링하기

    rating 이 4보다 크거나 같은 모든 엔터티를 찾으려는 경우.

    +
    filter = 'rating >= 4'​
    +
    +
    +

    예 6: 보다 작거나 같음(<=)으로 필터링하기

    discount 이 10% 이하인 엔터티를 찾으려면.

    +
    filter = 'discount <= 10'​
    +
    +
    +

    범위 연산자

    범위 연산자는 특정 집합 또는 값 범위를 기준으로 데이터를 필터링하는 데 도움이 됩니다.

    +

    지원되는 범위 연산자

      +
    • IN: 특정 집합 또는 범위 내의 값을 일치시키는 데 사용됩니다.

    • +
    • LIKE: 패턴을 일치시키는 데 사용됩니다(주로 텍스트 필드에 사용).

    • +
    +

    예 1: IN 사용하여 여러 값 일치시키기

    color 이 "빨간색", "녹색" 또는 "파란색"인 모든 엔티티를 찾고자 하는 경우.

    +
    filter = 'color in ["red", "green", "blue"]'​
    +
    +
    +

    이 방법은 값 목록에서 멤버십 여부를 확인하려는 경우에 유용합니다.

    +

    예 2: 패턴 일치에 LIKE 사용

    LIKE 연산자는 문자열 필드에서 패턴 일치에 사용됩니다. 이 연산자는 텍스트 내에서 접두사, 접두사 또는 접미사 등 다양한 위치의 하위 문자열을 일치시킬 수 있습니다. LIKE 연산자는 % 기호를 와일드카드로 사용하며, 0을 포함하여 원하는 수의 문자를 일치시킬 수 있습니다.

    +

    접두사 일치(다음으로 시작)

    문자열이 지정된 패턴으로 시작하는 접두사 일치를 수행하려면 패턴을 처음에 배치하고 % 을 사용하여 그 뒤에 오는 모든 문자를 일치시킬 수 있습니다. 예를 들어 name 가 "Prod"로 시작하는 모든 제품을 찾으려면.

    +
    filter = 'name LIKE "Prod%"'​
    +
    +
    +

    이렇게 하면 "제품 A", "제품 B" 등과 같이 이름이 "Prod"로 시작하는 모든 제품이 일치합니다.

    +

    접미사 일치(끝으로 끝남)

    문자열이 지정된 패턴으로 끝나는 접미사 일치의 경우, 패턴의 시작 부분에 % 기호를 배치합니다. 예를 들어 name 이 "XYZ"로 끝나는 모든 제품을 찾으려면.

    +
    filter = 'name LIKE "%XYZ"'​
    +
    +
    +

    이렇게 하면 이름이 "XYZ"로 끝나는 모든 제품(예: "ProductXYZ", "SampleXYZ" 등)이 일치합니다.

    +

    접두사 일치(포함)

    문자열의 어느 위치에나 패턴이 나타날 수 있는 접두사 일치를 수행하려면 패턴의 시작과 끝 모두에 % 기호를 배치하면 됩니다. 예를 들어 name 에 "Pro"라는 단어가 포함된 모든 제품을 찾습니다.

    +
    filter = 'name LIKE "%Pro%"'​
    +
    +
    +

    이렇게 하면 이름에 "Pro"가 포함된 모든 제품(예: "Product", "ProLine" 또는 "SuperPro")이 일치합니다.

    +

    산술 연산자

    산술 연산자를 사용하면 숫자 필드와 관련된 계산을 기반으로 조건을 생성할 수 있습니다.

    +

    지원되는 산술 연산자.

      +
    • + (더하기)

    • +
    • - (빼기)

    • +
    • * (곱셈)

    • +
    • / (나누기)

    • +
    • % (모듈러스)

    • +
    • ** (지수)

    • +
    +

    예 1: 더하기(+) 사용

    total 가격이 base_pricetax 의 합계인 엔티티를 찾으려면.

    +
    filter = 'total == base_price + tax'​
    +
    +
    +

    예 2: 빼기 사용 (-)

    quantity 이 50보다 크고 quantity_sold 이 30보다 작은 엔티티를 찾으려면.

    +
    filter = 'quantity - quantity_sold > 50'​
    +
    +
    +

    예 3: 곱하기 사용 (*)

    price 가 100보다 크고 quantity 가 10보다 큰 엔터티를 찾으려면 곱하기.

    +
    filter = 'price * quantity > 1000'​
    +
    +
    +

    예 4: 나누기 사용 (/)

    total_pricequantity 로 나눈 값이 50보다 작은 제품을 찾으려면.

    +
    filter = 'total_price / quantity < 50'​
    +
    +
    +

    예 5: 모듈러스 사용 (%)

    id 이 짝수(즉, 2로 나눌 수 있는)인 엔티티를 찾으려면 다음과 같이 하세요.

    +
    filter = 'id % 2 == 0'​
    +
    +
    +

    예 6: 지수 사용(**)

    price 를 2의 거듭 제곱한 값이 1000보다 큰 엔터티를 찾으려면 다음과 같이 하세요.

    +
    filter = 'price ** 2 > 1000'​
    +
    +
    +

    논리 연산자

    논리 연산자는 여러 조건을 보다 복잡한 필터 표현식으로 결합하는 데 사용됩니다. 여기에는 AND, OR, NOT 등이 포함됩니다.

    +

    지원되는 논리 연산자

      +
    • AND: 모두 참이어야 하는 여러 조건을 결합합니다.

    • +
    • OR: 하나 이상의 조건이 참이어야 하는 조건을 결합합니다.

    • +
    • NOT: 조건을 무효화합니다.

    • +
    +

    예 1: AND 사용하여 조건 결합하기

    price 가 100보다 크고 stock 가 50보다 큰 모든 제품을 찾습니다.

    +
    filter = 'price > 100 AND stock > 50'​
    +
    +
    +

    예 2: OR 사용하여 조건 결합하기

    color 이 "빨간색" 또는 "파란색"인 모든 제품을 찾으려면.

    +
    filter = 'color == "red" OR color == "blue"'​
    +
    +
    +

    예 3: NOT 사용하여 조건 제외하기

    color 이 "녹색"이 아닌 모든 제품을 찾으려면.

    +
    filter = 'NOT color == "green"'​
    +
    +
    +

    JSON 및 배열 필드에서 기본 연산자 사용에 대한 팁

    Milvus의 기본 연산자는 다목적이며 스칼라 필드에 적용할 수 있지만, JSON 및 ARRAY 필드의 키와 인덱스에도 효과적으로 사용할 수 있습니다.

    +

    예를 들어 price, model, tags 과 같은 여러 개의 키가 포함된 product 필드가 있는 경우 항상 키를 직접 참조하세요.

    +
    filter = 'product["price"] > 1000'​
    +
    +
    +

    기록된 온도 배열에서 첫 번째 온도가 특정 값을 초과하는 기록을 찾으려면 다음을 사용합니다.

    +
    filter = 'history_temperatures[0] > 30'​
    +
    +
    +

    결론

    Milvus는 데이터를 유연하게 필터링하고 쿼리할 수 있는 다양한 기본 연산자를 제공합니다. 비교, 범위, 산술 및 논리 연산자를 결합하여 강력한 필터 표현식을 만들어 검색 결과의 범위를 좁히고 필요한 데이터를 효율적으로 검색할 수 있습니다.

    diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..bd7f4b120 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"필터링 설명","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"기본 연산자","href":"Basic-operators​","type":2,"isActive":false},{"label":"필터 표현식 템플릿","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"데이터 유형별 연산자","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..32fae85a4 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,144 @@ +--- +id: boolean.md +summary: >- + Milvus는 데이터를 정밀하게 쿼리할 수 있는 강력한 필터링 기능을 제공합니다. 필터 표현식을 사용하면 특정 스칼라 필드를 대상으로 + 지정하고 다양한 조건으로 검색 결과를 구체화할 수 있습니다. 이 가이드에서는 쿼리 작업에 초점을 맞춘 예제를 통해 Milvus에서 필터 + 표현식을 사용하는 방법을 설명합니다. 검색 및 삭제 요청에도 이러한 필터를 적용할 수 있습니다. +title: 필터링 설명 +--- +

    필터링 설명

    Milvus는 데이터를 정밀하게 쿼리할 수 있는 강력한 필터링 기능을 제공합니다. 필터 표현식을 사용하면 특정 스칼라 필드를 대상으로 지정하고 다양한 조건으로 검색 결과를 구체화할 수 있습니다. 이 가이드에서는 쿼리 작업에 초점을 맞춘 예제를 통해 Milvus에서 필터 표현식을 사용하는 방법을 설명합니다. 검색 및 삭제 요청에도 이러한 필터를 적용할 수 있습니다.

    +

    기본 연산자

    Milvus는 데이터 필터링을 위한 몇 가지 기본 연산자를 지원합니다.

    +
      +
    • 비교 연산자 ==, !=, >, <, >=, <= 를 사용하면 숫자, 텍스트 또는 날짜 필드를 기준으로 필터링할 수 있습니다.

    • +
    • 범위 필터: INLIKE 은 특정 값 범위 또는 집합을 일치시키는 데 도움이 됩니다.

    • +
    • 산술 연산자: +, -, *, /, %, ** 은 숫자 필드와 관련된 계산에 사용됩니다.

    • +
    • 논리 연산자: AND, OR, NOT 은 여러 조건을 복잡한 표현식으로 결합합니다.

    • +
    +

    예시: 색상별 필터링

    스칼라 필드 color 에서 원색(빨강, 녹색 또는 파랑)을 가진 엔티티를 찾으려면 다음 필터 표현식을 사용합니다.

    +
    filter='color in ["red", "green", "blue"]'​
    +
    +
    +

    예시: JSON 필드 필터링

    Milvus에서는 JSON 필드에서 키를 참조할 수 있습니다. 예를 들어 키가 pricemodel 인 JSON 필드 product 가 있고 특정 모델과 가격이 1,850보다 낮은 제품을 찾고자 하는 경우 다음 필터 표현식을 사용합니다.

    +
    filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
    +
    +
    +

    예시: 배열 필드 필터링

    온도 기록이 포함된 배열 필드 history_temperatures 가 있고 10번째 기록 온도가 23°C를 초과하는 관측소를 찾고자 하는 경우 이 표현식을 사용합니다.

    +
    filter='history_temperatures[10] > 23'​
    +
    +
    +

    이러한 기본 연산자에 대한 자세한 내용은 기본 연산자를 참조하세요.

    +

    필터 표현식 템플릿

    한중일 문자를 사용하여 필터링하는 경우, 더 큰 문자 집합과 인코딩 차이로 인해 처리가 더 복잡해질 수 있습니다. 이로 인해 특히 IN 연산자의 경우 성능이 느려질 수 있습니다.

    +

    Milvus는 한중일 문자로 작업할 때 성능을 최적화하기 위해 필터 표현식 템플릿을 도입했습니다. 필터 표현식에서 동적 값을 분리함으로써 쿼리 엔진이 매개변수 삽입을 보다 효율적으로 처리합니다.

    +

    예제

    '北京'(베이징) 또는 '上海'(상하이)에 거주하는 25세 이상의 개인을 찾으려면 다음 템플릿 표현식을 사용합니다.

    +
    filter = "age > 25 AND city IN ['北京', '上海']"​
    +
    +
    +

    성능을 향상시키려면 이 변형을 매개변수와 함께 사용합니다.

    +
    filter = "age > {age} AND city in {city}",​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    이 접근 방식은 구문 분석 오버헤드를 줄이고 쿼리 속도를 향상시킵니다. 자세한 내용은 필터 템플릿을 참조하세요.

    +

    데이터 유형별 연산자

    Milvus는 JSON, ARRAY, VARCHAR 필드와 같은 특정 데이터 유형에 대한 고급 필터링 연산자를 제공합니다.

    +

    JSON 필드별 연산자

    Milvus는 JSON 필드 쿼리를 위한 고급 연산자를 제공하여 복잡한 JSON 구조 내에서 정밀한 필터링을 가능하게 합니다.

    +

    **JSON_CONTAINS(identifier, jsonExpr)**: 필드에 JSON 표현식이 존재하는지 확인합니다.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains(tags, "sale")'​
    +
    +
    +

    **JSON_CONTAINS_ALL(identifier, jsonExpr)**: JSON 표현식의 모든 요소가 존재하는지 확인합니다.

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    **JSON_CONTAINS_ANY(identifier, jsonExpr)**: JSON 표현식에 요소가 하나 이상 존재하는 엔티티를 필터링합니다.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    JSON 연산자에 대한 자세한 내용은 JSON 연산자를 참조하세요.

    +

    배열 필드별 연산자

    Milvus는 배열 데이터를 세밀하게 제어할 수 있는 ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY, ARRAY_LENGTH 와 같은 배열 필드에 대한 고급 필터링 연산자를 제공합니다.

    +

    **ARRAY_CONTAINS**: 특정 요소를 포함하는 엔티티를 필터링합니다.

    +
    filter="ARRAY_CONTAINS(history_temperatures, 23)"​
    +
    +
    +

    **ARRAY_CONTAINS_ALL**: 목록의 모든 요소가 있는 엔티티를 필터링합니다.

    +
    filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_CONTAINS_ANY**: 목록의 모든 요소를 포함하는 엔터티를 필터링합니다.

    +
    filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_LENGTH**: 배열의 길이를 기준으로 필터링합니다.

    +
    filter="ARRAY_LENGTH(history_temperatures) < 10"​
    +
    +
    +

    배열 연산자에 대한 자세한 내용은 배열 연산자를 참조하십시오.

    +

    VARCHAR 필드별 연산자

    **Text_Match** 연산자를 사용하면 특정 쿼리 용어를 기반으로 정확한 문서 검색이 가능합니다. 스칼라 필터와 벡터 유사도 검색을 결합하는 필터링 검색에 특히 유용합니다. 시맨틱 검색과 달리, 텍스트 일치는 정확한 용어 발생에 초점을 맞춥니다.

    +

    Milvus는 Tantivy를 사용해 역 인덱싱과 용어 기반 텍스트 검색을 지원합니다. 프로세스에는 다음이 포함됩니다.

    +
      +
    1. 분석기: 입력 텍스트를 토큰화하여 처리합니다.

    2. +
    3. 인덱싱: 고유 토큰을 문서에 매핑하는 역 인덱스를 생성합니다.

    4. +
    +

    자세한 내용은 텍스트 일치를 참조하세요.

    diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..c67458724 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"필터 템플릿","href":"Filter-Templating​","type":1,"isActive":false},{"label":"개요","href":"Overview​","type":2,"isActive":false},{"label":"검색 작업","href":"Search-Operations​","type":2,"isActive":false},{"label":"쿼리 연산","href":"Query-Operations​","type":2,"isActive":false},{"label":"삭제 작업","href":"Delete-Operations​","type":2,"isActive":false},{"label":"결론","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..a7318a182 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,152 @@ +--- +id: filtering-templating.md +summary: >- + Milvus에서 수많은 요소가 포함된 복잡한 필터 표현식, 특히 CJK 문자와 같은 비 ASCII 문자가 포함된 표현식은 쿼리 성능에 큰 + 영향을 미칠 수 있습니다. 이 문제를 해결하기 위해 Milvus는 복잡한 표현식을 구문 분석하는 데 소요되는 시간을 줄여 효율성을 개선하도록 + 설계된 필터 표현식 템플릿 메커니즘을 도입했습니다. 이 페이지에서는 검색, 쿼리 및 삭제 작업에서 필터 표현식 템플릿을 사용하는 방법에 대해 + 설명합니다. +title: 필터링 템플릿 +--- +

    필터 템플릿

    Milvus에서 수많은 요소가 포함된 복잡한 필터 표현식, 특히 CJK 문자와 같은 비 ASCII 문자가 포함된 표현식은 쿼리 성능에 큰 영향을 미칠 수 있습니다. 이 문제를 해결하기 위해 Milvus는 복잡한 표현식을 구문 분석하는 데 소요되는 시간을 줄여 효율성을 개선하도록 설계된 필터 표현식 템플릿 메커니즘을 도입했습니다. 이 페이지에서는 검색, 쿼리 및 삭제 작업에서 필터 표현식 템플릿을 사용하는 방법에 대해 설명합니다.

    +

    개요

    필터 표현식 템플릿을 사용하면 쿼리 실행 중에 값으로 동적으로 대체할 수 있는 자리 표시자를 사용하여 필터 표현식을 만들 수 있습니다. 템플릿을 사용하면 큰 배열이나 복잡한 표현식을 필터에 직접 포함하지 않아도 되므로 구문 분석 시간이 단축되고 쿼리 성능이 향상됩니다.

    +

    agecity 이라는 두 개의 필드가 포함된 필터 표현식이 있고, 나이가 25세 이상이고 '北京'(베이징) 또는 '上海'(상하이)에 거주하는 모든 사람을 찾고자 한다고 가정해 보겠습니다. 필터 표현식에 값을 직접 포함하는 대신 템플릿을 사용할 수 있습니다.

    +
    filter = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    여기서 {age}{city} 은 쿼리가 실행될 때 filter_params 의 실제 값으로 대체되는 자리 표시자입니다.

    +

    Milvus에서 필터 표현식 템플릿을 사용하면 몇 가지 주요 이점이 있습니다.

    +
      +
    • 구문분석 시간 단축: 크거나 복잡한 필터 표현식을 자리 표시자로 대체함으로써 시스템에서 필터를 구문 분석하고 처리하는 데 소요되는 시간을 줄일 수 있습니다.

    • +
    • 쿼리 성능 향상: 구문 분석 오버헤드가 줄어들면 쿼리 성능이 향상되어 QPS가 높아지고 응답 시간이 빨라집니다.

    • +
    • 확장성: 데이터 세트가 증가하고 필터 표현식이 더 복잡해져도 템플릿을 사용하면 효율적이고 확장 가능한 성능을 유지할 수 있습니다.

    • +
    +

    검색 작업

    Milvus의 검색 작업에서 filter 표현식은 필터링 조건을 정의하는 데 사용되며, filter_params 매개변수는 자리 표시자의 값을 지정하는 데 사용됩니다. filter_params 사전에는 Milvus가 필터 표현식으로 대체하는 데 사용할 동적 값이 포함되어 있습니다.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.search(​
    +    "hello_milvus",​
    +    vectors[:nq],​
    +    filter=expr,​
    +    limit=10,​
    +    output_fields=["age", "city"],​
    +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
    +    filter_params=filter_params,​
    +)​
    +
    +
    +

    이 예제에서는 검색을 실행할 때 Milvus가 {age}25 으로, {city}["北京", "上海"] 으로 동적으로 대체합니다.

    +

    쿼리 연산

    Milvus의 쿼리 연산에도 동일한 템플릿 메커니즘을 적용할 수 있습니다. query 함수에서 필터 표현식을 정의하고 filter_params 을 사용하여 대체할 값을 지정합니다.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.query(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    output_fields=["age", "city"],​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    filter_params 을 사용하면 Milvus는 값의 동적 삽입을 효율적으로 처리하여 쿼리 실행 속도를 향상시킵니다.

    +

    삭제 작업

    삭제 작업에서도 필터 표현식 템플릿을 사용할 수 있습니다. 검색 및 쿼리와 마찬가지로 filter 식은 조건을 정의하고 filter_params 은 자리 표시자에 대한 동적 값을 제공합니다.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.delete(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    이 접근 방식은 특히 복잡한 필터 조건을 처리할 때 삭제 작업의 성능을 향상시킵니다.

    +

    결론

    필터 표현식 템플릿은 Milvus에서 쿼리 성능을 최적화하는 데 필수적인 도구입니다. 플레이스홀더와 filter_params 사전을 사용하면 복잡한 필터 표현식을 구문 분석하는 데 소요되는 시간을 크게 줄일 수 있습니다. 이는 쿼리 실행 속도와 전반적인 성능 향상으로 이어집니다.

    diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..494a5816c --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"JSON 연산자","href":"JSON-Operators​","type":1,"isActive":false},{"label":"사용 가능한 JSON 연산자","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_contains_all","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"json_cotains_any","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..64e2fce52 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,119 @@ +--- +id: json-operators.md +summary: >- + Milvus는 JSON 필드 쿼리 및 필터링을 위한 고급 연산자를 지원하므로 복잡한 구조화된 데이터를 관리하는 데 적합합니다. 이러한 + 연산자를 사용하면 JSON 문서를 매우 효과적으로 쿼리할 수 있으므로 JSON 필드 내의 특정 요소, 값 또는 조건에 따라 엔티티를 검색할 + 수 있습니다. 이 섹션에서는 Milvus에서 JSON 전용 연산자를 사용하는 방법을 안내하고, 그 기능을 설명하기 위한 실제 예제를 + 제공합니다. +title: JSON 연산자 +--- +

    JSON 연산자

    Milvus는 JSON 필드 쿼리 및 필터링을 위한 고급 연산자를 지원하므로 복잡한 구조화된 데이터를 관리하는 데 적합합니다. 이러한 연산자를 사용하면 JSON 문서를 매우 효과적으로 쿼리할 수 있으므로 JSON 필드 내의 특정 요소, 값 또는 조건에 따라 엔티티를 검색할 수 있습니다. 이 섹션에서는 Milvus에서 JSON 전용 연산자를 사용하는 방법을 안내하고, 그 기능을 설명하기 위한 실제 예제를 제공합니다.

    +
    +

    JSON 필드는 복잡한 중첩 구조를 처리할 수 없으며 모든 중첩 구조를 일반 문자열로 취급합니다. 따라서 JSON 필드로 작업할 때는 지나치게 깊은 중첩을 피하고 최적의 성능을 위해 데이터 구조가 가능한 한 평평한지 확인하는 것이 좋습니다.

    +
    +

    사용 가능한 JSON 연산자

    Milvus는 JSON 데이터를 필터링하고 쿼리하는 데 도움이 되는 몇 가지 강력한 JSON 연산자를 제공하며, 이러한 연산자는 다음과 같습니다.

    + +

    이러한 연산자를 예제를 통해 살펴보고 실제 시나리오에서 어떻게 적용될 수 있는지 알아보겠습니다.

    +

    JSON_CONTAINS

    json_contains 연산자는 JSON 필드 내에 특정 요소 또는 하위 배열이 존재하는지 확인합니다. JSON 배열이나 객체에 특정 값이 포함되어 있는지 확인하고자 할 때 유용합니다.

    +

    예제

    +

    각각 ["electronics", "sale", "new"] 과 같은 문자열의 JSON 배열을 포함하는 tags 필드가 있는 제품 컬렉션이 있다고 가정해 보겠습니다. "sale" 태그가 있는 제품을 필터링하려고 합니다.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains(tags, "sale")'​
    +
    +
    +

    이 예제에서 Milvus는 tags 필드에 "sale" 요소가 포함된 모든 제품을 반환합니다.

    +

    JSON_contains_all

    json_contains_all 연산자는 지정된 JSON 표현식의 모든 요소가 대상 필드에 있는지 확인합니다. 이 연산자는 JSON 배열 내에서 여러 값을 일치시켜야 할 때 특히 유용합니다.

    +

    예제

    +

    제품 태그 시나리오를 계속 진행하면서 "electronics", "sale", "new" 태그가 있는 모든 제품을 찾으려면 json_contains_all 연산자를 사용할 수 있습니다.

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    이 쿼리는 tags 배열에 지정된 세 가지 요소가 모두 포함된 모든 제품을 반환합니다: "electronics", "sale", "new" 을 모두 반환합니다.

    +

    json_cotains_any

    json_contains_any 연산자는 필드 내에 JSON 표현식의 멤버가 하나 이상 존재하는 엔티티를 필터링합니다. 이 연산자는 여러 가능한 값 중 하나를 기준으로 엔티티를 일치시키려는 경우에 유용합니다.

    +

    예제

    +

    "electronics", "sale", "new" 태그 중 하나 이상이 있는 제품을 필터링하고 싶다고 가정해 보겠습니다. json_contains_any 연산자를 사용하여 이를 수행할 수 있습니다.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    이 경우 Milvus는 목록에 ["electronics", "new", "clearance"] 태그 중 하나 이상의 태그가 있는 모든 제품을 반환합니다. 제품에 이러한 태그 중 하나만 있는 경우에도 결과에 포함됩니다.

    diff --git a/localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..86322f56d --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"개요","href":"Overview","type":2,"isActive":false},{"label":"홈","href":"Home","type":2,"isActive":false},{"label":"컬렉션","href":"Collections","type":2,"isActive":false},{"label":"쿼리","href":"Query","type":2,"isActive":false},{"label":"데이터","href":"Data","type":2,"isActive":false},{"label":"작업","href":"Tasks","type":2,"isActive":false},{"label":"느린 요청","href":"Slow-requests","type":2,"isActive":false},{"label":"구성","href":"Configurations","type":2,"isActive":false},{"label":"도구","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..2e48add14 --- /dev/null +++ b/localization/v2.5.x/site/ko/userGuide/tools/milvus-webui.md @@ -0,0 +1,279 @@ +--- +id: milvus-webui.md +summary: >- + Milvus 웹 UI는 Milvus를 위한 그래픽 관리 도구입니다. 간단하고 직관적인 인터페이스로 시스템 가시성을 향상시킵니다. 사용자는 + 다음을 수행할 수 있습니다. +title: Milvus WebUI +--- +

    Milvus WebUI

    Milvus Web UI는 Milvus를 위한 그래픽 관리 도구입니다. 간단하고 직관적인 인터페이스로 시스템 관찰성을 향상시킵니다. Milvus Web UI를 사용하여 Milvus의 구성 요소 및 종속성에 대한 통계와 메트릭을 관찰하고, 데이터베이스 및 수집 세부 정보를 확인하고, 자세한 Milvus 구성을 나열할 수 있습니다.

    +

    개요

    Milvus Web UI는 간단하고 직관적인 인터페이스로 전반적인 시스템 통합 가시성을 제공하는 기본 제공 도구라는 점에서 Birdwatcher 및 Attu와 다릅니다.

    +

    다음 표는 Milvus Web UI와 Birdwatcher/Attu의 기능을 비교한 것입니다:

    + + + + + + + + + + + +
    기능Milvus 웹 UIBirdwatcherAttu
    작동 형태GUICLIGUI
    대상 사용자유지 관리자, 개발자유지 관리자개발자
    설치빌트인독립 실행형 도구독립 실행형 도구
    종속성MilvusMilvus / etcdMilvus
    주요 기능런타임 환경, 데이터베이스/수집 세부 정보, 세그먼트, 채널, 작업 및 느린 쿼리 요청메타데이터 검사 및 Milvus API 실행데이터베이스 관리 및 운영 작업
    +

    Milvus 웹 UI는 다음과 같은 기능을 제공합니다:

    +

    + + Milvus Web UI overview + Milvus 웹 UI 개요

    +
      +
    • +

      현재 실행 중인 Milvus 인스턴스, 해당 구성 요소, 연결된 클라이언트, 종속성에 대한 정보를 확인할 수 있습니다.

    • +
    • 컬렉션

      +

      현재 Milvus에 있는 데이터베이스 및 컬렉션 목록을 보고 세부 정보를 확인할 수 있습니다.

    • +
    • 쿼리

      +

      쿼리 노드 및 쿼리 코디네이터의 수집 통계를 세그먼트, 채널, 리플리카, 리소스 그룹별로 확인할 수 있습니다.

    • +
    • 데이터

      +

      데이터 노드의 수집 통계를 세그먼트와 채널별로 조회할 수 있습니다.

    • +
    • 작업

      +

      쿼리 코디네이터 스케줄러 작업, 압축 작업, 인덱스 구축 작업, 가져오기 작업, 데이터 동기화 작업 등 Milvus에서 실행 중인 작업 목록을 확인할 수 있습니다.

    • +
    • 느린 요청

      +

      요청 유형, 요청 기간, 요청 매개변수를 포함하여 Milvus에서 느린 요청 목록을 볼 수 있습니다.

    • +
    • 구성

      +

      Milvus 구성 목록과 해당 값을 볼 수 있습니다.

    • +
    • 도구

      +

      웹 UI에서 두 가지 기본 제공 도구인 pprof와 Milvus 데이터 시각화 도구에 액세스할 수 있습니다.

    • +
    +

    홈 페이지에서는 다음과 같은 정보를 확인할 수 있습니다:

    +

    + + Milvus Web UI Home + Milvus 웹 UI 홈

    +
      +
    • 시스템 정보: 배포 모드, 배포에 사용된 이미지 및 관련 정보를 포함한 시스템 정보를 볼 수 있습니다.

    • +
    • 컴포넌트 정보: 쿼리 노드, 데이터 노드, 인덱스 노드, 코디네이터 및 프록시의 상태와 메트릭을 포함하여 Milvus의 구성 요소의 상태와 메트릭을 확인합니다.

    • +
    • 연결된 클라이언트: 연결된 클라이언트와 SDK 유형 및 버전, 사용자 이름, 액세스 기록 등 해당 정보를 볼 수 있습니다.

    • +
    • 시스템 종속성: 메타 저장소, 메시지 큐 및 개체 저장소의 상태 및 메트릭을 포함하여 Milvus의 종속성 상태 및 메트릭을 봅니다.

    • +
    +

    컬렉션

    컬렉션 페이지에서는 현재 Milvus에 있는 데이터베이스 및 컬렉션 목록을 보고 세부 정보를 확인할 수 있습니다.

    +

    + + Milvus Web UI Collections + Milvus 웹 UI 컬렉션

    +
      +
    • 데이터베이스: 현재 Milvus에 있는 데이터베이스 목록과 세부 정보를 확인할 수 있습니다.

    • +
    • 컬렉션: 각 데이터베이스의 컬렉션 목록과 상세 정보를 확인할 수 있습니다.

    • +
    +

    쿼리

    + + Milvus Web UI Query Page + Milvus 웹 UI 쿼리 페이지

    +
      +
    • 세그먼트: 세그먼트 목록과 세그먼트 ID, 해당 컬렉션, 상태, 크기 등의 세부 정보를 볼 수 있습니다.

      +

      출발지 열에서 세그먼트의 출처를 찾을 수 있습니다. 가능한 소스 표시기는 다음과 같습니다:

      +
        +
      • QN: 쿼리 노드

      • +
      • CT: QueryCoord의 현재 대상

      • +
      • NT: QueryCoord의 다음 대상

      • +
      • DIST: QueryCoord 내 분포

      • +
    • +
    • 채널: 채널 목록과 채널 이름, 해당 컬렉션 등 채널의 세부 정보를 볼 수 있습니다.

      +

      출발지 열에서 세그먼트의 출처를 찾을 수 있습니다. 가능한 소스 표시기는 다음과 같습니다:

      +
        +
      • QN: 쿼리 노드

      • +
      • CT: QueryCoord의 현재 대상

      • +
      • NT: QueryCoord의 다음 대상

      • +
      • DIST: QueryCoord 내 분포

      • +
    • +
    • 복제본: 복제본 목록과 복제본 ID, 해당 컬렉션 등 세부 정보를 볼 수 있습니다.

    • +
    • 리소스 그룹: 리소스 그룹 목록과 리소스 그룹 이름, 그룹의 쿼리 노드 수, 구성 등을 포함한 세부 정보를 볼 수 있습니다.

    • +
    +

    데이터

    + + Milvus Web UI Data Page + Milvus 웹 UI 데이터 페이지

    +
      +
    • 세그먼트: 데이터 노드/코디네이터의 세그먼트 목록과 세그먼트 ID, 해당 컬렉션, 상태, 크기 등 세부 정보를 볼 수 있습니다.

    • +
    • 채널: 채널: 데이터 노드/코디네이터의 채널 목록과 채널 이름, 해당 컬렉션 등 세부 정보를 확인합니다.

    • +
    +

    작업

    + + Milvus Web UI Tasks Page + Milvus 웹 UI 작업 페이지

    +
      +
    • 작업: 작업 유형, 상태 및 작업을 포함하여 Milvus에서 실행 중인 작업 목록을 볼 수 있습니다.

      +
        +
      • QueryCoord 작업: 지난 15분 동안의 밸런서, 인덱스/세그먼트/채널/리더 검사기를 포함한 모든 QueryCoord 스케줄러 작업을 봅니다.

      • +
      • 압축 작업: 지난 15분 동안 데이터 코디네이터의 모든 압축 작업을 봅니다.

      • +
      • 인덱스 구축 작업: 지난 30분 동안 데이터 코디네이터가 수행한 모든 인덱스 구축 작업을 볼 수 있습니다.

      • +
      • 가져오기 작업: 지난 30분 동안 데이터 코디네이터가 수행한 모든 가져오기 작업을 봅니다.

      • +
      • 데이터 동기화 작업: 지난 15분 동안 데이터 노드에서 발생한 모든 데이터 동기화 작업을 봅니다.

      • +
    • +
    +

    느린 요청

    + + Milvus Web UI Slow Requests Page + Milvus 웹 UI 느린 요청 페이지

    +
      +
    • 느린 요청: 느린 요청은 구성에 지정된 proxy.slowQuerySpanInSeconds 값보다 지연 시간이 긴 검색 또는 쿼리입니다. 느린 요청 목록에는 지난 15분 동안의 모든 느린 요청이 표시됩니다.
    • +
    +

    구성

    + + Milvus Web UI Configurations Page + Milvus 웹 UI 구성 페이지

    +
      +
    • 구성: Milvus 런타임 구성 목록과 해당 값을 볼 수 있습니다.
    • +
    +

    도구

      +
    • pprof: Milvus 프로파일링 및 디버깅을 위한 pprof 도구에 액세스합니다.

    • +
    • Milvus 데이터 시각화 도구: Milvus의 데이터를 시각화하기 위한 Milvus 데이터 시각화 도구에 액세스합니다.

    • +
    diff --git a/localization/v2.5.x/site/pt/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/pt/adminGuide/config_jaeger_tracing.md index 51f409a0c..ed9197e18 100644 --- a/localization/v2.5.x/site/pt/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/pt/adminGuide/config_jaeger_tracing.md @@ -67,7 +67,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
    -

    2. Implantar o Jager

    A maneira mais simples possível de criar uma instância do Jaeger é criando um arquivo YAML como o exemplo a seguir. Isso instalará a estratégia AllInOne padrão, que implanta a imagem all-in-one (combinando jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) em um único pod, usando o armazenamento na memória por padrão.

    +

    2. Implantar o Jaeger

    A maneira mais simples possível de criar uma instância do Jaeger é criando um arquivo YAML como o exemplo a seguir. Isso instalará a estratégia AllInOne padrão, que implanta a imagem all-in-one (combinando jaeger-agent, jaeger-collector, jaeger-query e Jaeger UI) em um único pod, usando o armazenamento na memória por padrão.

    Se você quiser armazenar traços por um longo tempo, consulte production-strategy.

    apiVersion: jaegertracing.io/v1
     kind: Jaeger
    diff --git a/localization/v2.5.x/site/pt/adminGuide/configure-docker.json b/localization/v2.5.x/site/pt/adminGuide/configure-docker.json
    index c69dd4245..e37669971 100644
    --- a/localization/v2.5.x/site/pt/adminGuide/configure-docker.json
    +++ b/localization/v2.5.x/site/pt/adminGuide/configure-docker.json
    @@ -1 +1 @@
    -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurar o Milvus com o Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Descarregar um ficheiro de configuração","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modificar o ficheiro de configuração","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Descarregar um ficheiro de instalação","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modificar o ficheiro de instalação","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Iniciar o Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"Configurar o Milvus com o Docker Compose","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"Descarregar um ficheiro de configuração","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"Modificar o ficheiro de configuração","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"Descarregar um ficheiro de instalação","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"Modificar o ficheiro de instalação","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"Iniciar o Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/pt/adminGuide/configure-docker.md b/localization/v2.5.x/site/pt/adminGuide/configure-docker.md
    index 8b012621f..189ddc490 100644
    --- a/localization/v2.5.x/site/pt/adminGuide/configure-docker.md
    +++ b/localization/v2.5.x/site/pt/adminGuide/configure-docker.md
    @@ -38,8 +38,8 @@ Na versão atual, todos os parâmetros entram em vigor somente após o reinício
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Faça o download de milvus.yaml diretamente ou com o seguinte comando.

    -
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
    +    

    Faça o download de milvus.yaml diretamente ou com o seguinte comando.

    +
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
     

    Modificar o ficheiro de configuração

    Configure a sua instância do Milvus de acordo com os cenários da sua aplicação, ajustando os parâmetros correspondentes em milvus.yaml.

    +

    Configure a sua instância Milvus de acordo com os cenários da sua aplicação, ajustando os parâmetros correspondentes em milvus.yaml.

    Consulte as ligações seguintes para obter mais informações sobre cada parâmetro.

    Ordenado por:

    @@ -211,10 +211,10 @@ Na versão atual, todos os parâmetros entram em vigor somente após o reinício d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    Descarregue o ficheiro de instalação do Milvus standalone e guarde-o como docker-compose.yml.

    +

    Descarregue o ficheiro de instalação do Milvus standalone e guarde-o como docker-compose.yml.

    Também pode simplesmente executar o seguinte comando.

    # For Milvus standalone
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     

    Modificar o ficheiro de instalação

    Para garantir a segurança dos dados, recomenda-se que elimine os utilizadores e as funções que já não estão a ser utilizados. Este guia apresenta a forma de eliminar utilizadores e funções.

    +

    Eliminar um utilizador

    O exemplo seguinte demonstra como eliminar o utilizador user_1.

    +
    +

    O utilizador root não pode ser eliminado.

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +# create a user​
    +client.drop_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig​
    +import io.milvus.v2.client.MilvusClientV2​
    +import io.milvus.v2.service.rbac.request.DropUserReq​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +DropUserReq dropUserReq = DropUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +client.dropUser(dropUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.deleteUser({​
    +    username: 'user_1'​
    +})​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    Assim que o utilizador for eliminado, pode listar todos os utilizadores existentes para verificar se a operação de eliminação foi bem sucedida.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.listUsersReq​
    +​
    +List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listUsers()​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Abaixo está um exemplo de saída. Não há user_1 na lista. A operação de eliminação foi bem-sucedida.

    +
    ['root']​
    +
    +
    +

    Eliminar uma função

    O exemplo seguinte demonstra como eliminar a função role_a.

    +
    +

    A função incorporada admin não pode ser eliminada.

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.drop_role(role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropRoleReq​
    +​
    +DropRoleReq dropRoleReq = DropRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +client.dropRole(dropRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.dropRole({​
    +   roleName: 'role_a',​
    + })​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    Assim que a função for eliminada, pode listar todas as funções existentes para verificar se a operação de eliminação foi bem sucedida.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> resp = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listRoles(​
    +    includeUserInfo: True​
    +)​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Abaixo está um exemplo de saída. Não há role_a na lista. A operação de eliminação foi bem-sucedida.

    +
    ['admin']​
    +
    +
    diff --git a/localization/v2.5.x/site/pt/adminGuide/grant_privileges.json b/localization/v2.5.x/site/pt/adminGuide/grant_privileges.json new file mode 100644 index 000000000..12eae5dc7 --- /dev/null +++ b/localization/v2.5.x/site/pt/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"Conceder privilégios ou grupos de privilégios a funções","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"Conceder um privilégio ou um grupo de privilégios a uma função","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"Descrever uma função","href":"Describe-a-role","type":2,"isActive":false},{"label":"Revogar um privilégio ou um grupo de privilégios de uma função","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/grant_privileges.md b/localization/v2.5.x/site/pt/adminGuide/grant_privileges.md new file mode 100644 index 000000000..fef8812bd --- /dev/null +++ b/localization/v2.5.x/site/pt/adminGuide/grant_privileges.md @@ -0,0 +1,543 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: >- + Uma vez criada uma função, pode conceder privilégios à mesma. Este guia + apresenta a forma de conceder privilégios ou grupos de privilégios a uma + função. +title: Conceder privilégios ou grupos de privilégios a funções +--- +

    Conceder privilégios ou grupos de privilégios a funções

    Uma vez criada uma função, pode conceder privilégios à mesma. Este guia apresenta a forma de conceder privilégios ou grupos de privilégios a uma função.

    +

    Conceder um privilégio ou um grupo de privilégios a uma função

    O Milvus 2.5 introduz uma nova versão da API que simplifica a operação de concessão. Já não é necessário procurar o tipo de objeto quando se concede um privilégio a uma função. Seguem-se os parâmetros e as respectivas explicações.

    +
      +
    • nome_da_função: o nome da função de destino à qual devem ser concedidos privilégios ou grupos de privilégios.

    • +
    • Recurso: O recurso de destino de um privilégio, que pode ser uma instância específica, um banco de dados ou uma coleção. A tabela a seguir explica como especificar o recurso no método client.grantV2().

    • +
    +

    Nível

    +

    Recurso

    +

    Método de concessão

    +

    Notas

    +

    Coleção

    +

    +

    Uma coleção específica

    +

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

    +

    Introduza o nome da coleção de destino e o nome da base de dados à qual a coleção de destino pertence.

    +

    +

    Todas as colecções numa base de dados específica

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

    +

    Introduza o nome da sua base de dados de destino e um wildcard `*` como o nome da coleção.

    +

    **Base de dados**

    +

    Uma base de dados específica

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

    +

    Introduza o nome da sua base de dados de destino e um wildcard `*` como nome da coleção.

    +

    +

    Todas as bases de dados na instância atual

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

    +

    Introduza `*` como o nome da base de dados e `*` como o nome da coleção.

    +

    **Instância**

    +

    A instância atual

    +

    client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

    +

    Introduza `*` como o nome da base de dados e `*` como o nome da coleção.

    +
    +
      +
    • Privilégio: O privilégio específico ou o grupo de privilégios que é necessário conceder a uma função. Atualmente, o Milvus disponibiliza 56 tipos de privilégios que podem ser concedidos. A tabela abaixo lista os privilégios no Milvus.

      +

      +

      A coluna do tipo na tabela abaixo é utilizada para facilitar a pesquisa rápida de privilégios e é utilizada apenas para fins de classificação. Ao conceder privilégios, não precisa de compreender os tipos. Só precisa de introduzir os privilégios correspondentes.

      +

    • +
    +

    **Tipo

    +

    **Privilégio

    +

    **Descrição**

    +

    **Descrição da API relevante no lado do cliente

    +

    Privilégios da base de dados

    +

    Listar bases de dados

    +

    Ver todas as bases de dados na instância atual

    +

    [ListDatabases](https://milvus.io/docs/manage_databases.md)

    +

    DescreverBase de Dados

    +

    Ver os detalhes de uma base de dados

    +

    [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

    +

    CriarBase de Dados

    +

    Criar uma base de dados

    +

    [CreateDatabase](https://milvus.io/docs/manage_databases.md)

    +

    DropDatabase

    +

    Eliminar uma base de dados

    +

    [DropDatabase](https://milvus.io/docs/manage_databases.md)

    +

    Alterar base de dados

    +

    Modificar as propriedades de uma base de dados

    +

    [AlterDatabase](https://milvus.io/docs/manage_databases.md)

    +

    Privilégios de coleção

    +

    +

    GetFlushState

    +

    Verificar o estado da operação de descarga da coleção

    +

    [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    GetLoadState

    +

    Verificar o estado de carregamento de uma coleção

    +

    [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    GetLoadingProgress

    +

    Verificar o progresso do carregamento de uma coleção

    +

    [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

    +

    Mostrar colecções

    +

    Ver todas as colecções com privilégios de coleção

    +

    [ShowCollections](https://milvus.io/docs/view-collections.md)

    +

    ListAliases

    +

    Ver todos os nomes alternativos de uma coleção

    +

    [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

    +

    Descrever coleção

    +

    Ver os detalhes de uma coleção

    +

    [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

    +

    DescreverAlias

    +

    Ver os detalhes de um alias

    +

    [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

    +

    Obter estatísticas

    +

    Obter as estatísticas de uma coleção (por exemplo, o número de entidades numa coleção)

    +

    [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

    +

    Criar coleção

    +

    Criar uma coleção

    +

    [CreateCollection](https://milvus.io/docs/create-collection.md)

    +

    Soltar coleção

    +

    Eliminar uma coleção

    +

    [DropCollection](https://milvus.io/docs/drop-collection.md)

    +

    Carregar

    +

    Carregar uma coleção

    +

    [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    Libertação

    +

    Libertar uma coleção

    +

    [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

    +

    Descarregar

    +

    +

    Persiste todas as entidades de uma coleção num segmento selado. Qualquer entidade inserida após a operação de flush será armazenada num novo segmento.

    +

    [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    Compactação

    +

    Ativar manualmente a compactação

    +

    [Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

    +

    Renomear coleção

    +

    Mudar o nome de uma coleção

    +

    [RenameCollection](https://milvus.io/docs/modify-collection.md)

    +

    CriarAlias

    +

    Criar um pseudónimo para uma coleção

    +

    [CreateAlias](https://milvus.io/docs/manage-aliases.md)

    +

    EliminarAlias

    +

    Eliminar o nome alternativo de uma coleção

    +

    [DropAlias](https://milvus.io/docs/manage-aliases.md)

    +

    FlushAll

    +

    Eliminar todas as colecções de uma base de dados

    +

    [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

    +

    Privilégios de partição

    +

    HasPartition

    +

    Verifica se existe uma partição

    +

    [HasPartition](https://milvus.io/docs/manage-partitions.md)

    +

    MostrarPartições

    +

    Ver todas as partições de uma coleção

    +

    [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

    +

    CriarPartição

    +

    Criar uma partição

    +

    [CreatePartition](https://milvus.io/docs/manage-partitions.md)

    +

    SoltarPartição

    +

    Eliminar uma partição

    +

    [DropPartition](https://milvus.io/docs/manage-partitions.md)

    +

    Privilégios do índice

    +

    Detalhes do índice

    +

    Ver os detalhes de um índice

    +

    +

    [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vetor-fields.md?tab=floating)

    +

    CriarIndex

    +

    Criar um índice

    +

    [CreateIndex](https://milvus.io/docs/index-vetor-fields.md?tab=floating)

    +

    DropIndex

    +

    Eliminar um índice

    +

    [DropIndex](https://milvus.io/docs/index-vetor-fields.md?tab=floating)

    +

    Privilégios de gestão de recursos

    +

    +

    LoadBalance

    +

    Alcançar o equilíbrio de carga

    +

    [LoadBalance](https://milvus.io/docs/resource_group.md)

    +

    CreateResourceGroup (Criar grupo de recursos)

    +

    Criar um grupo de recursos

    +

    [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

    +

    DropResourceGroup

    +

    Eliminar um grupo de recursos

    +

    [DropResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    UpdateResourceGroups (Atualizar grupos de recursos)

    +

    Atualizar um grupo de recursos

    +

    [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    DescreverGrupo de Recursos

    +

    Ver os pormenores de um grupo de recursos

    +

    [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    ListResourceGroups

    +

    Ver todos os grupos de recursos da instância atual

    +

    [ListResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    TransferNode

    +

    Transferir nós entre grupos de recursos

    +

    [TransferNode](https://milvus.io/docs/resource_group.md)

    +

    TransferReplica

    +

    Transferir réplicas entre grupos de recursos

    +

    [TransferReplica](https://milvus.io/docs/resource_group.md)

    +

    BackupRBAC

    +

    Criar uma cópia de segurança para todas as operações relacionadas com RBAC na instância atual

    +

    Cópia de segurançaRBAC

    +

    RestaurarRBAC

    +

    Restaurar uma cópia de segurança de todas as operações relacionadas com o RBAC na instância atual

    +

    RestaurarRBAC

    +

    Privilégios da entidade

    +

    +

    Consulta

    +

    Efetuar uma consulta

    +

    [Consulta](https://milvus.io/docs/get-and-scalar-query.md)

    +

    Pesquisa

    +

    Efetuar uma pesquisa

    +

    [Pesquisar](https://milvus.io/docs/single-vetor-search.md)

    +

    Inserir

    +

    Inserir entidades

    +

    [Inserir](https://milvus.io/docs/insert-update-delete.md)

    +

    Eliminar

    +

    Eliminar entidades

    +

    [Eliminar](https://milvus.io/docs/delete-entities.md)

    +

    Upsert

    +

    Inserir entidades

    +

    [Upsert](https://milvus.io/docs/upsert-entities.md)

    +

    Importar

    +

    Inserir ou importar entidades em massa

    +

    [BulkInsert/Import](https://milvus.io/docs/import-data.md)

    +

    Privilégios RBAC

    +

    CriarPropriedade

    +

    Criar um utilizador ou uma função

    +

    [CreateUser/CreateRole](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    UpdateUser (Atualizar utilizador)

    +

    Atualizar a palavra-passe de um utilizador

    +

    [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    DropOwnership

    +

    Eliminar a palavra-passe de um utilizador ou uma função

    +

    [DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

    +

    SeleccionarPropriedade

    +

    Ver todos os utilizadores a quem foi atribuída uma função específica

    +

    [SelectRole/SelectGrant](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    GerirPropriedade

    +

    Gerir um utilizador ou uma função ou atribuir uma função a um utilizador

    +

    [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    SeleccionarUtilizador

    +

    Ver todas as funções atribuídas a um utilizador

    +

    [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    Criar grupo de privilégios

    +

    Criar um grupo de privilégios

    +

    [CreatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    DropPrivilegeGroup (Abandonar grupo de privilégios)

    +

    Eliminar um grupo de privilégios

    +

    [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    ListPrivilegeGroups

    +

    Ver todos os grupos de privilégios na instância atual

    +

    [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    OperatePrivilegeGroup (Operar grupo de privilégios)

    +

    Adicionar privilégios a um grupo de privilégios ou remover privilégios de um grupo de privilégios

    +

    [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +
    +

    O exemplo a seguir demonstra como conceder o privilégio PrivilegeSearch em collection_01 no banco de dados padrão, bem como um grupo de privilégios chamado privilege_group_1 para a função role_a.

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +const address = "http://localhost:19530";
    +const token = "root:Milvus";
    +const client = new MilvusClient({address, token});
    +
    +await milvusClient.grantPrivilege({
    +   roleName: 'role_a',
    +   object: 'Collection', 
    +   objectName: 'collection_01',
    +   privilegeName: 'Search'
    + });
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "privilege_group_1",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    +

    Descrever uma função

    O exemplo a seguir demonstra como visualizar os privilégios concedidos à função role_a usando o método describe_role.

    + +
    from pymilvus import MilvusClient
    +
    +client.describe_role(role_name="role_a")
    +
    +
    import io.milvus.v2.service.rbac.response.DescribeRoleResp;
    +import io.milvus.v2.service.rbac.request.DescribeRoleReq
    +
    +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
    +        .roleName("role_a")
    +        .build();
    +DescribeRoleResp resp = client.describeRole(describeRoleReq);
    +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.ListRoles(context.Background())
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +await milvusClient.describeRole({roleName: 'role_a'});
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a"
    +}'
    +
    +

    Abaixo está um exemplo de saída.

    +
    {
    +     "role": "role_a",
    +     "privileges": [
    +         {
    +             "collection_name": "collection_01",
    +             "db_name": "default",
    +             "role_name": "role_a",
    +             "privilege": "Search",
    +             "grantor_name": "root"
    +         },
    +         "privilege_group_1"
    +     ]
    +}
    +
    +

    Revogar um privilégio ou um grupo de privilégios de uma função

    O exemplo a seguir demonstra como revogar o privilégio PrivilegeSearch em collection_01 no banco de dados padrão, bem como o grupo de privilégios privilege_group_1 que foram concedidos à função role_a.

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    diff --git a/localization/v2.5.x/site/pt/adminGuide/grant_roles.json b/localization/v2.5.x/site/pt/adminGuide/grant_roles.json new file mode 100644 index 000000000..b6b01a0c9 --- /dev/null +++ b/localization/v2.5.x/site/pt/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"Conceder funções aos utilizadores","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"Atribuir uma função a um utilizador","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"Descrever o utilizador","href":"Describe-user​","type":2,"isActive":false},{"label":"Revogar uma função","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/grant_roles.md b/localization/v2.5.x/site/pt/adminGuide/grant_roles.md new file mode 100644 index 000000000..2db3e4395 --- /dev/null +++ b/localization/v2.5.x/site/pt/adminGuide/grant_roles.md @@ -0,0 +1,204 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + Depois de criar uma função e conceder privilégios à função, pode conceder a + função aos utilizadores para que estes possam aceder a recursos e executar + acções definidas pela função. É possível conceder várias funções a um + utilizador ou conceder uma função a vários utilizadores. Este guia apresenta a + forma de conceder funções aos utilizadores. +title: Conceder funções aos utilizadores +--- +

    Conceder funções aos utilizadores

    Depois de criar uma função e conceder privilégios à função, pode conceder a função aos utilizadores para que estes possam aceder a recursos e executar acções definidas pela função. É possível conceder várias funções a um utilizador ou conceder uma função a vários utilizadores. Este guia apresenta a forma de conceder funções aos utilizadores.

    +

    Ao utilizador interno root do Milvus já foi atribuída a função admin, que tem todos os privilégios. Não é necessário atribuir-lhe quaisquer outros papéis.

    +

    Atribuir uma função a um utilizador

    O exemplo seguinte demonstra como atribuir a função role_a ao utilizador user_1.

    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.grant_role(user_name="user_1", role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
    +​
    +String CLUSTER_ENDPOINT = "http://localhost:19530";​
    +String TOKEN = "root:Milvus";​
    +​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +    .uri(CLUSTER_ENDPOINT)​
    +    .token(TOKEN)​
    +    .build();​
    +    ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
    +        .roleName("role_a")​
    +        .userName("user_1")​
    +        .build();​
    +client.grantRole(grantRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.grantRole({​
    +   username: 'user_1',​
    +   roleName: 'role_a'​
    + })​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a",​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    Descrever o utilizador

    Depois de atribuir uma função a um utilizador, pode verificar se a operação de atribuição foi bem sucedida através do método describe_user().

    +

    O exemplo seguinte demonstra como verificar a(s) função(ões) do utilizador user_1.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.describe_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DescribeUserReq;​
    +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
    +​
    +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.describeUser({username: 'user_1'})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    Abaixo está um exemplo de saída.

    +
    {'user_name': 'user_1', 'roles': 'role_a'}​
    +
    +
    +

    Revogar uma função

    Também é possível revogar uma função que tenha sido atribuída a um utilizador.

    +

    O exemplo seguinte demonstra como revogar a função role_a atribuída ao utilizador user_1.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.revoke_role(​
    +    user_name='user_1',​
    +    role_name='role_a'​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
    +​
    +client.revokeRole(RevokeRoleReq.builder()​
    +        .userName("user_1")​
    +        .roleName("role_a")​
    +        .build());​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/pt/adminGuide/privilege_group.json b/localization/v2.5.x/site/pt/adminGuide/privilege_group.json new file mode 100644 index 000000000..7c79868ca --- /dev/null +++ b/localization/v2.5.x/site/pt/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"Criar um grupo de privilégios","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"Grupo de privilégios vs. privilégios","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"Grupos de privilégios incorporados","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"Procedimentos","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/privilege_group.md b/localization/v2.5.x/site/pt/adminGuide/privilege_group.md new file mode 100644 index 000000000..a1dd89fa4 --- /dev/null +++ b/localization/v2.5.x/site/pt/adminGuide/privilege_group.md @@ -0,0 +1,491 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: >- + Para simplificar o processo de concessão de privilégios, recomenda-se que + combine vários privilégios num grupo de privilégios. +title: Criar grupo de privilégios +--- +

    Criar um grupo de privilégios

    Para simplificar o processo de concessão de privilégios, recomenda-se que combine vários privilégios num grupo de privilégios.

    +

    Grupo de privilégios vs. privilégios

    Um grupo de privilégios consiste em vários privilégios.

    +

    + + Privilege group illustrated + Grupo de privilégios ilustrado

    +

    Como mostra a figura acima, suponha que precisa de conceder três privilégios diferentes a uma função.

    +
      +
    • Se não utilizar um grupo de privilégios, terá de conceder os privilégios três vezes.

    • +
    • Se utilizar um grupo de privilégios, só precisa de criar um grupo de privilégios e adicionar os três privilégios a este grupo de privilégios e conceder o grupo de privilégios à função A.

    • +
    +

    Ao utilizar um grupo de privilégios, pode conceder vários privilégios em bloco a uma função.

    +

    Grupos de privilégios incorporados

    Para facilitar a utilização, o Milvus fornece um total de 9 privilégios incorporados ao nível da coleção, da base de dados e da instância: COLL_RO, COLL_RW, COLL_ADMIN, DB_RO, DB_RW, DB_Admin, Cluster_RO, Cluster_RW e Cluster_Admin.

    +
    +

    Os três níveis de grupos de privilégios incorporados não têm uma relação em cascata. A definição de um grupo de privilégios ao nível da instância não define automaticamente as permissões para todas as bases de dados e colecções dessa instância. Os privilégios ao nível das bases de dados e das colecções têm de ser definidos manualmente.

    +
    +

    As tabelas seguintes explicam os privilégios incluídos em cada um dos grupos de privilégios incorporados.

    +

    Nível da coleção

      +
    • COLL_RO: inclui privilégios para ler os dados da coleção

    • +
    • COLL_RW: inclui privilégios para ler e escrever dados da coleção

    • +
    • COLL_ADMIN: inclui privilégios para ler e escrever dados de coleção e gerir colecções.

    • +
    +

    A tabela abaixo lista os privilégios específicos incluídos nos três grupos de privilégios incorporados ao nível da coleção.

    +

    **Privilege**

    +

    **CollectionReadOnly**

    +

    **CollectionReadWrite**

    +

    **CollectionAdmin**

    +

    Consulta

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Pesquisa

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Detalhes do índice

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetFlushState

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetLoadState

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GetLoadingProgress

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    HasPartition

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    ShowPartitions

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    ListAliases

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Descrever coleção

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    DescreverAlias

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Obter estatísticas

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Criar índice

    +

    +

    ✔️

    +

    ✔️

    +

    DropIndex

    +

    +

    ✔️

    +

    ✔️

    +

    CriarPartição

    +

    +

    ✔️

    +

    ✔️

    +

    DropPartition

    +

    +

    ✔️

    +

    ✔️

    +

    Carregar

    +

    +

    ✔️

    +

    ✔️

    +

    Libertar

    +

    +

    ✔️

    +

    ✔️

    +

    Inserir

    +

    +

    ✔️

    +

    ✔️

    +

    Eliminar

    +

    +

    ✔️

    +

    ✔️

    +

    Inserir

    +

    +

    ✔️

    +

    ✔️

    +

    Importar

    +

    +

    ✔️

    +

    ✔️

    +

    Descarga

    +

    +

    ✔️

    +

    ✔️

    +

    Compactação

    +

    +

    ✔️

    +

    ✔️

    +

    Equilíbrio de carga

    +

    +

    ✔️

    +

    ✔️

    +

    CriarAlias

    +

    +

    +

    ✔️

    +

    SoltarAlias

    +

    +

    +

    ✔️

    +
    +

    Nível da base de dados

      +
    • DB_RO: inclui privilégios para ler dados da base de dados

    • +
    • DB_RW: inclui privilégios para ler e escrever dados da base de dados

    • +
    • DB_Admin: inclui privilégios para ler e escrever dados da base de dados e gerir bases de dados.

    • +
    +

    A tabela abaixo lista os privilégios específicos incluídos nos três grupos de privilégios incorporados ao nível da base de dados.

    +

    **Privilege**

    +

    **DatabaseReadOnly**

    +

    **DatabaseReadWrite**

    +

    **DatabaseAdmin**

    +

    Mostrar colecções

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Descrever a base de dados

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    CriarColeção

    +

    +

    +

    ✔️

    +

    Deixar coleção

    +

    +

    +

    ✔️

    +

    Alterar base de dados

    +

    +

    ✔️

    +

    ✔️

    +
    +

    Nível do cluster

      +
    • Cluster_RO: inclui privilégios para ler dados da instância

    • +
    • Cluster_RW: inclui privilégios para ler e escrever dados da instância

    • +
    • Cluster_Admin: inclui privilégios para ler e gravar dados da instância e gerenciar instâncias.

    • +
    +

    A tabela abaixo lista os privilégios específicos incluídos nos três grupos de privilégios incorporados no nível da instância.

    +

    **Privilege**

    +

    **ClusterReadOnly**

    +

    **ClusterReadWrite**

    +

    **ClusterAdmin**

    +

    ListDatabases

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Renomear coleção

    +

    +

    +

    ✔️

    +

    Criar Propriedade

    +

    +

    +

    ✔️

    +

    ActualizarUsuário

    +

    +

    +

    ✔️

    +

    DropOwnership

    +

    +

    +

    ✔️

    +

    Seleção de propriedade

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    GerirPropriedade

    +

    +

    +

    ✔️

    +

    SeleccionarUtilizador

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    BackupRBAC

    +

    +

    +

    ✔️

    +

    RestaurarRBAC

    +

    +

    +

    ✔️

    +

    CriarGrupo de Recursos

    +

    +

    +

    ✔️

    +

    AbandonarGrupo de Recursos

    +

    +

    +

    ✔️

    +

    ActualizarGrupos de Recursos

    +

    +

    ✔️

    +

    ✔️

    +

    Descrever o grupo de recursos

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    Listar grupos de recursos

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    TransferNode

    +

    +

    ✔️

    +

    ✔️

    +

    TransferReplica

    +

    +

    ✔️

    +

    ✔️

    +

    CriarBaseDeDados

    +

    +

    +

    ✔️

    +

    DropDatabase

    +

    +

    +

    ✔️

    +

    FlushAll

    +

    +

    ✔️

    +

    ✔️

    +

    CriarGrupoPrivilegiado

    +

    +

    +

    ✔️

    +

    AbandonarGrupoPrivilegiado

    +

    +

    +

    ✔️

    +

    ListarGruposPrivilegiados

    +

    +

    +

    ✔️

    +

    OperarPrivilegeGroup

    +

    +

    +

    ✔️

    +
    +

    Procedimentos

    Você pode criar um grupo de privilégios e, em seguida, adicionar privilégios ao grupo de privilégios.

    +

    Criar um grupo de privilégios

    O exemplo seguinte demonstra como criar um grupo de privilégios com o nome privilege_group_1.

    + +
    from pymilvus import MilvusClient​
    +client.create_privileg_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
    +​
    +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    +

    Adicionar privilégios a um grupo de privilégios

    O exemplo a seguir demonstra como adicionar os privilégios PrivilegeBackupRBAC e PrivilegeRestoreRBAC ao grupo de privilégios privilege_group_1 que acabou de ser criado.

    + +
    from pymilvus import MilvusClient​
    +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
    +​
    +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Arrays.asList("Query", "Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Query", "Search"]​
    +}'​
    +
    +
    +

    Remover privilégios de um grupo de privilégios

    O exemplo a seguir demonstra como remover o privilégio PrivilegeRestoreRBAC do grupo de privilégios privilege_group_1.

    + +
    from pymilvus import MilvusClient​
    +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
    +​
    +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Collections.singletonList("Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Search"]​
    +}'​
    +
    +
    +

    Listar grupos de privilégios

    O exemplo seguinte demonstra como listar todos os grupos de privilégios existentes.

    + +
    from pymilvus import MilvusClient​
    +client.list_privilege_groups()​
    +
    +
    +
    import io.milvus.v2.service.rbac.PrivilegeGroup;​
    +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
    +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
    +​
    +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
    +        .build());​
    +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.ListPrivilegeGroups(context.Background())​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Abaixo está um exemplo de saída.

    +
    PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
    +
    +
    +

    Eliminar um grupo de privilégios

    O exemplo seguinte demonstra como eliminar o grupo de privilégios privilege_group_1.

    + +
    from pymilvus import MilvusClient​
    +client.drop_privilege_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
    +​
    +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/pt/adminGuide/rbac.json b/localization/v2.5.x/site/pt/adminGuide/rbac.json index 15e3433ca..f3fea2c86 100644 --- a/localization/v2.5.x/site/pt/adminGuide/rbac.json +++ b/localization/v2.5.x/site/pt/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"Ativar o RBAC","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1. Iniciar um cliente Milvus para estabelecer uma ligação","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2. Criar um utilizador","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3. Criar uma função","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4. Conceder um privilégio a uma função","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5. Conceder uma função a um utilizador","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6. Revogar privilégios","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"Explicação do RBAC","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"Conceitos-chave do RBAC","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"Procedimentos","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/rbac.md b/localization/v2.5.x/site/pt/adminGuide/rbac.md index be6877e8d..8e641a524 100644 --- a/localization/v2.5.x/site/pt/adminGuide/rbac.md +++ b/localization/v2.5.x/site/pt/adminGuide/rbac.md @@ -1,10 +1,14 @@ --- id: rbac.md related_key: enable RBAC -summary: 'Saiba como gerir utilizadores, funções e privilégios.' -title: Ativar o RBAC +summary: >- + O RBAC (Role-Based Access Control) é um método de controlo de acesso baseado + em funções. Com o RBAC, é possível controlar com precisão as operações que os + utilizadores podem realizar ao nível da coleção, da base de dados e da + instância, aumentando a segurança dos dados. +title: Explicação do RBAC --- -

    Ativar o RBAC

    Ao ativar o RBAC, pode controlar o acesso a recursos Milvus específicos (por exemplo, uma coleção ou uma partição) ou permissões com base no papel e privilégios do utilizador. Atualmente, esta funcionalidade só está disponível em Python e Java.

    -

    Este tópico descreve como ativar o RBAC e gerir utilizadores e funções.

    -
    -

    Os trechos de código nesta página usam o novo MilvusClient (Python) para interagir com o Milvus. Novos SDKs MilvusClient para outras linguagens serão lançados em futuras actualizações.

    -
    -

    1. Iniciar um cliente Milvus para estabelecer uma ligação

    O RBAC (Role-Based Access Control) é um método de controlo de acesso baseado em funções. Com o RBAC, é possível controlar com precisão as operações que os utilizadores podem realizar ao nível da coleção, da base de dados e da instância, aumentando a segurança dos dados.

    +

    Ao contrário dos modelos tradicionais de controlo de acesso de utilizadores, o RBAC introduz o conceito de funções. No modelo RBAC, são concedidos privilégios às funções e, em seguida, essas funções são concedidas aos utilizadores. Em seguida, os utilizadores podem obter privilégios.

    +

    O modelo RBAC pode melhorar a eficiência da gestão do controlo de acesso. Por exemplo, se vários utilizadores necessitarem do mesmo conjunto de privilégios, não é necessário definir manualmente os privilégios para cada utilizador. Em vez disso, é possível criar uma função e atribuir a função aos utilizadores. Se pretender ajustar os privilégios desses utilizadores, basta ajustar os privilégios da função e a alteração será aplicada a todos os utilizadores com essa função.

    +

    Conceitos-chave do RBAC

    Depois de ativar a autenticação do utilizador, ligue-se à sua instância Milvus utilizando token que consiste num nome de utilizador e numa palavra-passe. Por predefinição, o Milvus utiliza o utilizador root com a palavra-passe Milvus.

    -
    from pymilvus import MilvusClient
    -
    -client = MilvusClient(
    -    uri='http://localhost:19530', # replace with your own Milvus server address
    -    token='root:Milvus' # replace with your own Milvus server token
    -)
    -
    -

    2. Criar um utilizador

    Crie um utilizador chamado user_1 com a palavra-passe P@ssw0rd:

    -
    client.create_user(
    -    user_name='user_1',
    -    password='P@ssw0rd'
    -)
    -
    -

    Depois de criar um utilizador, é possível:

    -
      -
    • Atualizar a palavra-passe de um utilizador. É necessário fornecer a palavra-passe original e a nova.
    • -
    -
    client.update_password(
    -    user_name='user_1',
    -    old_password='P@ssw0rd',
    -    new_password='P@ssw0rd123'
    -)
    -
    -
      -
    • Listar todos os utilizadores.
    • -
    -
    client.list_users()
    -
    -# output:
    -# ['root', 'user_1']
    -
    -
      -
    • Verificar a função de um determinado utilizador.
    • -
    -
    client.describe_user(user_name='user_1')
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ()}
    -
    -

    3. Criar uma função

    O exemplo seguinte cria uma função denominada roleA.

    -
    client.create_role(
    -    role_name="roleA",
    -)
    -
    -

    Depois de criar uma função, pode:

    +

    + + Users, roles, and privileges + Utilizadores, funções e privilégios

    +

    Existem quatro componentes principais no modelo RBAC.

      -
    • Listar todas as funções.
    • +
    • **Recurso: **A entidade de recurso que pode ser acedida. Existem três níveis de recursos no Milvus - instância, base de dados e coleção.

    • +
    • **Privilégio: **A permissão para efetuar determinadas operações nos recursos Milvus (por exemplo, criar colecções, inserir dados, etc.).

    • +
    • **Grupo de privilégios: **Um grupo de múltiplos privilégios.

    • +
    • **Função: **Uma função é composta por duas partes: privilégios e recursos. Os privilégios definem o tipo de operações que uma função pode executar, enquanto os recursos definem os recursos de destino nos quais as operações podem ser executadas. Por exemplo, a função de administrador da base de dados pode efetuar operações de leitura, escrita e gestão em determinadas bases de dados.

    • +
    • **Utilizador: Um utilizador é alguém que utiliza o Milvus. Cada utilizador tem um ID único e é-lhe atribuída uma função ou várias funções.

    -
    client.list_roles()
    -
    -# output:
    -# ['admin', 'public', 'roleA']
    -
    -

    4. Conceder um privilégio a uma função

    O exemplo seguinte demonstra como conceder a permissão de pesquisar todas as colecções à função denominada roleA.

    -

    O object_type especifica o tipo de objeto, que também pode ser entendido como o tipo de recurso. Atualmente, os valores válidos incluem Coleção/Utilizador/Global, etc., em que Global significa que não existe um tipo de recurso específico. O object_name é o nome do recurso. Se o tipo de objetofor Coleção, então o nome do objeto pode ser referido a um nome de coleção específico, ou pode utilizar * para especificar todas as colecções. Seo tipo de objeto for Global, o nome do objeto só pode ser especificado como *. Consulte Utilizadores e funções para outros tipos de privilégios que pode conceder.

    -

    Antes de gerir os privilégios de função, certifique-se de que activou a autenticação do utilizador. Caso contrário, poderá ocorrer um erro. Para obter informações sobre como ativar a autenticação do utilizador, consulte Autenticar o acesso do utilizador.

    -
    # grant privilege to a role
    -
    -client.grant_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -

    Depois de conceder um privilégio a uma função, pode:

    -
      -
    • Visualizar os privilégios concedidos a uma função.
    • -
    -
    client.describe_role(
    -    role_name='roleA'
    -)
    -
    -# output:
    -# {'role': 'roleA',
    -#  'privileges': [{'object_type': 'User',
    -#    'object_name': 'user_1',
    -#    'db_name': 'default',
    -#    'role_name': 'roleA',
    -#    'privilege': 'SelectUser',
    -#    'grantor_name': 'root'}]}
    -
    -

    5. Conceder uma função a um utilizador

    Conceder a função a um utilizador para que este possa herdar todos os privilégios da função.

    -
    # grant a role to a user
    -
    -client.grant_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -

    Depois de conceder a função, verificar se a mesma foi concedida:

    -
    client.describe_user(
    -    user_name='user_1'
    -)
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ('roleA')}
    -
    -

    6. Revogar privilégios

    -

    Tenha cuidado ao efetuar as seguintes operações, uma vez que estas são irreversíveis.

    -
    -
      -
    • Remover um privilégio de uma função. Se revogar um privilégio que não tenha sido concedido à função, ocorrerá um erro.
    • -
    -
    client.revoke_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -
      -
    • Remover um utilizador de uma função. Se revogar uma função que não tenha sido concedida ao utilizador, ocorrerá um erro.
    • -
    -
    client.revoke_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -
      -
    • Eliminar uma função.
    • -
    -
    client.drop_role(role_name='roleA')
    -
    -
      -
    • Eliminar um utilizador.
    • -
    -
    client.drop_user(user_name='user_1')
    -
    -

    O que se segue

    +

    Para obter o controlo de acesso através do RBAC, é necessário seguir os passos abaixo.

    +
      +
    1. Criar um utilizador: Para além do utilizador predefinido root no Milvus, é possível criar novos utilizadores e definir palavras-passe para proteger a segurança dos dados.

    2. +
    3. Criar uma função: Pode criar funções personalizadas com base nas suas necessidades. As capacidades específicas de uma função são determinadas pelos seus privilégios.

    4. +
    5. Criar um grupo de privilégios: Combine vários privilégios num único grupo de privilégios para simplificar o processo de concessão de privilégios a uma função.

    6. +
    7. Conceder privilégios ou grupos de privilégios a uma função: Defina as capacidades de uma função concedendo privilégios ou grupos de privilégios a esta função.

    8. +
    9. Conceder funções aos utilizadores: Conceder funções com determinados privilégios aos utilizadores para que estes possam ter os privilégios de uma função. Uma única função pode ser concedida a vários utilizadores.

    10. +
    diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.json index 31f7c498d..da43b3258 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Atualizar o cluster do Milvus com o Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Atualizar o Milvus alterando a sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"Atualizar o cluster do Milvus com o Docker Compose","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"Atualizar o Milvus alterando a sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.md index b19fe68ac..f99150e18 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: Atualizar o cluster do Milvus com o Docker Compose >

    Este tópico descreve como atualizar seu Milvus usando o Docker Compose.

    -

    Em casos normais, você pode atualizar o Milvus alterando sua imagem. No entanto, é necessário migrar os metadados antes de qualquer atualização da v2.1.x para a v2.5.0-beta.

    +

    Em casos normais, você pode atualizar o Milvus alterando sua imagem. No entanto, é necessário migrar os metadados antes de qualquer atualização da v2.1.x para a v2.5.0.

    Atualizar o Milvus alterando a sua imagem

    Em casos normais, você pode atualizar o Milvus da seguinte forma:

      -
    1. Altere as etiquetas de imagem do Milvus em docker-compose.yaml.

      +
    2. Altere as tags de imagem do Milvus em docker-compose.yaml.

      Note que é necessário alterar as etiquetas de imagem para o Proxy, todos os coordenadores e todos os nós de trabalho.

      ...
       rootcoord:
         container_name: milvus-rootcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       proxy:
         container_name: milvus-proxy
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       querycoord:
         container_name: milvus-querycoord
      -  image: milvusdb/milvus:v2.5.0-beta  
      +  image: milvusdb/milvus:v2.5.0  
       ...
       querynode:
         container_name: milvus-querynode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexcoord:
         container_name: milvus-indexcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexnode:
         container_name: milvus-indexnode
      -  image: milvusdb/milvus:v2.5.0-beta 
      +  image: milvusdb/milvus:v2.5.0 
       ...
       datacoord:
         container_name: milvus-datacoord
      -  image: milvusdb/milvus:v2.5.0-beta   
      +  image: milvusdb/milvus:v2.5.0   
       ...
       datanode:
         container_name: milvus-datanode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       
    3. Execute os seguintes comandos para realizar a atualização.

      docker compose down
      @@ -105,7 +105,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      @@ -148,7 +148,7 @@ docker compose up -d
       
    4. Se estiver pronto para implantar seu cluster em nuvens:
    5. diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.json index 0a96605d8..34f295401 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.json +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.json @@ -1 +1 @@ -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME CHART VERSION APP VERSION DESCRIPTION \nzilliztech/milvus 4.1.34 2.4.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.33 2.4.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.32 2.4.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.31 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.30 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.29 2.4.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.24 2.3.11 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.23 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.22 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.21 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.20 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.18 2.3.10 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.18 2.3.9 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.17 2.3.8 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.16 2.3.7 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.15 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.14 2.3.6 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.13 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.12 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.6 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.5 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.4 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.3 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.2 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.1 2.3.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION \nnew-release default 1 2022-11-21 15:41:25.51539 +0800 CST deployed milvus-3.2.18 2.1.4 \n","NAME READY STATUS RESTARTS AGE\nmy-release-etcd-0 1/1 Running 0 21m\nmy-release-etcd-1 1/1 Running 0 21m\nmy-release-etcd-2 1/1 Running 0 21m\nmy-release-milvus-datacoord-664c58798d-fl75s 1/1 Running 0 21m\nmy-release-milvus-datanode-5f75686c55-xfg2r 1/1 Running 0 21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r 1/1 Running 0 21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75 1/1 Running 0 21m\nmy-release-milvus-proxy-6c548f787f-scspp 1/1 Running 0 21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq 1/1 Running 0 21m\nmy-release-milvus-querynode-76bb4946d-lbrz6 1/1 Running 0 21m\nmy-release-milvus-rootcoord-7764c5b686-62msm 1/1 Running 0 21m\nmy-release-minio-0 1/1 Running 0 21m\nmy-release-minio-1 1/1 Running 0 21m\nmy-release-minio-2 1/1 Running 0 21m\nmy-release-minio-3 1/1 Running 0 21m\nmy-release-pulsar-bookie-0 1/1 Running 0 21m\nmy-release-pulsar-bookie-1 1/1 Running 0 21m\nmy-release-pulsar-bookie-2 1/1 Running 0 21m\nmy-release-pulsar-bookie-init-tjxpj 0/1 Completed 0 21m\nmy-release-pulsar-broker-0 1/1 Running 0 21m\nmy-release-pulsar-proxy-0 1/1 Running 0 21m\nmy-release-pulsar-pulsar-init-c8vvc 0/1 Completed 0 21m\nmy-release-pulsar-recovery-0 1/1 Running 0 21m\nmy-release-pulsar-zookeeper-0 1/1 Running 0 21m\nmy-release-pulsar-zookeeper-1 1/1 Running 0 20m\nmy-release-pulsar-zookeeper-2 1/1 Running 0 20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Atualizar o Cluster Milvus com o Gráfico Helm","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Verificar a carta do Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Realizar uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus usando o Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME CHART VERSION APP VERSION DESCRIPTION \nzilliztech/milvus 4.1.34 2.4.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.33 2.4.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.32 2.4.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.31 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.30 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.29 2.4.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.24 2.3.11 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.23 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.22 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.21 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.20 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.18 2.3.10 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.18 2.3.9 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.17 2.3.8 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.16 2.3.7 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.15 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.14 2.3.6 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.13 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.12 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.6 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.5 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.4 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.3 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.2 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.1 2.3.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION \nnew-release default 1 2022-11-21 15:41:25.51539 +0800 CST deployed milvus-3.2.18 2.1.4 \n","NAME READY STATUS RESTARTS AGE\nmy-release-etcd-0 1/1 Running 0 21m\nmy-release-etcd-1 1/1 Running 0 21m\nmy-release-etcd-2 1/1 Running 0 21m\nmy-release-milvus-datacoord-664c58798d-fl75s 1/1 Running 0 21m\nmy-release-milvus-datanode-5f75686c55-xfg2r 1/1 Running 0 21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r 1/1 Running 0 21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75 1/1 Running 0 21m\nmy-release-milvus-proxy-6c548f787f-scspp 1/1 Running 0 21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq 1/1 Running 0 21m\nmy-release-milvus-querynode-76bb4946d-lbrz6 1/1 Running 0 21m\nmy-release-milvus-rootcoord-7764c5b686-62msm 1/1 Running 0 21m\nmy-release-minio-0 1/1 Running 0 21m\nmy-release-minio-1 1/1 Running 0 21m\nmy-release-minio-2 1/1 Running 0 21m\nmy-release-minio-3 1/1 Running 0 21m\nmy-release-pulsar-bookie-0 1/1 Running 0 21m\nmy-release-pulsar-bookie-1 1/1 Running 0 21m\nmy-release-pulsar-bookie-2 1/1 Running 0 21m\nmy-release-pulsar-bookie-init-tjxpj 0/1 Completed 0 21m\nmy-release-pulsar-broker-0 1/1 Running 0 21m\nmy-release-pulsar-proxy-0 1/1 Running 0 21m\nmy-release-pulsar-pulsar-init-c8vvc 0/1 Completed 0 21m\nmy-release-pulsar-recovery-0 1/1 Running 0 21m\nmy-release-pulsar-zookeeper-0 1/1 Running 0 21m\nmy-release-pulsar-zookeeper-1 1/1 Running 0 20m\nmy-release-pulsar-zookeeper-2 1/1 Running 0 20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"Atualizar o Cluster Milvus com o Gráfico Helm","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Verificar a carta do Milvus Helm","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"Realizar uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus usando o Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.md index a4b175ce0..51bfdbadb 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.md +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-helm.md @@ -108,10 +108,10 @@ zilliztech/milvus 4.1.1 2.3.0 Milvus is an ope zilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...

    Pode escolher o caminho de atualização para o seu Milvus da seguinte forma:

    -
    - [Conduzir uma atualização contínua](#conduct-a-rolling-upgrade) do Milvus v2.2.3 e versões posteriores para a v2.5.0-beta.
    +
    - [Conduzir uma atualização contínua](#conduct-a-rolling-upgrade) do Milvus v2.2.3 e versões posteriores para a v2.5.0.

    Realizar uma atualização contínua

    1. O script codifica a ordem de atualização das implementações e não pode ser alterado.
    2. O script utiliza kubectl patch para atualizar as implementações e kubectl rollout status para observar o seu estado.
    3. -
    4. O script usa kubectl patch para atualizar a etiqueta app.kubernetes.io/version das implementações para a especificada após a bandeira -t no comando.
    5. +
    6. O script usa kubectl patch para atualizar o rótulo app.kubernetes.io/version das implantações para aquele especificado após o sinalizador -t no comando.
    @@ -225,7 +225,7 @@ my-release-pulsar-zookeeper-0 my-release-pulsar-zookeeper-1 1/1 Running 0 20m my-release-pulsar-zookeeper-2 1/1 Running 0 20m -

    3. Verificar a etiqueta de imagem

    Verifique a etiqueta de imagem para o pod my-release-milvus-proxy-6c548f787f-scspp. Pode ver que a versão do seu cluster Milvus é a v2.1.4.

    +

    3. Verificar a etiqueta de imagem

    Verifique a etiqueta de imagem para o pod my-release-milvus-proxy-6c548f787f-scspp. Pode ver que a versão do seu cluster Milvus é v2.1.4.

    $ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'
     # milvusdb/milvus:v2.1.4
     
    diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.json index 26bf1f090..73f19cdef 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Atualização do Cluster Milvus com o Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Atualize seu operador Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Realizar uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus alterando sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"Atualizar o Cluster Milvus com o Milvus Operator","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"Atualize seu operador Milvus","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Conduzir uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus alterando sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.md index 69a508866..357a5f324 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_cluster-operator.md @@ -5,10 +5,10 @@ order: 0 group: upgrade_milvus_cluster-operator.md related_key: upgrade Milvus Cluster summary: Saiba como atualizar o cluster Milvus com o Milvus Operator. -title: Atualização do Cluster Milvus com o Milvus Operator +title: Atualizar o Cluster Milvus com o Milvus Operator --- -

    Atualização do Cluster Milvus com o Milvus Operator

    Depois de ter atualizado o seu Milvus Operator para a versão mais recente, tem as seguintes opções:

    -

    Realizar uma atualização contínua

    Desde a versão 2.2.3 do Milvus, é possível configurar os coordenadores do Milvus para funcionarem em modo de espera ativa e ativar a funcionalidade de atualização contínua para os mesmos, de modo a que o Milvus possa responder aos pedidos recebidos durante as actualizações do coordenador. Nas versões anteriores, os coordenadores devem ser removidos e depois criados durante uma atualização, o que pode provocar um certo tempo de inatividade do serviço.

    -

    Com base nas capacidades de atualização contínua fornecidas pelo Kubernetes, o operador do Milvus impõe uma atualização ordenada das implementações de acordo com as suas dependências. Além disso, o Milvus implementa um mecanismo para garantir que os seus componentes permanecem compatíveis com os que dependem deles durante a atualização, reduzindo significativamente o potencial tempo de inatividade do serviço.

    +

    Com base nas capacidades de atualização contínua fornecidas pelo Kubernetes, o operador do Milvus impõe uma atualização ordenada das implementações de acordo com as suas dependências. Além disso, o Milvus implementa um mecanismo para garantir que os seus componentes permanecem compatíveis com os que deles dependem durante a atualização, reduzindo significativamente o potencial tempo de inatividade do serviço.

    A funcionalidade de atualização contínua está desactivada por defeito. É necessário activá-la explicitamente através de um ficheiro de configuração.

    apiVersion: milvus.io/v1beta1
     kind: Milvus
    @@ -76,10 +76,10 @@ spec:
       components:
         enableRollingUpdate: true
         imageUpdateMode: rollingUpgrade # Default value, can be omitted
    -    image: milvusdb/milvus:v2.5.0-beta
    +    image: milvusdb/milvus:v2.5.0
     

    Neste ficheiro de configuração acima, defina spec.components.enableRollingUpdate para true e defina spec.components.image para a versão desejada do Milvus.

    -

    Por predefinição, o Milvus efectua uma atualização contínua para os coordenadores de forma ordenada, substituindo as imagens do pod do coordenador uma após a outra. Para reduzir o tempo de atualização, considere definir spec.components.imageUpdateMode para all para que o Milvus substitua todas as imagens de pod ao mesmo tempo.

    +

    Por predefinição, o Milvus efectua uma atualização contínua para os coordenadores de forma ordenada, substituindo as imagens do pod do coordenador uma após a outra. Para reduzir o tempo de atualização, considere definir spec.components.imageUpdateMode como all para que o Milvus substitua todas as imagens de pod ao mesmo tempo.

    apiVersion: milvus.io/v1beta1
     kind: Milvus
     metadata:
    @@ -88,7 +88,7 @@ spec:
       components:
         enableRollingUpdate: true
         imageUpdateMode: all
    -    image: milvusdb/milvus:v2.5.0-beta
    +    image: milvusdb/milvus:v2.5.0
     

    Você pode definir spec.components.imageUpdateMode como rollingDowngrade para que o Milvus substitua as imagens do pod coordenador por uma versão inferior.

    apiVersion: milvus.io/v1beta1
    @@ -119,7 +119,7 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Em casos normais, pode simplesmente atualizar o seu Milvus para a versão mais recente, alterando a sua imagem. No entanto, tenha em atenção que haverá um certo tempo de inatividade ao atualizar o Milvus desta forma.

    +

    Em casos normais, pode simplesmente atualizar o seu Milvus para a versão mais recente alterando a sua imagem. No entanto, tenha em atenção que haverá um certo tempo de inatividade ao atualizar o Milvus desta forma.

    Crie um ficheiro de configuração da seguinte forma e guarde-o como milvusupgrade.yaml:

    apiVersion: milvus.io/v1beta1
     kind: Milvus
    @@ -128,7 +128,7 @@ metadata:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    Em seguida, execute o seguinte para realizar a atualização:

    kubectl patch -f milvusupgrade.yaml
    @@ -148,8 +148,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Desde o Milvus 2.2.0, os metadados são incompatíveis com os das versões anteriores. Os seguintes exemplos assumem uma atualização do Milvus 2.1.4 para o Milvus 2.5.0-beta.

    -

    1. Criar um ficheiro .yaml para migração de metadados

    Crie um ficheiro de migração de metadados. Segue-se um exemplo. É necessário especificar name, sourceVersion e targetVersion no ficheiro de configuração. O exemplo seguinte define name para my-release-upgrade, sourceVersion para v2.1.4 e targetVersion para v2.5.0-beta. Isto significa que o seu cluster Milvus será atualizado da v2.1.4 para a v2.5.0-beta.

    +

    Desde o Milvus 2.2.0, os metadados são incompatíveis com os das versões anteriores. Os seguintes exemplos pressupõem uma atualização do Milvus 2.1.4 para o Milvus 2.5.0.

    +

    1. Criar um ficheiro .yaml para migração de metadados

    Crie um ficheiro de migração de metadados. Segue-se um exemplo. É necessário especificar name, sourceVersion e targetVersion no ficheiro de configuração. O exemplo seguinte define name para my-release-upgrade, sourceVersion para v2.1.4 e targetVersion para v2.5.0. Isto significa que o seu cluster Milvus será atualizado da v2.1.4 para a v2.5.0.

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -159,9 +159,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.json
    index eb8d73368..dce10b599 100644
    --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.json
    +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.json
    @@ -1 +1 @@
    -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Atualizar o Milvus Standalone com o Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Atualizar o Milvus alterando sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"Atualizar o Milvus Standalone com o Docker Compose","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"Atualizar o Milvus alterando a sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.md
    index 7279de9d7..67675db81 100644
    --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.md
    +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-docker.md
    @@ -24,11 +24,11 @@ title: Atualizar o Milvus Standalone com o Docker Compose
             >
           
         

    Este tópico descreve como atualizar seu Milvus usando o Docker Compose.

    -

    Em casos normais, você pode atualizar o Milvus alterando sua imagem. No entanto, é necessário migrar os metadados antes de qualquer atualização da v2.1.x para a v2.5.0-beta.

    +

    Em casos normais, você pode atualizar o Milvus alterando sua imagem. No entanto, é necessário migrar os metadados antes de qualquer atualização da v2.1.x para a v2.5.0.

    -

    Devido a preocupações de segurança, o Milvus actualiza o seu MinIO para RELEASE.2023-03-20T20-16-18Z com o lançamento da v2.2.5. Antes de qualquer atualização de versões anteriores do Milvus Standalone instaladas usando o Docker Compose, você deve criar uma implantação do MinIO de nó único e unidade única e migrar as configurações e o conteúdo existentes do MinIO para a nova implantação. Para obter detalhes, consulte este guia.

    +

    Devido a questões de segurança, o Milvus actualiza o seu MinIO para RELEASE.2023-03-20T20-16-18Z com o lançamento da v2.2.5. Antes de qualquer atualização de versões anteriores do Milvus Standalone instaladas usando o Docker Compose, você deve criar uma implantação do MinIO de nó único e unidade única e migrar as configurações e o conteúdo existentes do MinIO para a nova implantação. Para obter detalhes, consulte este guia.

    -

    Atualizar o Milvus alterando sua imagem

  • Execute os seguintes comandos para realizar a atualização.

    docker compose down
    @@ -83,7 +83,7 @@ cmd:
       runWithBackup: true
     config:
       sourceVersion: 2.1.4   # Specify your milvus version
    -  targetVersion: 2.5.0-beta
    +  targetVersion: 2.5.0
       backupFilePath: /tmp/migration.bak
     metastore:
       type: etcd
    @@ -126,7 +126,7 @@ docker compose up -d
     
  • Se estiver pronto para implantar seu cluster em nuvens:
  • diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.json index 657fec15e..c37ecef5b 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.json +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.json @@ -1 +1 @@ -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME CHART VERSION APP VERSION DESCRIPTION \nzilliztech/milvus 4.1.34 2.4.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.33 2.4.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.32 2.4.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.31 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.30 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.29 2.4.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.24 2.3.11 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.23 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.22 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.21 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.20 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.18 2.3.10 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.18 2.3.9 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.17 2.3.8 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.16 2.3.7 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.15 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.14 2.3.6 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.13 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.12 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.6 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.5 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.4 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.3 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.2 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.1 2.3.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION \nmy-release default 1 2022-11-21 15:41:25.51539 +0800 CST deployed milvus-3.2.18 2.1.4\n","NAME READY STATUS RESTARTS AGE\nmy-release-etcd-0 1/1 Running 0 84s\nmy-release-milvus-standalone-75c599fffc-6rwlj 1/1 Running 0 84s\nmy-release-minio-744dd9586f-qngzv 1/1 Running 0 84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Atualizar o Milvus Standalone com o Helm Chart","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Verificar a versão do Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Realizar uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus usando o Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME CHART VERSION APP VERSION DESCRIPTION \nzilliztech/milvus 4.1.34 2.4.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.33 2.4.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.32 2.4.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.31 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.30 2.4.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.29 2.4.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.24 2.3.11 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.23 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.22 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.21 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.20 2.3.10 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.18 2.3.10 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.18 2.3.9 Milvus is an open-source vector database built ... \nzilliztech/milvus 4.1.17 2.3.8 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.16 2.3.7 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.15 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.14 2.3.6 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.13 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.12 2.3.5 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.11 2.3.4 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.10 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.9 2.3.3 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.8 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.7 2.3.2 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.6 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.5 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.4 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.3 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.2 2.3.1 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.1 2.3.0 Milvus is an open-source vector database built ...\nzilliztech/milvus 4.1.0 2.3.0 Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION \nmy-release default 1 2022-11-21 15:41:25.51539 +0800 CST deployed milvus-3.2.18 2.1.4\n","NAME READY STATUS RESTARTS AGE\nmy-release-etcd-0 1/1 Running 0 84s\nmy-release-milvus-standalone-75c599fffc-6rwlj 1/1 Running 0 84s\nmy-release-minio-744dd9586f-qngzv 1/1 Running 0 84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"Atualizar o Milvus Standalone com o Helm Chart","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Verificar a versão do Milvus","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"Realizar uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus usando o Helm","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.md index 8dd0f846a..559b177ad 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.md +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-helm.md @@ -66,7 +66,7 @@ title: Atualizar o Milvus Standalone com o Helm Chart $ helm search repo zilliztech/milvus --versions
    -

    O repositório Milvus Helm Charts em https://milvus-io.github.io/milvus-helm/ foi arquivado e pode obter mais actualizações em https://zilliztech.github.io/milvus-helm/ da seguinte forma:

    +

    O repositório de Milvus Helm Charts em https://milvus-io.github.io/milvus-helm/ foi arquivado e pode obter mais actualizações em https://zilliztech.github.io/milvus-helm/ da seguinte forma:

    helm repo add zilliztech https://zilliztech.github.io/milvus-helm
     helm repo update zilliztech
     # upgrade existing helm release
    @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
     zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
     

    Pode escolher o caminho de atualização para o seu Milvus da seguinte forma:

    -
    - [Conduzir uma atualização contínua](#conduct-a-rolling-upgrade) do Milvus v2.2.3 e versões posteriores para a v2.5.0-beta.
    +
    - [Conduzir uma atualização contínua](#conduct-a-rolling-upgrade) do Milvus v2.2.3 e versões posteriores para a v2.5.0.

    Realizar uma atualização contínua

    Desde a versão 2.2.3 do Milvus, é possível configurar os coordenadores do Milvus para funcionarem em modo de espera ativa e ativar a funcionalidade de atualização contínua para os mesmos, de modo a que o Milvus possa responder aos pedidos recebidos durante as actualizações dos coordenadores. Nas versões anteriores, os coordenadores devem ser removidos e depois criados durante uma atualização, o que pode provocar um certo tempo de inatividade do serviço.

    As actualizações contínuas requerem que os coordenadores trabalhem em modo de espera ativa. Pode utilizar o script que fornecemos para configurar os coordenadores para trabalharem em modo de espera ativa e iniciar a atualização contínua.

    Com base nos recursos de atualização contínua fornecidos pelo Kubernetes, o script acima impõe uma atualização ordenada das implantações de acordo com suas dependências. Além disso, o Milvus implementa um mecanismo para garantir que os seus componentes permanecem compatíveis com os que dependem deles durante a atualização, reduzindo significativamente o potencial tempo de inatividade do serviço.

    -

    O script aplica-se apenas à atualização do Milvus instalado com o Helm. A tabela seguinte lista as flags de comando disponíveis nos scripts.

    +

    O script aplica-se apenas à atualização do Milvus instalado com o Helm. A tabela a seguir lista os sinalizadores de comando disponíveis nos scripts.

    @@ -140,19 +140,19 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope - +
    ParâmetrosDescriçãoValor por defeitoNecessário
    iNome da instância MilvusNoneVerdadeiro
    nEspaço de nomes em que o Milvus está instaladodefaultFalso
    tVersão alvo do MilvusNoneVerdadeiro
    tVersão de destino do MilvusNoneVerdadeiro
    wNova etiqueta de imagem do Milvusmilvusdb/milvus:v2.2.3Verdadeiro
    oFuncionamentoupdateFalso
    -

    Depois de se certificar de que todas as implementações na sua instância Milvus estão no seu estado normal. Você pode executar o seguinte comando para atualizar a instância do Milvus para a versão 2.5.0-beta.

    -
    sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
    +

    Depois de se ter assegurado de que todas as implementações na sua instância Milvus estão no seu estado normal. Você pode executar o seguinte comando para atualizar a instância do Milvus para a versão 2.5.0.

    +
    sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
     
    1. O script não se aplica à instância do Milvus instalada com o RocksMQ.
    2. O script codifica a ordem de atualização das implantações e não pode ser alterado.
    3. -
    4. O script usa kubectl patch para atualizar as implantações e kubectl rollout status para observar seu status.
    5. +
    6. O script usa kubectl patch para atualizar as implementações e kubectl rollout status para observar o seu estado.
    7. O script usa kubectl patch para atualizar o rótulo app.kubernetes.io/version das implantações para aquele especificado após o sinalizador -t no comando.
    @@ -193,7 +193,7 @@ helm upgrade my-release milvus/milvus --reset-then-reuse-values --version=

    Desde o Milvus 2.2.0, os metadados são incompatíveis com os das versões anteriores. Os exemplos a seguir pressupõem uma atualização do Milvus 2.1.4 para o Milvus 2.2.0.

    -

    1. Verificar a versão do Milvus

    Execute $ helm list para verificar a versão da sua aplicação Milvus. Pode ver que a APP VERSION é a 2.1.4.

    +

    1. Verificar a versão do Milvus

    Execute $ helm list para verificar a versão da sua aplicação Milvus. Pode ver que APP VERSION é 2.1.4.

    NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     
     my-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4
     
    @@ -203,12 +203,12 @@ my-release-etcd-0 1/1 Running 0 84s my-release-milvus-standalone-75c599fffc-6rwlj 1/1 Running 0 84s my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
    -

    3. Verificar a etiqueta de imagem

    Verifique a etiqueta de imagem para o pod my-release-milvus-proxy-6c548f787f-scspp. Pode ver que a versão do seu cluster Milvus é a v2.1.4.

    +

    3. Verificar a etiqueta de imagem

    Verifique a etiqueta de imagem para o pod my-release-milvus-proxy-6c548f787f-scspp. Pode ver que a versão do seu cluster Milvus é v2.1.4.

    $ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'
     # milvusdb/milvus:v2.1.4
     

    4. Migrar os metadados

    Uma grande mudança no Milvus 2.2 é a estrutura de metadados dos índices de segmento. Por conseguinte, é necessário utilizar o Helm para migrar os metadados durante a atualização do Milvus da v2.1.x para a v2.2.0. Eis um script para migrar os metadados em segurança.

    -

    Este script se aplica apenas ao Milvus instalado em um cluster K8s. Se ocorrer um erro durante o processo, reverta primeiro para a versão anterior com a operação de reversão.

    +

    Este script só se aplica ao Milvus instalado em um cluster K8s. Se ocorrer um erro durante o processo, reverta primeiro para a versão anterior com a operação de reversão.

    A tabela seguinte lista as operações que pode efetuar para a meta-migração.

    @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
  • Migrar os metadados do Milvus.
  • Inicie os componentes do Milvus com uma nova imagem.
  • -

    2. Atualizar o Milvus da v2.1.x para a 2.5.0-beta

    Os comandos a seguir assumem que você atualizou o Milvus da v2.1.4 para a 2.5.0-beta. Altere-os para as versões que atendam às suas necessidades.

    +

    2. Atualizar o Milvus da v2.1.x para a 2.5.0

    Os comandos a seguir assumem que você atualizou o Milvus da v2.1.4 para a 2.5.0. Altere-os para as versões que atendam às suas necessidades.

      -
    1. Especifique o nome da instância do Milvus, a versão de origem do Milvus e a versão de destino do Milvus.

      -
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
      +
    2. Especifique o nome da instância do Milvus, a versão do Milvus de origem e a versão do Milvus de destino.

      +
      ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
       
    3. Especifique o espaço de nomes com -n se o seu Milvus não estiver instalado no espaço de nomes K8s predefinido.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
       
    4. Especifique o caminho da raiz com -r se o seu Milvus estiver instalado com o rootpath personalizado.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
       
    5. Especifique a tag de imagem com -w se o seu Milvus estiver instalado com um image personalizado.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
       
    6. Defina -d true se pretender remover automaticamente o pod de migração após a conclusão da migração.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
       
    7. Reverter e migrar novamente se a migração falhar.

      -
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
      +
      ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
      +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
       
    diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.json index 9d3a1e559..71935a4e5 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Atualizar o Milvus Standalone com o Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Atualizar o seu Milvus Operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Realizar uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus alterando sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"Atualizar o Milvus Standalone com o Milvus Operator","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"Atualizar o seu Milvus Operator","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"Conduzir uma atualização contínua","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"Atualizar o Milvus alterando sua imagem","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"Migrar os metadados","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.md index 9f09c180e..50ecedf09 100644 --- a/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/pt/adminGuide/upgrade_milvus_standalone-operator.md @@ -46,11 +46,11 @@ helm -n milvus-operator upgrade milvus-

    Depois de ter atualizado o seu Milvus operator para a versão mais recente, tem as seguintes opções:

    -

    Realizar uma atualização contínua

    Desde a versão 2.2.3 do Milvus, é possível configurar os coordenadores do Milvus para funcionarem em modo de espera ativa e ativar a funcionalidade de atualização contínua para os mesmos, de modo a que o Milvus possa responder aos pedidos recebidos durante as actualizações dos coordenadores. Nas versões anteriores, os coordenadores devem ser removidos e depois criados durante uma atualização, o que pode provocar um certo tempo de inatividade do serviço.

    -

    Com base nas capacidades de atualização contínua fornecidas pela Kubernetes, o operador do Milvus impõe uma atualização ordenada das implementações de acordo com as suas dependências. Além disso, o Milvus implementa um mecanismo para garantir que os seus componentes permanecem compatíveis com os que deles dependem durante a atualização, reduzindo significativamente o potencial tempo de inatividade do serviço.

    +

    Desde a versão 2.2.3 do Milvus, é possível configurar os coordenadores do Milvus para funcionarem em modo de espera ativa e ativar a funcionalidade de atualização contínua para os mesmos, de modo a que o Milvus possa responder aos pedidos recebidos durante as actualizações do coordenador. Nas versões anteriores, os coordenadores devem ser removidos e depois criados durante uma atualização, o que pode provocar um certo tempo de inatividade do serviço.

    +

    Com base nas capacidades de atualização contínua fornecidas pelo Kubernetes, o operador do Milvus impõe uma atualização ordenada das implementações de acordo com as suas dependências. Além disso, o Milvus implementa um mecanismo para garantir que os seus componentes permanecem compatíveis com os que deles dependem durante a atualização, reduzindo significativamente o potencial tempo de inatividade do serviço.

    A funcionalidade de atualização contínua está desactivada por defeito. É necessário activá-la explicitamente através de um ficheiro de configuração.

    apiVersion: milvus.io/v1beta1
     kind: Milvus
    @@ -76,7 +76,7 @@ spec:
       components:
         enableRollingUpdate: true
         imageUpdateMode: rollingUpgrade # Default value, can be omitted
    -    image: milvusdb/milvus:v2.5.0-beta
    +    image: milvusdb/milvus:v2.5.0
     

    Neste ficheiro de configuração acima, defina spec.components.enableRollingUpdate para true e defina spec.components.image para a versão desejada do Milvus.

    Por predefinição, o Milvus efectua uma atualização contínua para os coordenadores de forma ordenada, substituindo as imagens do pod do coordenador uma após a outra. Para reduzir o tempo de atualização, considere definir spec.components.imageUpdateMode como all para que o Milvus substitua todas as imagens de pod ao mesmo tempo.

    @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

    Você pode definir spec.components.imageUpdateMode como rollingDowngrade para que o Milvus substitua as imagens do pod coordenador por uma versão inferior.

    apiVersion: milvus.io/v1beta1
    @@ -130,7 +130,7 @@ labels:
     spec:
       # Omit other fields ...
       components:
    -   image: milvusdb/milvus:v2.5.0-beta
    +   image: milvusdb/milvus:v2.5.0
     

    Em seguida, execute o seguinte para realizar a atualização:

    kubectl patch -f milvusupgrade.yaml
    @@ -150,8 +150,8 @@ spec:
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Desde o Milvus 2.2.0, os metadados são incompatíveis com os das versões anteriores. Os seguintes exemplos assumem uma atualização do Milvus 2.1.4 para o Milvus v2.5.0-beta.

    -

    1. Criar um ficheiro .yaml para migração de metadados

    Crie um ficheiro de migração de metadados. Segue-se um exemplo. É necessário especificar name, sourceVersion e targetVersion no ficheiro de configuração. O exemplo seguinte define name para my-release-upgrade, sourceVersion para v2.1.4, e targetVersion para v2.5.0-beta. Isto significa que a sua instância Milvus será actualizada da v2.1.4 para a v2.5.0-beta.

    +

    Desde o Milvus 2.2.0, os metadados são incompatíveis com os das versões anteriores. Os seguintes exemplos pressupõem uma atualização do Milvus 2.1.4 para o Milvus v2.5.0.

    +

    1. Criar um ficheiro .yaml para migração de metadados

    Crie um ficheiro de migração de metadados. Segue-se um exemplo. É necessário especificar name, sourceVersion e targetVersion no ficheiro de configuração. O exemplo seguinte define name para my-release-upgrade, sourceVersion para v2.1.4, e targetVersion para v2.5.0. Isto significa que a sua instância Milvus será actualizada da v2.1.4 para a v2.5.0.

    apiVersion: milvus.io/v1beta1
     kind: MilvusUpgrade
     metadata:
    @@ -161,9 +161,9 @@ spec:
         namespace: default
         name: my-release
       sourceVersion: "v2.1.4"
    -  targetVersion: "v2.5.0-beta"
    +  targetVersion: "v2.5.0"
       # below are some omit default values:
    -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
    +  # targetImage: "milvusdb/milvus:v2.5.0"
       # toolImage: "milvusdb/meta-migration:v2.2.0"
       # operation: upgrade
       # rollbackIfFailed: true
    diff --git a/localization/v2.5.x/site/pt/adminGuide/users_and_roles.json b/localization/v2.5.x/site/pt/adminGuide/users_and_roles.json
    new file mode 100644
    index 000000000..3b760064b
    --- /dev/null
    +++ b/localization/v2.5.x/site/pt/adminGuide/users_and_roles.json
    @@ -0,0 +1 @@
    +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"Criar utilizadores e funções","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"Utilizador","href":"User​","type":2,"isActive":false},{"label":"Função","href":"Role​","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/pt/adminGuide/users_and_roles.md b/localization/v2.5.x/site/pt/adminGuide/users_and_roles.md
    new file mode 100644
    index 000000000..8ad9af03c
    --- /dev/null
    +++ b/localization/v2.5.x/site/pt/adminGuide/users_and_roles.md
    @@ -0,0 +1,261 @@
    +---
    +id: users_and_roles.md
    +related_key: 'users, roles'
    +summary: >-
    +  O Milvus consegue um controlo de acesso mais refinado através do RBAC. Pode
    +  começar por criar utilizadores e funções, depois atribuir privilégios ou
    +  grupos de privilégios às funções e, por fim, gerir o controlo de acesso
    +  através da atribuição de funções aos utilizadores. Este método garante a
    +  eficiência e a segurança da gestão de acesso. Esta página apresenta a forma de
    +  criar utilizadores e funções no Milvus.
    +title: Criar utilizadores e funções
    +---
    +

    Criar utilizadores e funções

    O Milvus permite um controlo de acesso mais fino através do RBAC. Pode começar por criar utilizadores e funções, depois atribuir privilégios ou grupos de privilégios às funções e, por fim, gerir o controlo de acesso através da atribuição de funções aos utilizadores. Este método garante a eficiência e a segurança da gestão de acesso. Esta página apresenta a forma de criar utilizadores e funções no Milvus.

    +

    Utilizador

    Após a inicialização de uma instância do Milvus, é gerado automaticamente um utilizador raiz para autenticação quando se liga ao Milvus pela primeira vez. O nome de utilizador do utilizador raiz é root e a palavra-passe é Milvus. A função predefinida do utilizador raiz é admin, que tem acesso a todos os recursos. Para garantir a segurança dos dados, mantenha as credenciais do utilizador raiz seguras para evitar o acesso não autorizado.

    +

    Para operações diárias, recomendamos a criação de utilizadores em vez de utilizar o utilizador raiz.

    +

    Criar um utilizador

    O exemplo a seguir mostra como criar um usuário com o nome de usuário user_1 e a senha P@ssw0rd. O nome de utilizador e a palavra-passe do utilizador devem seguir estas regras.

    +
      +
    • Nome de utilizador: Deve começar com uma letra e só pode incluir letras maiúsculas ou minúsculas, números e sublinhados.

    • +
    • Palavra-passe: Deve ter entre 8 e 64 caracteres e deve incluir três das seguintes opções: letras maiúsculas, letras minúsculas, números e caracteres especiais.

    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.create_user(user_name="user_1", password="P@ssw0rd")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.CreateUserReq;​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +CreateUserReq createUserReq = CreateUserReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .build();​
    +        ​
    +client.createUser(createUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +await milvusClient.createUser({​
    +   username: 'user_1',​
    +   password: 'P@ssw0rd',​
    + });​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    Atualizar a palavra-passe

    Depois de criar um utilizador, pode atualizar a palavra-passe caso se esqueça.

    +

    A nova palavra-passe também deve seguir a seguinte regra.

    +
      +
    • Deve ter de 8 a 64 caracteres e incluir três dos seguintes: letras maiúsculas, letras minúsculas, números e caracteres especiais.
    • +
    +

    O exemplo a seguir mostra como atualizar a senha do usuário user_1 para NewP@ssw0rd.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.update_password(​
    +    user_name="user_1",​
    +    old_password="P@ssw0rd",​
    +    new_password="NewP@ssw0rd"​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
    +​
    +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
    +        .userName("user_1")​
    +        .password("P@ssw0rd")​
    +        .newPassword("NewP@ssw0rd")​
    +        .build();​
    +client.updatePassword(updatePasswordReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.updateUser({​
    +   username: 'user_1',​
    +   newPassword: 'P@ssw0rd',​
    +   oldPassword: 'NewP@ssw0rd',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "newPassword": "P@ssw0rd!",​
    +    "userName": "user_1",​
    +    "password": "P@ssw0rd"​
    +}'​
    +
    +
    +

    Listar utilizadores

    Depois de criar vários utilizadores, pode listar e visualizar todos os utilizadores existentes.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listUsers();​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Abaixo está um exemplo de saída. root é o utilizador predefinido gerado automaticamente no Milvus. user_1 é o novo utilizador que acabou de ser criado.

    +
    ['root', 'user_1']​
    +
    +
    +

    Função

    O Milvus fornece uma função incorporada chamada admin, que é uma função de administrador que pode aceder a recursos em todas as instâncias e tem privilégios para todas as operações. Para uma gestão de acesso mais refinada e uma maior segurança dos dados, recomenda-se que crie funções personalizadas com base nas suas necessidades.

    +

    Criar uma função

    O exemplo a seguir demonstra como criar uma função chamada role_a.

    +

    O nome da função deve seguir a seguinte regra.

    +
      +
    • Deve começar com uma letra e só pode incluir letras maiúsculas ou minúsculas, números e sublinhados."
    • +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.create_role(role_name="role_a")​
    +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
    +
    +
    +
    CreateRoleReq createRoleReq = CreateRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +       ​
    +
    +
    +
    client.createRole(createRoleReq);​
    +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.createRole({​
    +   roleName: 'role_a',​
    +});​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    Listar funções

    Depois de criar várias funções, pode listar e ver todas as funções existentes.

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> roles = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +await milvusClient.listRoles(​
    +    includeUserInfo: True​
    +);​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    Abaixo está um exemplo de saída. admin é a função padrão em Milvus. role_a é a nova função que acabou de ser criada.

    +
    ['admin', 'role_a']​
    +
    +
    diff --git a/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 3b4602cd8..04163e8ba 100644 --- a/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Executar o Milvus com o Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instalar o Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"Executar o Milvus com o Docker Compose (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instalar o Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"O que se segue","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.md index e5e520159..88366bae8 100644 --- a/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/pt/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: Executar o Milvus com o Docker Compose (Linux)

    O Milvus fornece um arquivo de configuração do Docker Compose no repositório do Milvus. Para instalar o Milvus usando o Docker Compose, basta executar

    # Download the configuration file
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     
     # Start Milvus
     $ sudo docker compose up -d
    @@ -132,7 +132,7 @@ $ sudo rm
     
  • Microsoft Azure
  • Explore o Milvus Backup, uma ferramenta de código aberto para backups de dados do Milvus.

  • -
  • Explore o Birdwatcher, uma ferramenta de código aberto para depuração do Milvus e actualizações de configuração dinâmica.

  • +
  • Explore o Birdwatcher, uma ferramenta de código aberto para depurar o Milvus e actualizações de configuração dinâmica.

  • Explore o Attu, uma ferramenta GUI de código aberto para gerenciamento intuitivo do Milvus.

  • Monitore o Milvus com o Prometheus.

  • diff --git a/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json index 40bc6f080..f9abff922 100644 --- a/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json +++ b/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json @@ -1 +1 @@ -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Executar o Milvus com suporte a GPU usando o Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instalar o Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configurar o pool de memória","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"O que vem a seguir","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: [\"0\"]\n...\n","...\nstandalone:\n ...\n deploy:\n resources:\n reservations:\n devices:\n - driver: nvidia\n capabilities: [\"gpu\"]\n device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n initMemSize: 0\n maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"Executar o Milvus com suporte a GPU usando o Docker Compose","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"Pré-requisitos","href":"Prerequisites","type":2,"isActive":false},{"label":"Instalar o Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"Configurar o pool de memória","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"O que vem a seguir","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md index f8ca50e6c..ffb8e154d 100644 --- a/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md +++ b/localization/v2.5.x/site/pt/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md @@ -59,14 +59,14 @@ title: Executar o Milvus com suporte a GPU usando o Docker Compose >

    Para instalar o Milvus com suporte a GPU usando o Docker Compose, siga estas etapas.

    -

    1. Descarregar e configurar o ficheiro YAML

    Faça o download milvus-standalone-docker-compose-gpu.yml e salve-o como docker-compose.yml manualmente ou com o seguinte comando.

    -
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
    +

    1. Descarregar e configurar o ficheiro YAML

    Faça o download milvus-standalone-docker-compose-gpu.yml e salve-o como docker-compose.yml manualmente ou com o seguinte comando.

    +
    $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
     

    É necessário fazer algumas alterações nas variáveis de ambiente do serviço autónomo no ficheiro YAML, como se segue:

    • Para atribuir um dispositivo GPU específico ao Milvus, localize o campo deploy.resources.reservations.devices[0].devices_ids na definição do serviço standalone e substitua o seu valor pelo ID da GPU pretendida. Pode utilizar a ferramenta nvidia-smi, incluída nos controladores de visualização da GPU NVIDIA, para determinar a ID de um dispositivo GPU. O Milvus suporta múltiplos dispositivos GPU.
    -

    Atribuir um único dispositivo GPU ao Milvus:

    +

    Atribua um único dispositivo GPU ao Milvus:

    ...
     standalone:
       ...
    @@ -148,7 +148,7 @@ $ sudo rm
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Depois de o Milvus estar em funcionamento, pode personalizar a reserva de memória modificando as definições initMemSize e maxMemSize no ficheiro milvus.yaml.

    +

    Depois de o Milvus estar a funcionar, pode personalizar a reserva de memória modificando as definições initMemSize e maxMemSize no ficheiro milvus.yaml.

    O ficheiro milvus.yaml está localizado no diretório /milvus/configs/ dentro do contentor do Milvus.

    @@ -169,7 +169,7 @@ gpu:
    • initMemSize: Initial size of the memory pool. A predefinição é 1024.
    • -
    • maxMemSize: Tamanho máximo do conjunto de memória. A predefinição é 2048.
    • +
    • maxMemSize: Tamanho máximo do conjunto de memória. O padrão é 2048.
  • Utilize o seguinte comando para copiar o ficheiro milvus.yaml modificado de volta para o contentor Milvus. Substitua <milvus_container_id> pelo seu ID real do contentor Milvus.

    docker cp milvus.yaml <milvus_container_id>:/milvus/configs/milvus.yaml
    @@ -215,7 +215,7 @@ docker start <milvus_container_id>
     
  • Microsoft Azure
  • Explore o Milvus Backup, uma ferramenta de código aberto para backups de dados do Milvus.

  • -
  • Explore o Birdwatcher, uma ferramenta de código aberto para depuração do Milvus e actualizações dinâmicas de configuração.

  • +
  • Explore o Birdwatcher, uma ferramenta de código aberto para depurar o Milvus e actualizações de configuração dinâmica.

  • Explore o Attu, uma ferramenta GUI de código aberto para gerenciamento intuitivo do Milvus.

  • Monitore o Milvus com o Prometheus.

  • diff --git a/localization/v2.5.x/site/pt/menuStructure/pt.json b/localization/v2.5.x/site/pt/menuStructure/pt.json index 570d17092..c042422d9 100644 --- a/localization/v2.5.x/site/pt/menuStructure/pt.json +++ b/localization/v2.5.x/site/pt/menuStructure/pt.json @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "Filtragem", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "Explicação da filtragem", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "Operadores básicos", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "Filtragem de modelos", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "Operadores JSON", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "Operadores de matriz", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "Pesquisa de texto integral", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "Correspondência de texto", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "Iteradores de pesquisa", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "Utilizar chave de partição", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "Filtragem de metadados", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "Reranking", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "Utilizadores, privilégios e funções", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "Ativar RBAC", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "Explicação do RBAC", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "Criar utilizadores e funções", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "Criar grupo de privilégios", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "Conceder privilégios", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "Funções de subvenção", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "Largar utilizadores e funções", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "Encriptação em trânsito", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus WebUI", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Ferramenta de dimensionamento Milvus", "id": "sizing", diff --git a/localization/v2.5.x/site/pt/release_notes.json b/localization/v2.5.x/site/pt/release_notes.json index 52f9f1304..924ab8d06 100644 --- a/localization/v2.5.x/site/pt/release_notes.json +++ b/localization/v2.5.x/site/pt/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Notas de lançamento","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"Notas de lançamento","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/release_notes.md b/localization/v2.5.x/site/pt/release_notes.md index 25236b05d..5b8ff7b3f 100644 --- a/localization/v2.5.x/site/pt/release_notes.md +++ b/localization/v2.5.x/site/pt/release_notes.md @@ -19,7 +19,7 @@ title: Notas de lançamento >

    Descubra o que há de novo no Milvus! Esta página resume as novas funcionalidades, melhorias, problemas conhecidos e correcções de erros em cada versão. Pode encontrar as notas de lançamento para cada versão lançada após a v2.5.0 nesta secção. Sugerimos que visite regularmente esta página para se informar sobre as actualizações.

    -

    v2.5.0-beta

    Data de lançamento: 26 de novembro de 2024

    +

    Data de lançamento: 23 de dezembro de 2024

    - +
    Versão do MilvusVersão do Python SDKVersão do SDK do Node.jsVersão do Java SDK
    2.5.0-beta2.5.02.5.02.5.0
    2.5.02.5.12.5.22.5.2
    -

    O Milvus 2.5.0-beta traz avanços significativos para melhorar a usabilidade, a escalabilidade e o desempenho para os utilizadores que lidam com pesquisa vetorial e gestão de dados em grande escala. Com esta versão, o Milvus integra novas funcionalidades poderosas, como a pesquisa baseada em termos, a compactação de clusters para consultas optimizadas e o suporte versátil para métodos de pesquisa vetorial esparsos e densos. As melhorias na gestão de clusters, indexação e tratamento de dados introduzem novos níveis de flexibilidade e facilidade de utilização, tornando o Milvus uma base de dados vetorial ainda mais robusta e fácil de utilizar.

    +

    O Milvus 2.5.0 traz avanços significativos para melhorar a usabilidade, a escalabilidade e o desempenho dos utilizadores que lidam com pesquisa vetorial e gestão de dados em grande escala. Com esta versão, o Milvus integra novas funcionalidades poderosas, como a pesquisa baseada em termos, a compactação de clusters para consultas optimizadas e o suporte versátil para métodos de pesquisa vetorial esparsos e densos. As melhorias na gestão de clusters, indexação e tratamento de dados introduzem novos níveis de flexibilidade e facilidade de utilização, tornando o Milvus uma base de dados vetorial ainda mais robusta e fácil de utilizar.

    Caraterísticas principais

    Milvus 2.5 suporta pesquisa de texto completo implementada com Sparse-BM25! Esta funcionalidade é um complemento importante às fortes capacidades de pesquisa semântica do Milvus, especialmente em cenários que envolvem palavras raras ou termos técnicos. Em versões anteriores, o Milvus suportava vectores esparsos para ajudar em cenários de pesquisa por palavras-chave. Estes vectores esparsos eram gerados fora do Milvus por modelos neurais como o SPLADEv2/BGE-M3 ou modelos estatísticos como o algoritmo BM25.

    Com a ajuda do Tantivy, o Milvus 2.5 tem analisadores integrados e extração de vectores esparsos, alargando a API de apenas receber vectores como entrada para aceitar diretamente texto. As informações estatísticas do BM25 são actualizadas em tempo real à medida que os dados são inseridos, melhorando a facilidade de utilização e a precisão. Além disso, os vectores esparsos baseados em algoritmos de vizinho mais próximo aproximado (ANN) oferecem um desempenho mais poderoso do que os sistemas de pesquisa de palavras-chave padrão.

    Para obter detalhes, consulte Visão geral do Analyzer e Pesquisa de texto completo.

    @@ -56,11 +56,11 @@ title: Notas de lançamento

    Para obter detalhes, consulte Índice de bitmap.

    Nullable & Valor Padrão

    Milvus agora suporta a configuração de propriedades anuláveis e valores padrão para campos escalares que não sejam o campo de chave primária. Para campos escalares marcados como nullable=True, os utilizadores podem omitir o campo ao inserir dados; o sistema irá tratá-lo como um valor nulo ou valor por defeito (se definido) sem lançar um erro.

    Os valores por defeito e as propriedades anuláveis proporcionam uma maior flexibilidade ao Milvus. Os utilizadores podem utilizar esta funcionalidade para campos com valores incertos ao criar colecções. Também simplifica a migração de dados de outros sistemas de base de dados para o Milvus, permitindo a manipulação de conjuntos de dados que contêm valores nulos, preservando as definições originais de valores por defeito.

    -

    Para mais pormenores, consulte Nullable & Default Value.

    +

    Para mais informações, consulte Nullable & Default Value.

    HNSW SQ/PQ/PRQ baseado em Faiss

    Através de uma estreita colaboração com a comunidade Faiss, o algoritmo HNSW em Faiss registou melhorias significativas tanto na funcionalidade como no desempenho. Por questões de estabilidade e manutenção, o Milvus 2.5 migrou oficialmente seu suporte ao HNSW da hnswlib para o Faiss.

    -

    Baseado no Faiss, o Milvus 2.5 suporta múltiplos métodos de quantização no HNSW para atender às necessidades de diferentes cenários: SQ (Scalar Quantizers), PQ (Product Quantizer), e PRQ (Product Residual Quantizer). SQ e PQ são mais comuns; SQ oferece um bom desempenho de consulta e velocidade de construção, enquanto PQ oferece uma melhor recuperação com o mesmo rácio de compressão. Muitas bases de dados vectoriais utilizam normalmente a quantização binária, que é uma forma simples de quantização SQ.

    -

    PRQ é uma fusão de PQ e AQ (Quantizador Aditivo). Em comparação com a PQ, requer tempos de construção mais longos para proporcionar uma melhor recuperação, especialmente a taxas de compressão elevadas, dizendo compressão binária.

    -

    Compactação por agrupamento (Beta)

    O Milvus 2.5 introduz o Clustering Compaction para acelerar as pesquisas e reduzir os custos em grandes colecções. Ao especificar um campo escalar como uma chave de agrupamento, os dados são redistribuídos por intervalo para otimizar o armazenamento e a recuperação. Agindo como um índice global, esse recurso permite que o Milvus remova eficientemente os dados durante as consultas com base em metadados de agrupamento, melhorando o desempenho da pesquisa quando filtros escalares são aplicados.

    +

    Baseado em Faiss, Milvus 2.5 suporta múltiplos métodos de quantização em HNSW para atender às necessidades de diferentes cenários: SQ (Scalar Quantizers), PQ (Product Quantizer), e PRQ (Product Residual Quantizer). SQ e PQ são mais comuns; SQ oferece um bom desempenho de consulta e velocidade de construção, enquanto PQ oferece uma melhor recuperação com o mesmo rácio de compressão. Muitas bases de dados vectoriais utilizam normalmente a quantização binária, que é uma forma simples de quantização SQ.

    +

    PRQ é uma fusão de PQ e AQ (Quantizador Aditivo). Em comparação com o PQ, requer tempos de construção mais longos para proporcionar uma melhor recuperação, especialmente a taxas de compressão elevadas, dizendo compressão binária.

    +

    Compactação por agrupamento (Beta)

    O Milvus 2.5 introduz o Clustering Compaction para acelerar as pesquisas e reduzir os custos em grandes colecções. Ao especificar um campo escalar como uma chave de agrupamento, os dados são redistribuídos por intervalo para otimizar o armazenamento e a recuperação. Agindo como um índice global, este recurso permite que o Milvus retire eficientemente os dados durante as consultas baseadas em metadados de agrupamento, melhorando o desempenho da pesquisa quando filtros escalares são aplicados.

    Para obter detalhes, consulte Compactação de clustering.

    Outros recursos

    Nó de fluxo contínuo (Beta)

    O Milvus 2.5 introduz um novo componente chamado nó de streaming, que fornece serviços de Write-Ahead Logging (WAL). Isto permite ao Milvus obter consenso antes e depois de ler e escrever canais, desbloqueando novas caraterísticas, funcionalidades e optimizações. Esta funcionalidade está desactivada por defeito no Milvus 2.5 e estará oficialmente disponível na versão 3.0.

    Suporte a IPv6

    Milvus agora suporta IPv6, permitindo maior conetividade e compatibilidade de rede.

    @@ -80,4 +80,7 @@ title: Notas de lançamento

    Armazenamento local V2

    Introduziu um novo formato de arquivo local no Milvus 2.5, melhorando a eficiência de carregamento e consulta para dados escalares, reduzindo a sobrecarga de memória e estabelecendo as bases para futuras otimizações.

    Otimização da análise de expressões

    Melhoria da análise de expressões através da implementação de cache para expressões repetidas, atualização do ANTLR e otimização do desempenho das cláusulas NOT IN.

    Desempenho aprimorado da simultaneidade de DDL

    Otimizado o desempenho de simultaneidade das operações da Linguagem de Definição de Dados (DDL).

    -

    Alinhamento de recursos da API RESTful

    Alinhou as funcionalidades da API RESTful com outros SDKs para obter consistência.

    +

    Alinhamento de recursos da API RESTful

    Alinhamento das funcionalidades da API RESTful com outros SDKs para fins de consistência.

    +

    Atualizações de segurança e configuração

    Suporte a TLS para proteger a comunicação entre nós em ambientes mais complexos ou corporativos. Para obter detalhes, consulte Configuração de segurança.

    +

    Aprimoramentos de desempenho de compactação

    Removidas as limitações de segmento máximo na compactação mista e agora prioriza primeiro os segmentos menores, melhorando a eficiência e acelerando as consultas em conjuntos de dados grandes ou fragmentados.

    +

    Balanceamento de canais com base em pontuação

    Introduzida uma política que equilibra dinamicamente as cargas entre canais, melhorando a utilização de recursos e a estabilidade geral em implementações de grande escala.

    diff --git a/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.json index 38a01f946..f23ccd8d0 100644 --- a/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modificar coleção","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Mudar o nome da coleção","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Definir TTL da coleção","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"Modificar coleção","href":"Modify-Collection​","type":1,"isActive":false},{"label":"Mudar o nome da coleção","href":"Rename-Collection​","type":2,"isActive":false},{"label":"Definir TTL da coleção","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.md index 13e89888a..c12f1f14c 100644 --- a/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/pt/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

    Se uma coleção precisar de ser abandonada durante um período específico, considere definir o seu Time-To-Live (TTL) em segundos. Uma vez que o TTL se esgota, o Milvus apaga as entidades da coleção e abandona a coleção. A exclusão é assíncrona, indicando que as pesquisas e consultas ainda são possíveis antes que a exclusão seja concluída.

    +

    Se uma coleção precisar de ser abandonada durante um período específico, considere definir o seu Time-To-Live (TTL) em segundos. Uma vez que o TTL se esgota, Milvus apaga as entidades da coleção. A eliminação é assíncrona, indicando que as pesquisas e consultas ainda são possíveis antes de a eliminação estar concluída.

    O trecho de código a seguir demonstra como alterar o TTL de uma coleção.

    -
    # Currently not available for Python
    +
    from pymilvus import MilvusClient
     
    +client.alter_collection_properties(
    +  collection_name="collection_name",
    +  properties = {"collection.ttl.seconds": 500}
    +)
     
    import io.milvus.v2.service.collection.request.AlterCollectionReq;​
     import java.util.HashMap;​
    diff --git a/localization/v2.5.x/site/pt/userGuide/schema/string.md b/localization/v2.5.x/site/pt/userGuide/schema/string.md
    index ccd8cb9a0..de12e2da4 100644
    --- a/localization/v2.5.x/site/pt/userGuide/schema/string.md
    +++ b/localization/v2.5.x/site/pt/userGuide/schema/string.md
    @@ -5,7 +5,7 @@ summary: >-
       Em Milvus, VARCHAR é o tipo de dados utilizado para armazenar dados do tipo
       string, adequado para armazenar strings de comprimento variável. Pode
       armazenar cadeias com caracteres de um ou vários bytes, com um comprimento
    -  máximo de até 60.535 caracteres. Ao definir um campo VARCHAR, é necessário
    +  máximo de até 65.535 caracteres. Ao definir um campo VARCHAR, é necessário
       especificar também o parâmetro de comprimento máximo max_length. O tipo de
       cadeia de caracteres VARCHAR oferece uma forma eficiente e flexível de
       armazenar e gerir dados de texto, tornando-o ideal para aplicações que lidam
    @@ -26,7 +26,7 @@ summary: >-
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    Em Milvus, VARCHAR é o tipo de dados utilizado para armazenar dados do tipo cadeia de caracteres, adequado para armazenar cadeias de caracteres de comprimento variável. Pode armazenar cadeias com caracteres de um ou vários bytes, com um comprimento máximo de 60.535 caracteres. Ao definir um campo VARCHAR, deve também especificar o parâmetro de comprimento máximo max_length. O tipo de cadeia de caracteres VARCHAR oferece uma forma eficiente e flexível de armazenar e gerir dados de texto, tornando-o ideal para aplicações que lidam com cadeias de caracteres de comprimentos variáveis.

    +

    Em Milvus, VARCHAR é o tipo de dados utilizado para armazenar dados do tipo cadeia de caracteres, adequado para armazenar cadeias de caracteres de comprimento variável. Pode armazenar cadeias com caracteres de um ou vários bytes, com um comprimento máximo de 65.535 caracteres. Ao definir um campo VARCHAR, deve também especificar o parâmetro de comprimento máximo max_length. O tipo de cadeia de caracteres VARCHAR oferece uma forma eficiente e flexível de armazenar e gerir dados de texto, tornando-o ideal para aplicações que lidam com cadeias de caracteres de comprimentos variáveis.

    Adicionar um campo VARCHAR

    Para além de AUTOINDEX, pode especificar outros tipos de índices escalares, como INVERTED ou BITMAP. Para tipos de índice suportados, consulte Índices escalares.

    -

    Além disso, antes de criar a coleção, tem de criar um índice para o campo vetorial. Neste exemplo, usamos AUTOINDEX para simplificar as configurações de índice de vetor.

    +

    Além disso, antes de criar a coleção, tem de criar um índice para o campo vetorial. Neste exemplo, utilizamos AUTOINDEX para simplificar as definições do índice de vetor.

    # Add vector index​
    diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.json b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.json
    new file mode 100644
    index 000000000..71eaa728b
    --- /dev/null
    +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.json
    @@ -0,0 +1 @@
    +{"codeList":["filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​\n\n","filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​\n\n","filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​\n\n","filter = 'ARRAY_LENGTH(history_temperatures) < 10'​\n\n"],"headingContent":"ARRAY Operators​","anchorList":[{"label":"Operadores ARRAY","href":"ARRAY-Operators​","type":1,"isActive":false},{"label":"Operadores ARRAY disponíveis","href":"Available-ARRAY-Operators​","type":2,"isActive":false},{"label":"ARRAY_CONTAINS","href":"ARRAYCONTAINS​","type":2,"isActive":false},{"label":"ARRAY_CONTAINS_ALL","href":"ARRAYCONTAINSALL​","type":2,"isActive":false},{"label":"ARRAY_CONTAINS_ANY","href":"ARRAYCONTAINSANY​","type":2,"isActive":false},{"label":"ARRAY_LENGTH","href":"ARRAYLENGTH​","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.md b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.md
    new file mode 100644
    index 000000000..41323ca05
    --- /dev/null
    +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/array-operators.md
    @@ -0,0 +1,137 @@
    +---
    +id: array-operators.md
    +summary: >-
    +  O Milvus fornece operadores poderosos para consultar campos de matrizes,
    +  permitindo-lhe filtrar e recuperar entidades com base no conteúdo das
    +  matrizes. 
    +title: Operadores de matriz
    +---
    +

    Operadores ARRAY

    Milvus fornece operadores poderosos para consultar campos de arrays, permitindo-lhe filtrar e recuperar entidades com base no conteúdo de arrays.

    +
    +

    Todos os elementos dentro de uma matriz devem ser do mesmo tipo, e as estruturas aninhadas dentro de matrizes são tratadas como strings simples. Portanto, ao trabalhar com campos ARRAY, é aconselhável evitar aninhamentos excessivamente profundos e garantir que as estruturas de dados sejam tão planas quanto possível para um desempenho ideal.

    +
    +

    Operadores ARRAY disponíveis

    Os operadores ARRAY permitem uma consulta detalhada dos campos de matriz em Milvus. Estes operadores são.

    + +

    ARRAY_CONTAINS

    O operador ARRAY_CONTAINS verifica se um elemento específico existe num campo de matriz. É útil quando se pretende encontrar entidades onde um determinado elemento está presente na matriz.

    +

    Exemplo

    +

    Suponha que tem um campo de matriz history_temperatures, que contém as temperaturas mais baixas registadas para diferentes anos. Para encontrar todas as entidades em que a matriz contém o valor 23, pode utilizar a seguinte expressão de filtro.

    +
    filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
    +
    +
    +

    Isso retornará todas as entidades onde a matriz history_temperatures contém o valor 23.

    +

    ARRAY_CONTAINS_ALL

    O operador ARRAY_CONTAINS_ALL garante que todos os elementos da lista especificada estão presentes no campo da matriz. Este operador é útil quando se pretende fazer corresponder entidades que contêm valores múltiplos na matriz.

    +

    Exemplo

    +

    Se você quiser encontrar todas as entidades onde a matriz history_temperatures contém ambos 23 e 24, você pode usar.

    +
    filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
    +
    +
    +

    Isso retornará todas as entidades onde a matriz history_temperatures contém ambos os valores especificados.

    +

    ARRAY_CONTAINS_ANY

    O operador ARRAY_CONTAINS_ANY verifica se algum dos elementos da lista especificada está presente no campo da matriz. Isto é útil quando se pretende fazer corresponder entidades que contêm pelo menos um dos valores especificados na matriz.

    +

    Exemplo

    +

    Para encontrar todas as entidades onde a matriz history_temperatures contém 23 ou 24, você pode usar.

    +
    filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
    +
    +
    +

    Isso retornará todas as entidades onde a matriz history_temperatures contém pelo menos um dos valores 23 ou 24.

    +

    ARRAY_LENGTH

    O operador ARRAY_LENGTH permite-lhe filtrar entidades com base no número de elementos num campo de matriz. Isto é útil quando é necessário encontrar entidades com arrays de um determinado comprimento.

    +

    Exemplo

    +

    Se você quiser encontrar todas as entidades onde a matriz history_temperatures tem menos de 10 elementos, você pode usar.

    +
    filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
    +
    +
    +

    Isso retornará todas as entidades onde a matriz history_temperatures tem menos de 10 elementos.

    diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..a615ed4a8 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"Operadores básicos","href":"Basic-Operators​","type":1,"isActive":false},{"label":"Operadores de comparação","href":"Comparison-operators​","type":2,"isActive":false},{"label":"Operadores de intervalo","href":"Range-operators​","type":2,"isActive":false},{"label":"Operadores aritméticos","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"Operadores lógicos","href":"Logical-Operators​","type":2,"isActive":false},{"label":"Dicas sobre como usar operadores básicos com campos JSON e ARRAY","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"Conclusão","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..76a041bcf --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,237 @@ +--- +id: basic-operators.md +summary: >- + O Milvus fornece um conjunto rico de operadores básicos para o ajudar a + filtrar e consultar dados de forma eficiente. Estes operadores permitem-lhe + refinar as suas condições de pesquisa com base em campos escalares, cálculos + numéricos, condições lógicas e muito mais. Compreender como utilizar estes + operadores é crucial para construir consultas precisas e maximizar a + eficiência das suas pesquisas. +title: Operadores básicos +--- +

    Operadores básicos

    Milvus fornece um conjunto rico de operadores básicos para o ajudar a filtrar e consultar dados de forma eficiente. Estes operadores permitem-lhe refinar as suas condições de pesquisa com base em campos escalares, cálculos numéricos, condições lógicas, e muito mais. Compreender como usar estes operadores é crucial para construir consultas precisas e maximizar a eficiência das suas pesquisas.

    +

    Operadores de comparação

    Os operadores de comparação são utilizados para filtrar dados com base na igualdade, desigualdade ou tamanho. Eles são aplicáveis a campos numéricos, de texto e de data.

    +

    Operadores de comparação suportados.

      +
    • == (Igual a)

    • +
    • != (Não igual a)

    • +
    • > (Maior que)

    • +
    • < (Menor que)

    • +
    • >= (Maior que ou igual a)

    • +
    • <= (Menor ou igual a)

    • +
    +

    Exemplo 1: Filtragem com Equal To (==)

    Suponha que tem um campo chamado status e quer encontrar todas as entidades em que status está "ativo". Você pode usar o operador de igualdade ==.

    +
    filter = 'status == "active"'​
    +
    +
    +

    Exemplo 2: Filtragem com Not Equal To (!=)

    Para encontrar entidades onde status não é "inativo".

    +
    filter = 'status != "inactive"'​
    +
    +
    +

    Exemplo 3: Filtragem com Greater Than (>)

    Se você quiser encontrar todas as entidades com um age maior que 30.

    +
    filter = 'age > 30'​
    +
    +
    +

    Exemplo 4: Filtrando com Menor que (<)

    Para encontrar entidades onde price é menor que 100.

    +
    filter = 'price < 100'​
    +
    +
    +

    Exemplo 5: Filtrando com Maior ou Igual a (>=)

    Se você quiser encontrar todas as entidades com rating maior ou igual a 4.

    +
    filter = 'rating >= 4'​
    +
    +
    +

    Exemplo 6: Filtrando com Menor que ou Igual a (<=)

    Para encontrar entidades com discount menor ou igual a 10%.

    +
    filter = 'discount <= 10'​
    +
    +
    +

    Operadores de intervalo

    Os operadores de intervalo ajudam a filtrar dados com base em conjuntos específicos ou intervalos de valores.

    +

    Operadores de intervalo suportados.

      +
    • IN: Utilizados para fazer a correspondência de valores dentro de um conjunto ou intervalo específico.

    • +
    • LIKE: Usado para corresponder a um padrão (principalmente para campos de texto).

    • +
    +

    Exemplo 1: Usando IN para corresponder a vários valores

    Se você quiser encontrar todas as entidades onde o color é "vermelho", "verde" ou "azul".

    +
    filter = 'color in ["red", "green", "blue"]'​
    +
    +
    +

    Isso é útil quando se deseja verificar a associação em uma lista de valores.

    +

    Exemplo 2: Usando LIKE para correspondência de padrão

    O operador LIKE é utilizado para correspondência de padrões em campos de cadeia de caracteres. Ele pode corresponder substrings em diferentes posições dentro do texto: como um prefixo, infixo ou sufixo. O operador LIKE utiliza o símbolo % como um wildcard, que pode corresponder a qualquer número de caracteres (incluindo zero).

    +

    Correspondência de prefixo (começa com)

    Para efetuar uma correspondência de prefixo, em que a cadeia de caracteres começa com um determinado padrão, pode colocar o padrão no início e utilizar % para corresponder a quaisquer caracteres a seguir. Por exemplo, para encontrar todos os produtos cujo name comece por "Prod".

    +
    filter = 'name LIKE "Prod%"'​
    +
    +
    +

    Isto irá corresponder a qualquer produto cujo nome comece por "Prod", como "Produto A", "Produto B", etc.

    +

    Correspondência de sufixo (termina com)

    Para uma correspondência de sufixo, em que a cadeia de caracteres termina com um determinado padrão, coloque o símbolo % no início do padrão. Por exemplo, para encontrar todos os produtos cujo name termina com "XYZ".

    +
    filter = 'name LIKE "%XYZ"'​
    +
    +
    +

    Isto corresponderá a qualquer produto cujo nome termine com "XYZ", como "ProductXYZ", "SampleXYZ", etc.

    +

    Correspondência de infixos (Contém)

    Para efetuar uma correspondência infixa, em que o padrão pode aparecer em qualquer parte da cadeia de caracteres, pode colocar o símbolo % no início e no fim do padrão. Por exemplo, para encontrar todos os produtos cujo name contenha a palavra "Pro".

    +
    filter = 'name LIKE "%Pro%"'​
    +
    +
    +

    Isso corresponderá a qualquer produto cujo nome contenha a substring "Pro", como "Product", "ProLine" ou "SuperPro".

    +

    Operadores aritméticos

    Os operadores aritméticos permitem-lhe criar condições com base em cálculos que envolvem campos numéricos.

    +

    Operadores aritméticos suportados.

      +
    • + (Adição)

    • +
    • - (Subtração)

    • +
    • * (Multiplicação)

    • +
    • / (Divisão)

    • +
    • % (Módulo)

    • +
    • ** (Exponenciação)

    • +
    +

    Exemplo 1: Utilizar a adição (+)

    Para encontrar entidades onde o preço total é a soma de base_price e tax.

    +
    filter = 'total == base_price + tax'​
    +
    +
    +

    Exemplo 2: Usando Subtração (-)

    Para encontrar entidades onde quantity é maior que 50 e quantity_sold é menor que 30.

    +
    filter = 'quantity - quantity_sold > 50'​
    +
    +
    +

    Exemplo 3: Usando Multiplicação (*)

    Para encontrar entidades onde price é maior que 100 e quantity é maior que 10, multiplicado.

    +
    filter = 'price * quantity > 1000'​
    +
    +
    +

    Exemplo 4: Utilizar a divisão (/)

    Para encontrar produtos em que total_price dividido por quantity é menor que 50.

    +
    filter = 'total_price / quantity < 50'​
    +
    +
    +

    Exemplo 5: Usando Modulus (%)

    Para encontrar entidades onde o id é um número par (ou seja, divisível por 2).

    +
    filter = 'id % 2 == 0'​
    +
    +
    +

    Exemplo 6: Usando Exponenciação (**)

    Para encontrar entidades onde price elevado à potência de 2 é maior que 1000.

    +
    filter = 'price ** 2 > 1000'​
    +
    +
    +

    Operadores lógicos

    Os operadores lógicos são usados para combinar várias condições em uma expressão de filtro mais complexa. Estes incluem AND, OR, e NOT.

    +

    Operadores lógicos suportados.

      +
    • AND: Combina várias condições que devem ser todas verdadeiras.

    • +
    • OR: Combina condições em que pelo menos uma deve ser verdadeira.

    • +
    • NOT: Nega uma condição.

    • +
    +

    Exemplo 1: Usando AND para combinar condições

    Para encontrar todos os produtos em que price é maior que 100 e stock é maior que 50.

    +
    filter = 'price > 100 AND stock > 50'​
    +
    +
    +

    Exemplo 2: Usando OR para combinar condições

    Para encontrar todos os produtos em que color é "red" (vermelho) ou "blue" (azul).

    +
    filter = 'color == "red" OR color == "blue"'​
    +
    +
    +

    Exemplo 3: Usando NOT para excluir uma condição

    Para encontrar todos os produtos em que color não seja "verde".

    +
    filter = 'NOT color == "green"'​
    +
    +
    +

    Dicas sobre como usar operadores básicos com campos JSON e ARRAY

    Embora os operadores básicos do Milvus sejam versáteis e possam ser aplicados a campos escalares, eles também podem ser usados de forma eficaz com as chaves e índices nos campos JSON e ARRAY.

    +

    Por exemplo, se tiver um campo product que contenha várias chaves como price, model, e tags, faça sempre referência à chave diretamente.

    +
    filter = 'product["price"] > 1000'​
    +
    +
    +

    Para encontrar registos em que a primeira temperatura de uma matriz de temperaturas registadas excede um determinado valor, utilize.

    +
    filter = 'history_temperatures[0] > 30'​
    +
    +
    +

    Conclusão

    O Milvus oferece uma gama de operadores básicos que lhe dão flexibilidade na filtragem e consulta dos seus dados. Ao combinar operadores de comparação, de intervalo, aritméticos e lógicos, pode criar expressões de filtragem poderosas para restringir os resultados da pesquisa e obter os dados de que necessita de forma eficiente.

    diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..53c48351a --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"Explicação da filtragem","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"Operadores básicos","href":"Basic-operators​","type":2,"isActive":false},{"label":"Modelos de expressão de filtro","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"Operadores específicos de tipo de dados","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..78379ce1b --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,147 @@ +--- +id: boolean.md +summary: >- + Milvus fornece capacidades de filtragem poderosas que permitem uma consulta + precisa dos seus dados. As expressões de filtragem permitem-lhe direcionar + campos escalares específicos e refinar os resultados da pesquisa com + diferentes condições. Este guia explica como utilizar as expressões de + filtragem no Milvus, com exemplos centrados nas operações de consulta. Também + pode aplicar estes filtros em pedidos de pesquisa e eliminação. +title: Explicação da filtragem +--- +

    Explicação da filtragem

    Milvus fornece poderosas capacidades de filtragem que permitem uma consulta precisa dos seus dados. As expressões de filtragem permitem-lhe direcionar campos escalares específicos e refinar os resultados da pesquisa com diferentes condições. Este guia explica como utilizar expressões de filtragem no Milvus, com exemplos focados em operações de consulta. Também pode aplicar estes filtros em pedidos de pesquisa e eliminação.

    +

    Operadores básicos

    O Milvus suporta vários operadores básicos para filtrar dados.

    +
      +
    • Operadores de comparação: ==, !=, >, <, >=, e <= permitem filtrar com base em campos numéricos, de texto ou de data.

    • +
    • Filtros de intervalo: IN e LIKE ajudam a corresponder a intervalos ou conjuntos de valores específicos.

    • +
    • Operadores aritméticos: +, -, *, /, %, e ** são utilizados para cálculos que envolvem campos numéricos.

    • +
    • Operadores lógicos: AND, OR, e NOT combinam várias condições em expressões complexas.

    • +
    +

    Exemplo: Filtragem por cor

    Para encontrar entidades com cores primárias (vermelho, verde ou azul) em um campo escalar color, use a seguinte expressão de filtro.

    +
    filter='color in ["red", "green", "blue"]'​
    +
    +
    +

    Exemplo: Filtragem de campos JSON

    Milvus permite referenciar chaves em campos JSON. Por exemplo, se tiver um campo JSON product com as chaves price e model, e quiser encontrar produtos com um modelo específico e um preço inferior a 1.850, utilize esta expressão de filtro.

    +
    filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
    +
    +
    +

    Exemplo: Filtragem de campos de matriz

    Se tiver um campo de matriz history_temperatures que contenha registos de temperatura e pretender encontrar observatórios em que a 10ª temperatura registada seja superior a 23°C, utilize esta expressão.

    +
    filter='history_temperatures[10] > 23'​
    +
    +
    +

    Para mais informações sobre estes operadores básicos, consulte Operadores básicos.

    +

    Modelos de expressão de filtro

    Ao filtrar utilizando caracteres CJK, o processamento pode ser mais complexo devido aos seus conjuntos de caracteres maiores e às diferenças de codificação. Isto pode resultar num desempenho mais lento, especialmente com o operador IN.

    +

    O Milvus introduz modelos de expressão de filtro para otimizar o desempenho quando se trabalha com caracteres CJK. Ao separar os valores dinâmicos da expressão de filtro, o motor de consulta lida com a inserção de parâmetros de forma mais eficiente.

    +

    Exemplo

    Para encontrar indivíduos com mais de 25 anos que vivem em "北京" (Pequim) ou "上海" (Xangai), use a seguinte expressão de modelo.

    +
    filter = "age > 25 AND city IN ['北京', '上海']"​
    +
    +
    +

    Para melhorar o desempenho, use esta variação com parâmetros.

    +
    filter = "age > {age} AND city in {city}",​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    Esta abordagem reduz a sobrecarga de análise e melhora a velocidade de consulta. Para obter mais informações, consulte Modelo de filtro.

    +

    Operadores específicos de tipo de dados

    O Milvus fornece operadores de filtragem avançados para tipos de dados específicos, como campos JSON, ARRAY e VARCHAR.

    +

    Operadores específicos do campo JSON

    O Milvus oferece operadores avançados para consulta de campos JSON, permitindo uma filtragem precisa dentro de estruturas JSON complexas.

    +

    **JSON_CONTAINS(identifier, jsonExpr)**: Verifica se existe uma expressão JSON no campo.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains(tags, "sale")'​
    +
    +
    +

    **JSON_CONTAINS_ALL(identifier, jsonExpr)**: Assegura que todos os elementos da expressão JSON estão presentes.

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    **JSON_CONTAINS_ANY(identifier, jsonExpr)**: Filtra as entidades em que pelo menos um elemento existe na expressão JSON.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    Para obter mais detalhes sobre os operadores JSON, consulte Operadores JSON.

    +

    Operadores específicos do campo ARRAY

    O Milvus fornece operadores de filtragem avançados para campos de matriz, tais como ARRAY_CONTAINS, ARRAY_CONTAINS_ALL, ARRAY_CONTAINS_ANY, e ARRAY_LENGTH, que permitem um controlo fino sobre os dados da matriz.

    +

    **ARRAY_CONTAINS**: Filtra entidades que contêm um elemento específico.

    +
    filter="ARRAY_CONTAINS(history_temperatures, 23)"​
    +
    +
    +

    **ARRAY_CONTAINS_ALL**: Filtra entidades onde todos os elementos de uma lista estão presentes.

    +
    filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_CONTAINS_ANY**: Filtra entidades contendo qualquer elemento da lista.

    +
    filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
    +
    +
    +

    **ARRAY_LENGTH**: Filtra com base no comprimento da matriz.

    +
    filter="ARRAY_LENGTH(history_temperatures) < 10"​
    +
    +
    +

    Para obter mais detalhes sobre os operadores de matriz, consulte Operadores de matriz.

    +

    Operadores específicos do campo VARCHAR

    O operador **Text_Match** permite a recuperação precisa de documentos com base em termos de consulta específicos. É particularmente útil para pesquisas filtradas que combinam filtros escalares com pesquisas de semelhança de vectores. Ao contrário das pesquisas semânticas, a correspondência de texto centra-se nas ocorrências exactas de termos.

    +

    O Milvus utiliza o Tantivy para suportar a indexação invertida e a pesquisa de texto baseada em termos. O processo envolve.

    +
      +
    1. Analisador: Tokeniza e processa o texto de entrada.

    2. +
    3. Indexação: Cria um índice invertido mapeando tokens únicos para documentos.

    4. +
    +

    Para obter mais detalhes, consulte Correspondência de texto.

    diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..93da1be11 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"Modelo de filtro","href":"Filter-Templating​","type":1,"isActive":false},{"label":"Visão geral","href":"Overview​","type":2,"isActive":false},{"label":"Operações de pesquisa","href":"Search-Operations​","type":2,"isActive":false},{"label":"Operações de consulta","href":"Query-Operations​","type":2,"isActive":false},{"label":"Operações de exclusão","href":"Delete-Operations​","type":2,"isActive":false},{"label":"Conclusão","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..ad07bd531 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,155 @@ +--- +id: filtering-templating.md +summary: >- + No Milvus, as expressões de filtro complexas com numerosos elementos, + especialmente as que envolvem caracteres não ASCII como os caracteres CJK, + podem afetar significativamente o desempenho da consulta. Para resolver este + problema, o Milvus introduz um mecanismo de modelação de expressões de filtro + concebido para melhorar a eficiência, reduzindo o tempo gasto na análise de + expressões complexas. Esta página explica a utilização do modelo de expressão + de filtro nas operações de pesquisa, consulta e eliminação. +title: Filtragem de modelos +--- +

    Modelo de filtro

    No Milvus, as expressões de filtro complexas com numerosos elementos, especialmente as que envolvem caracteres não ASCII como os caracteres CJK, podem afetar significativamente o desempenho da consulta. Para resolver este problema, o Milvus introduz um mecanismo de modelo de expressão de filtro concebido para melhorar a eficiência, reduzindo o tempo gasto a analisar expressões complexas. Esta página explica a utilização do modelo de expressão de filtro nas operações de pesquisa, consulta e eliminação.

    +

    Visão geral

    O modelo de expressão de filtro permite-lhe criar expressões de filtro com marcadores de posição, que podem ser substituídos dinamicamente por valores durante a execução da consulta. Com a utilização de modelos, evita-se a incorporação de grandes matrizes ou expressões complexas diretamente no filtro, reduzindo o tempo de análise e melhorando o desempenho da consulta.

    +

    Digamos que você tenha uma expressão de filtro envolvendo dois campos, age e city, e queira encontrar todas as pessoas cuja idade seja maior que 25 anos e que morem em "北京" (Pequim) ou "上海" (Xangai). Em vez de incorporar diretamente os valores na expressão de filtro, pode utilizar um modelo.

    +
    filter = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +
    +
    +

    Aqui, {age} e {city} são marcadores de posição que serão substituídos pelos valores reais em filter_params quando a consulta for executada.

    +

    O uso de modelos de expressão de filtro no Milvus tem várias vantagens importantes.

    +
      +
    • Redução do tempo de análise: Ao substituir expressões de filtro grandes ou complexas por placeholders, o sistema gasta menos tempo analisando e processando o filtro.

    • +
    • Melhoria do desempenho da consulta: Com a redução da sobrecarga de análise, o desempenho da consulta melhora, levando a QPS mais altos e tempos de resposta mais rápidos.

    • +
    • Escalabilidade: À medida que os conjuntos de dados crescem e as expressões de filtro se tornam mais complexas, a criação de modelos garante que o desempenho permaneça eficiente e escalável.

    • +
    +

    Operações de pesquisa

    Para as operações de pesquisa no Milvus, a expressão filter é utilizada para definir a condição de filtragem e o parâmetro filter_params é utilizado para especificar os valores dos placeholders. O dicionário filter_params contém os valores dinâmicos que o Milvus utilizará para substituir a expressão de filtragem.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.search(​
    +    "hello_milvus",​
    +    vectors[:nq],​
    +    filter=expr,​
    +    limit=10,​
    +    output_fields=["age", "city"],​
    +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
    +    filter_params=filter_params,​
    +)​
    +
    +
    +

    Neste exemplo, o Milvus substituirá dinamicamente {age} por 25 e {city} por ["北京", "上海"] ao executar a pesquisa.

    +

    Operações de consulta

    O mesmo mecanismo de criação de modelos pode ser aplicado às operações de consulta no Milvus. Na função query, define-se a expressão de filtragem e utiliza-se filter_params para especificar os valores a substituir.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.query(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    output_fields=["age", "city"],​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    Ao utilizar filter_params, o Milvus lida eficazmente com a inserção dinâmica de valores, melhorando a velocidade de execução da consulta.

    +

    Operações de exclusão

    Também é possível utilizar modelos de expressão de filtro em operações de eliminação. De forma semelhante à pesquisa e consulta, a expressão filter define as condições e a expressão filter_params fornece os valores dinâmicos para os espaços reservados.

    +
    expr = "age > {age} AND city IN {city}"​
    +filter_params = {"age": 25, "city": ["北京", "上海"]}​
    +res = client.delete(​
    +    "hello_milvus",​
    +    filter=expr,​
    +    filter_params=filter_params​
    +)​
    +
    +
    +

    Esta abordagem melhora o desempenho das operações de eliminação, especialmente quando se lida com condições de filtragem complexas.

    +

    Conclusão

    O modelo de expressão de filtro é uma ferramenta essencial para otimizar o desempenho das consultas no Milvus. Utilizando placeholders e o dicionário filter_params, é possível reduzir significativamente o tempo gasto na análise de expressões de filtro complexas. Isso leva a uma execução mais rápida da consulta e a um melhor desempenho geral.

    diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..37473a730 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"Operadores JSON","href":"JSON-Operators​","type":1,"isActive":false},{"label":"Operadores JSON disponíveis","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"JSON_CONTAINS_ALL","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"JSON_COTAINS_ANY","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..0738bc344 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,122 @@ +--- +id: json-operators.md +summary: >- + Milvus suporta operadores avançados para consulta e filtragem de campos JSON, + tornando-os perfeitos para a gestão de dados complexos e estruturados. Estes + operadores permitem uma consulta altamente eficaz de documentos JSON, + permitindo-lhe recuperar entidades com base em elementos específicos, valores + ou condições dentro dos campos JSON. Esta secção irá guiá-lo através da + utilização de operadores específicos de JSON no Milvus, fornecendo exemplos + práticos para ilustrar a sua funcionalidade. +title: Operadores JSON +--- +

    Operadores JSON

    Milvus suporta operadores avançados para consulta e filtragem de campos JSON, tornando-os perfeitos para a gestão de dados complexos e estruturados. Estes operadores permitem uma consulta altamente eficaz de documentos JSON, permitindo-lhe recuperar entidades com base em elementos específicos, valores ou condições dentro dos campos JSON. Esta secção irá guiá-lo através da utilização de operadores específicos de JSON no Milvus, fornecendo exemplos práticos para ilustrar a sua funcionalidade.

    +
    +

    Os campos JSON não podem lidar com estruturas complexas e aninhadas e tratam todas as estruturas aninhadas como strings simples. Por conseguinte, ao trabalhar com campos JSON, é aconselhável evitar aninhamentos excessivamente profundos e garantir que as suas estruturas de dados são tão planas quanto possível para um desempenho ótimo.

    +
    +

    Operadores JSON disponíveis

    Milvus fornece vários operadores JSON poderosos que ajudam a filtrar e consultar dados JSON, e esses operadores são.

    + +

    Vamos explorar esses operadores com exemplos para ver como eles podem ser aplicados em cenários do mundo real.

    +

    JSON_CONTAINS

    O operador json_contains verifica se um elemento específico ou uma submatriz existe num campo JSON. É útil quando se pretende garantir que uma matriz ou objeto JSON contém um determinado valor.

    +

    Exemplo

    +

    Imagine que você tem uma coleção de produtos, cada um com um campo tags que contém uma matriz JSON de cadeias de caracteres, como ["electronics", "sale", "new"]. Pretende filtrar os produtos que têm a etiqueta "sale".

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains(tags, "sale")'​
    +
    +
    +

    Neste exemplo, o Milvus devolverá todos os produtos em que o campo tags contém o elemento "sale".

    +

    JSON_CONTAINS_ALL

    O operador json_contains_all garante que todos os elementos de uma expressão JSON especificada estão presentes no campo de destino. É particularmente útil quando é necessário fazer corresponder vários valores numa matriz JSON.

    +

    Exemplo

    +

    Continuando com o cenário das etiquetas de produto, se pretender encontrar todos os produtos que tenham as etiquetas "electronics", "sale", e "new", pode utilizar o operador json_contains_all.

    +
    # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
    +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
    +
    +
    +

    Essa consulta retornará todos os produtos em que a matriz tags contém os três elementos especificados: "electronics", "sale", e "new".

    +

    JSON_COTAINS_ANY

    O operador json_contains_any filtra entidades em que pelo menos um membro da expressão JSON existe no campo. Isto é útil quando se pretende fazer corresponder entidades com base em qualquer um de vários valores possíveis.

    +

    Exemplo

    +

    Digamos que pretende filtrar produtos que tenham pelo menos uma das etiquetas "electronics", "sale", ou "new". Pode utilizar o operador json_contains_any para o conseguir.

    +
    # JSON data: {"tags": ["electronics", "sale", "new"]}​
    +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
    +
    +
    +

    Neste caso, o Milvus devolverá todos os produtos que tenham pelo menos uma das etiquetas da lista ["electronics", "new", "clearance"]. Mesmo que um produto tenha apenas uma destas etiquetas, será incluído no resultado.

    diff --git a/localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..32d2607b2 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"Visão geral","href":"Overview","type":2,"isActive":false},{"label":"Página inicial","href":"Home","type":2,"isActive":false},{"label":"Colecções","href":"Collections","type":2,"isActive":false},{"label":"Consulta","href":"Query","type":2,"isActive":false},{"label":"Dados","href":"Data","type":2,"isActive":false},{"label":"Tarefas","href":"Tasks","type":2,"isActive":false},{"label":"Pedidos lentos","href":"Slow-requests","type":2,"isActive":false},{"label":"Configurações","href":"Configurations","type":2,"isActive":false},{"label":"Ferramentas","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..441798770 --- /dev/null +++ b/localization/v2.5.x/site/pt/userGuide/tools/milvus-webui.md @@ -0,0 +1,279 @@ +--- +id: milvus-webui.md +summary: >- + O Milvus Web UI é uma ferramenta de gestão gráfica para o Milvus. Melhora a + observabilidade do sistema com uma interface simples e intuitiva. É possível +title: Milvus WebUI +--- +

    Milvus WebUI

    Milvus Web UI é uma ferramenta de gestão gráfica para Milvus. Esta ferramenta melhora a observabilidade do sistema com uma interface simples e intuitiva. Pode utilizar a Milvus Web UI para observar as estatísticas e métricas dos componentes e dependências do Milvus, verificar os detalhes da base de dados e da coleção e listar as configurações detalhadas do Milvus.

    +

    Visão geral

    O Milvus Web UI difere do Birdwatcher e do Attu por ser uma ferramenta integrada que permite a observação geral do sistema com uma interface simples e intuitiva.

    +

    A tabela seguinte compara as funcionalidades do Milvus Web UI e do Birdwatcher/Attu:

    + + + + + + + + + + + +
    FuncionalidadeMilvus Web UIBirdwatcherAttu
    Forma operacionalGUICLIGUI
    Utilizadores alvoMantenedores, desenvolvedoresMantenedoresProgramadores
    InstalaçãoIntegradoFerramenta autónomaFerramenta autónoma
    DependênciasMilvusMilvus / etcdMilvus
    Funcionalidades principaisAmbiente de tempo de execução, detalhes da base de dados/coleção, segmentos, canais, tarefas e pedidos de consulta lentosInspeção de metadados e execução da API MilvusGestão da base de dados e tarefas operacionais
    +

    O Milvus Web UI oferece as seguintes funcionalidades:

    +

    + + Milvus Web UI overview + Visão geral do Milvus Web UI

    +
      +
    • Início

      +

      Pode encontrar informações sobre a instância atual do Milvus em execução, os seus componentes, clientes ligados e dependências.

    • +
    • Colecções

      +

      Pode ver a lista de bases de dados e colecções atualmente no Milvus e verificar os seus detalhes.

    • +
    • Consulta

      +

      Pode visualizar as estatísticas recolhidas dos nós de consulta e dos coordenadores de consulta em termos de segmentos, canais, réplicas e grupos de recursos.

    • +
    • Dados

      +

      Pode visualizar as estatísticas recolhidas dos nós de dados em termos de segmentos e canais.

    • +
    • Tarefas

      +

      Pode visualizar a lista de tarefas em execução no Milvus, incluindo tarefas do agendador Querycoord, tarefas de compactação, tarefas de criação de índices, tarefas de importação e tarefas de sincronização de dados.

    • +
    • Pedidos lentos

      +

      Pode visualizar a lista de pedidos lentos no Milvus, incluindo o tipo de pedido, a duração do pedido e os parâmetros do pedido.

    • +
    • Configurações

      +

      Pode ver a lista de configurações do Milvus e os seus valores.

    • +
    • Ferramentas

      +

      Pode aceder às duas ferramentas integradas, pprof e Milvus data visualzation tool, a partir da interface Web.

    • +
    +

    Página inicial

    Na página Home, pode encontrar as seguintes informações:

    +

    + + Milvus Web UI Home + Página inicial da interface Web do Milvus

    +
      +
    • Informações do sistema: Veja as informações do sistema, incluindo informações sobre o modo de implantação, a imagem usada na implantação e informações relacionadas.

    • +
    • Informações do componente: Veja o status e as métricas dos componentes no Milvus, incluindo o status e as métricas dos nós de consulta, nós de dados, nós de índice, coordenadores e proxies.

    • +
    • Clientes conectados: Visualizar os clientes ligados e as respectivas informações, incluindo o tipo e a versão do SDK, o nome de utilizador e o histórico de acesso.

    • +
    • Dependências do sistema: Veja o estado e as métricas das dependências do Milvus, incluindo o estado e as métricas do meta store, da fila de mensagens e do armazenamento de objectos.

    • +
    +

    Colecções

    Na página Collections (Colecções), pode visualizar a lista de bases de dados e colecções atualmente existentes no Milvus e verificar os respectivos detalhes.

    +

    + + Milvus Web UI Collections + Coleções do Milvus Web UI

    +
      +
    • Base de dados: Ver a lista de bases de dados atualmente no Milvus e os seus detalhes.

    • +
    • Coleção: Visualizar a lista de colecções em cada base de dados e os seus detalhes.

    • +
    +

    Consulta

    + + Milvus Web UI Query Page + Página de consulta do Milvus Web UI

    +
      +
    • Segmentos: Visualize a lista de segmentos e seus detalhes, incluindo o ID do segmento, a coleção correspondente, o estado, o tamanho etc.

      +

      Na coluna From, você pode encontrar a fonte do segmento. Os indicadores de fontes possíveis são os seguintes:

      +
        +
      • QN: Nó de consulta

      • +
      • CT: Meta atual em QueryCoord

      • +
      • NT: Próximo destino em QueryCoord

      • +
      • DIST: Distribuição no QueryCoord

      • +
    • +
    • Canais: Visualize a lista de canais e seus detalhes, incluindo o nome do canal, coleções correspondentes, etc.

      +

      Na coluna De, pode encontrar a origem do segmento. Os indicadores de fontes possíveis são os seguintes:

      +
        +
      • QN: nó de consulta

      • +
      • CT: destino atual em QueryCoord

      • +
      • NT: Próximo destino em QueryCoord

      • +
      • DIST: Distribuição no QueryCoord

      • +
    • +
    • Réplicas: Ver a lista de réplicas e os respectivos detalhes, incluindo o ID da réplica, a coleção correspondente, etc.

    • +
    • Grupos de recursos: Veja a lista de grupos de recursos e os respectivos detalhes, incluindo o nome do grupo de recursos, o número de nós de consulta no grupo e as respectivas configurações, etc.

    • +
    +

    Dados

    + + Milvus Web UI Data Page + Página de dados do Milvus Web UI

    +
      +
    • Segmentos: Visualize a lista de segmentos dos nós de dados/coordenadores e seus detalhes, incluindo o ID do segmento, a coleção correspondente, o estado, o tamanho, etc.

    • +
    • Channels (Canais): Visualize a lista de canais dos nós de dados/coordenadores e os respectivos detalhes, incluindo o nome do canal, as colecções correspondentes, etc.

    • +
    +

    Tarefas

    + + Milvus Web UI Tasks Page + Página de tarefas do Milvus Web UI

    +
      +
    • Tarefas: Visualizar a lista de tarefas em execução no Milvus, incluindo o tipo de tarefa, estado e acções.

      +
        +
      • Tarefas do QueryCoord: Veja todas as tarefas do agendador do QueryCoord, incluindo verificadores de balanceador, índice/segmento/canal/líder nos últimos 15 minutos.

      • +
      • Tarefas de compactação: Veja todas as tarefas de compactação dos coordenadores de dados nos últimos 15 minutos.

      • +
      • Tarefas de criação de índices: Veja todas as tarefas de criação de índices dos coordenadores de dados nos últimos 30 minutos.

      • +
      • Tarefas de importação: Visualizar todas as tarefas de importação dos coordenadores de dados nos últimos 30 minutos.

      • +
      • Tarefas de sincronização de dados: Veja todas as tarefas de sincronização de dados dos nós de dados nos últimos 15 minutos.

      • +
    • +
    +

    Pedidos lentos

    + + Milvus Web UI Slow Requests Page + Página de pedidos lentos do Milvus Web UI

    +
      +
    • Pedidos lentos: Um pedido lento é uma pesquisa ou uma consulta que tem uma latência superior ao valor de proxy.slowQuerySpanInSeconds especificado na configuração. A lista de solicitações lentas exibe todas as solicitações lentas nos últimos 15 minutos.
    • +
    +

    Configurações

    + + Milvus Web UI Configurations Page + Página de configurações do Milvus Web UI

    +
      +
    • Configurações: Visualiza a lista de configurações de tempo de execução do Milvus e seus valores.
    • +
    +

    Ferramentas

      +
    • pprof: Acesse a ferramenta pprof para criação de perfil e depuração do Milvus.

    • +
    • Ferramenta de visualização de dados do Milvus: Aceder à ferramenta de visualização de dados do Milvus para visualizar os dados no Milvus.

    • +
    diff --git a/localization/v2.5.x/site/zh/adminGuide/config_jaeger_tracing.md b/localization/v2.5.x/site/zh/adminGuide/config_jaeger_tracing.md index 506441a8d..aa642fb36 100644 --- a/localization/v2.5.x/site/zh/adminGuide/config_jaeger_tracing.md +++ b/localization/v2.5.x/site/zh/adminGuide/config_jaeger_tracing.md @@ -65,7 +65,7 @@ $ kubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/do NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE jaeger-operator 1 1 1 1 48s
    -

    2.部署 Jager

    创建 Jaeger 实例的最简单方法是创建一个 YAML 文件,如下所示。这将安装默认的 AllInOne 策略,在单个 pod 中部署一体化镜像(结合了jaeger-agentsjaeger-collectorjaeger -query 和 Jaeger UI),默认使用内存存储

    +

    2.部署 Jaeger

    创建 Jaeger 实例的最简单方法是创建类似下面示例的 YAML 文件。这将安装默认的 AllInOne 策略,在单个 pod 中部署一体化镜像(结合了jaeger-agentsjaeger-collectorjaeger -query 和 Jaeger UI),默认使用内存存储

    如果想长期存储跟踪信息,请参考生产策略

    apiVersion: jaegertracing.io/v1
     kind: Jaeger
    @@ -128,7 +128,7 @@ $ helm upgrade --install -f values.yaml my-release milvus/milvus
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    一旦使用 Helm Chart 部署了 Jaeger 和 Milvus,dfault 就会启用入口。你可以运行以下命令查看入口:

    +

    一旦使用 Helm Chart 部署了 Jaeger 和 Milvus,dfault 就会启用入口。您可以运行以下命令查看入口:

    $ kubectl get ingress
     
     NAME           CLASS    HOSTS   ADDRESS         PORTS   AGE
    diff --git a/localization/v2.5.x/site/zh/adminGuide/configure-docker.json b/localization/v2.5.x/site/zh/adminGuide/configure-docker.json
    index 70bf67e59..ad0ef8e01 100644
    --- a/localization/v2.5.x/site/zh/adminGuide/configure-docker.json
    +++ b/localization/v2.5.x/site/zh/adminGuide/configure-docker.json
    @@ -1 +1 @@
    -{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"使用 Docker Compose 配置 Milvus","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"下载配置文件","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"修改配置文件","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"下载安装文件","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"修改安装文件","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"启动 Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    +{"codeList":["$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml\n","# For Milvus standalone\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n","...\n  standalone:\n    container_name: milvus-standalone\n    image: milvusdb/milvus:v2.2.13\n    command: [\"milvus\", \"run\", \"standalone\"]\n    environment:\n      ETCD_ENDPOINTS: etcd:2379\n      MINIO_ADDRESS: minio:9000\n    volumes:\n      - /local/path/to/your/milvus.yaml:/milvus/configs/milvus.yaml   # Map the local path to the container path\n      - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus\n    ports:\n      - \"19530:19530\"\n      - \"9091:9091\"\n    depends_on:\n      - \"etcd\"\n      - \"minio\"\n...\n","$ sudo docker compose up -d\n"],"headingContent":"Configure Milvus with Docker Compose","anchorList":[{"label":"使用 Docker Compose 配置 Milvus","href":"Configure-Milvus-with-Docker-Compose","type":1,"isActive":false},{"label":"下载配置文件","href":"Download-a-configuration-file","type":2,"isActive":false},{"label":"修改配置文件","href":"Modify-the-configuration-file","type":2,"isActive":false},{"label":"下载安装文件","href":"Download-an-installation-file","type":2,"isActive":false},{"label":"修改安装文件","href":"Modify-the-installation-file","type":2,"isActive":false},{"label":"启动 Milvus","href":"Start-Milvus","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]}
    \ No newline at end of file
    diff --git a/localization/v2.5.x/site/zh/adminGuide/configure-docker.md b/localization/v2.5.x/site/zh/adminGuide/configure-docker.md
    index 0bd9276fc..2b92e628a 100644
    --- a/localization/v2.5.x/site/zh/adminGuide/configure-docker.md
    +++ b/localization/v2.5.x/site/zh/adminGuide/configure-docker.md
    @@ -38,8 +38,8 @@ title: 使用 Docker Compose 配置 Milvus
               d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
             >
           
    -    

    直接或使用以下命令下载 milvus.yaml

    -
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0-beta/configs/milvus.yaml
    +    

    直接或使用以下命令下载 milvus.yaml

    +
    $ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.5.0/configs/milvus.yaml
     

    修改配置文件

    下载 MilvusStandalone 的安装文件,并将其保存为docker-compose.yml

    +

    下载 MilvusStandalone 的安装文件,并将其保存为docker-compose.yml

    也可以直接运行以下命令。

    # For Milvus standalone
    -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
    +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
     

    修改安装文件

    为确保数据安全,建议你删除不再使用的用户和角色。本指南将介绍如何删除用户和角色。

    +

    删除用户

    下面的示例演示了如何删除用户user_1

    +
    +

    不能删除root 用户。

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +# create a user​
    +client.drop_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig​
    +import io.milvus.v2.client.MilvusClientV2​
    +import io.milvus.v2.service.rbac.request.DropUserReq​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +        .uri("http://localhost:19530")​
    +        .token("root:Milvus")​
    +        .build();​
    +        ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +DropUserReq dropUserReq = DropUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +client.dropUser(dropUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.deleteUser({​
    +    username: 'user_1'​
    +})​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    下拉用户后,可以列出所有现有用户,检查下拉操作是否成功。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_users()​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.listUsersReq​
    +​
    +List<String> resp = client.listUsers();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listUsers()​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    下面是一个输出示例。列表中没有user_1 。下拉操作符成功。

    +
    ['root']​
    +
    +
    +

    删除角色

    下面的示例演示了如何删除角色role_a

    +
    +

    不能删除内置角色admin

    +
    + +
    from pymilvus import MilvusClient​
    +​
    +client.drop_role(role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropRoleReq​
    +​
    +DropRoleReq dropRoleReq = DropRoleReq.builder()​
    +        .roleName("role_a")​
    +        .build();​
    +client.dropRole(dropRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.dropRole({​
    +   roleName: 'role_a',​
    + })​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    +

    角色下拉后,可以列出所有现有角色,检查下拉操作是否成功。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.list_roles()​
    +
    +
    +
    List<String> resp = client.listRoles();​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.listRoles(​
    +    includeUserInfo: True​
    +)​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    下面是一个输出示例。列表中没有role_a 。删除操作符成功。

    +
    ['admin']​
    +
    +
    diff --git a/localization/v2.5.x/site/zh/adminGuide/grant_privileges.json b/localization/v2.5.x/site/zh/adminGuide/grant_privileges.json new file mode 100644 index 000000000..244b49676 --- /dev/null +++ b/localization/v2.5.x/site/zh/adminGuide/grant_privileges.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.grant_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.grantPrivilegeV2(GrantPrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"collection_01\", \"privilege_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.GrantV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nconst address = \"http://localhost:19530\";\nconst token = \"root:Milvus\";\nconst client = new MilvusClient({address, token});\n\nawait milvusClient.grantPrivilege({\n roleName: 'role_a',\n object: 'Collection', \n objectName: 'collection_01',\n privilegeName: 'Search'\n });\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"privilege_group_1\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n","from pymilvus import MilvusClient\n\nclient.describe_role(role_name=\"role_a\")\n","import io.milvus.v2.service.rbac.response.DescribeRoleResp;\nimport io.milvus.v2.service.rbac.request.DescribeRoleReq\n\nDescribeRoleReq describeRoleReq = DescribeRoleReq.builder()\n .roleName(\"role_a\")\n .build();\nDescribeRoleResp resp = client.describeRole(describeRoleReq);\nList infos = resp.getGrantInfos();\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.ListRoles(context.Background())\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")\n\nawait milvusClient.describeRole({roleName: 'role_a'});\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\"\n}'\n","{\n \"role\": \"role_a\",\n \"privileges\": [\n {\n \"collection_name\": \"collection_01\",\n \"db_name\": \"default\",\n \"role_name\": \"role_a\",\n \"privilege\": \"Search\",\n \"grantor_name\": \"root\"\n },\n \"privilege_group_1\"\n ]\n}\n","from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri=\"http://localhost:19530\",\n token=\"root:Milvus\"\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"Search\"\n collection_name='collection_01'\n db_name='default',\n)\n \nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"privilege_group_1\"\n collection_name='collection_01'\n db_name='default',\n)\n\nclient.revoke_privilege_v2(\n role_name=\"role_a\",\n privilege=\"ClusterReadOnly\"\n collection_name='*'\n db_name='*',\n)\n","import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"Search\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"privilege_group_1\")\n .collectionName(\"collection_01\")\n .dbName(\"default\")\n .build());\n\nclient.revokePrivilegeV2(RevokePrivilegeReqV2.builder()\n .roleName(\"role_a\")\n .privilege(\"ClusterReadOnly\")\n .collectionName(\"*\")\n .dbName(\"*\")\n .build());\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"Search\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"collection_01\", \"privielge_group_1\", entity.WithOperatePrivilegeDatabase(\"default\"))\n\nclient.RevokeV2(context.Background(), \"role_a\", \"*\", \"ClusterReadOnly\", entity.WithOperatePrivilegeDatabase(\"*\"))\n","curl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"Search\",\n \"collectionName\": \"collection_01\",\n \"dbName\":\"default\"\n}'\n\ncurl --request POST \\\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2\" \\\n--header \"Authorization: Bearer ${TOKEN}\" \\\n--header \"Content-Type: application/json\" \\\n-d '{\n \"roleName\": \"role_a\",\n \"privilege\": \"ClusterReadOnly\",\n \"collectionName\": \"*\",\n \"dbName\":\"*\"\n}'\n"],"headingContent":"Grant Privilege or Privilege Group to Roles​","anchorList":[{"label":"为角色授予权限或权限组","href":"Grant-Privilege-or-Privilege-Group-to-Roles​","type":1,"isActive":false},{"label":"向角色授予权限或权限组","href":"Grant-a-privilege-or-a-privilege-group-to-a-role​","type":2,"isActive":false},{"label":"描述角色","href":"Describe-a-role","type":2,"isActive":false},{"label":"撤销角色的权限或权限组","href":"Revoke-a-privilege-or-a-privilege-group-from-a-role","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/grant_privileges.md b/localization/v2.5.x/site/zh/adminGuide/grant_privileges.md new file mode 100644 index 000000000..e1289adb6 --- /dev/null +++ b/localization/v2.5.x/site/zh/adminGuide/grant_privileges.md @@ -0,0 +1,540 @@ +--- +id: grant_privileges.md +related_key: enable RBAC +summary: 创建角色后,就可以向角色授予权限。本指南将介绍如何向角色授予权限或权限组。 +title: 为角色授予权限或权限组 +--- +

    为角色授予权限或权限组

    创建角色后,就可以向角色授予权限。本指南将介绍如何向角色授予权限或权限组。

    +

    向角色授予权限或权限组

    Milvus 2.5 引入了新版本的 API,简化了授予操作。向角色授予权限时,不再需要查找对象类型。以下是参数和相应的解释。

    +
      +
    • role_name:需要授予权限或权限组的目标角色名称。

    • +
    • 资源:权限的目标资源,可以是特定实例、数据库或 Collections。下表解释了如何在client.grantV2() 方法中指定资源。

    • +
    +

    级别

    +

    资源

    +

    授予方法

    +

    注释

    +

    Collections

    +

    +

    特定的 Collections

    +

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="col1", db_name="db1")

    +

    输入目标 Collections 的名称和目标 Collections 所属数据库的名称。

    +

    +

    特定数据库下的所有 Collections

    +

    client.grant_privilege_v2(role_name="roleA", privilege="CollectionAdmin", collection_name="*", db_name="db1")

    +

    输入目标数据库的名称和通配符`*` 作为 Collection 名称。

    +

    **数据库**

    +

    特定数据库

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="db1")

    +

    输入目标数据库名称和通配符`*` 作为 Collection 名称。

    +

    +

    当前实例下的所有数据库

    +

    client.grant_privilege_v2(role_name="roleA", privilege="DatabaseAdmin", collection_name="*", db_name="*")

    +

    输入`*` 作为数据库名称,输入`*` 作为 Collections 名称。

    +

    **实例**

    +

    当前实例

    +

    client.grant_privilege_v2(role_name="roleA", privilege="ClusterAdmin", collection_name="*", db_name="*")

    +

    输入`*` 作为数据库名称,输入`*` 作为 Collections 名称。

    +
    +
      +
    • 权限:需要授予角色的特定权限或权限组。目前,Milvus 提供 56 种可授予的权限。下表列出了 Milvus 中的特权。

      +

      +

      下表中的类型列是用户为方便快速查找特权而设置的,仅用于分类目的。授予权限时,不需要了解类型。您只需输入相应的权限即可。

      +

    • +
    +

    **类型 **

    +

    **权限**

    +

    **描述

    +

    **客户端的相关应用程序接口描述**

    +

    数据库权限

    +

    列出数据库

    +

    查看当前实例中的所有数据库

    +

    [ListDatabases](https://milvus.io/docs/manage_databases.md)

    +

    描述数据库

    +

    查看数据库的详细信息

    +

    [DescribeDatabase](https://milvus.io/docs/manage_databases.md)

    +

    创建数据库

    +

    创建数据库

    +

    [CreateDatabase](https://milvus.io/docs/manage_databases.md)

    +

    删除数据库

    +

    删除数据库

    +

    [DropDatabase](https://milvus.io/docs/manage_databases.md)

    +

    更改数据库

    +

    修改数据库属性

    +

    [AlterDatabase](https://milvus.io/docs/manage_databases.md)

    +

    Collections 权限

    +

    +

    获取刷新状态

    +

    检查 Collections 冲洗操作符的状态

    +

    [GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    获取加载状态

    +

    检查 Collections 的加载状态

    +

    [GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    获取加载进度

    +

    检查 Collections 的加载进度

    +

    [GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)

    +

    显示收藏集

    +

    查看所有具有收藏权限的 Collections

    +

    [ShowCollections](https://milvus.io/docs/view-collections.md)

    +

    列出别名

    +

    查看某个 Collection 的所有别名

    +

    [ListAliases](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/list_aliases.md)

    +

    描述收藏集

    +

    查看 Collections 的详细信息

    +

    [DescribeCollection](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_collection.md)

    +

    描述别名

    +

    查看别名的详细信息

    +

    [DescribeAlias](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/describe_alias.md)

    +

    获取统计数据

    +

    获取 Collections 的统计数据(如 Collections 中实体的数量

    +

    [GetCollectionStatistics](https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Collections/get_collection_stats.md)

    +

    创建集合

    +

    创建一个 Collections

    +

    [CreateCollection](https://milvus.io/docs/create-collection.md)

    +

    删除集合

    +

    删除一个 Collections

    +

    [DropCollection](https://milvus.io/docs/drop-collection.md)

    +

    加载

    +

    加载一个 Collections

    +

    [LoadCollection](https://milvus.io/docs/load-and-release.md)/[GetLoadingProgress](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/loading_progress.md)/[GetLoadState](https://milvus.io/api-reference/restful/v2.5.x/v2/Collection%20(v2)/Get%20Load%20State.md)

    +

    发布

    +

    释放 Collections

    +

    [ReleaseCollection](https://milvus.io/docs/load-and-release.md)

    +

    刷新

    +

    +

    将 Collections 中的所有实体持久化到一个密封段中。任何在冲洗操作后插入的实体都将存储在新的段中。

    +

    [Flush](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)/[GetFlushState](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/Collection/flush.md)

    +

    压缩

    +

    手动触发压缩

    +

    [Compact](https://milvus.io/docs/v2.0.x/compact_data.md)

    +

    重命名集合

    +

    重命名 Collections

    +

    [RenameCollection](https://milvus.io/docs/modify-collection.md)

    +

    创建别名

    +

    为 Collections 创建别名

    +

    [创建别名](https://milvus.io/docs/manage-aliases.md)

    +

    删除别名

    +

    删除 Collections 的别名

    +

    [DropAlias](https://milvus.io/docs/manage-aliases.md)

    +

    全部清除

    +

    清除数据库中的所有 Collections

    +

    [FlushAll](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/flush_all.md)

    +

    分区权限

    +

    有分区

    +

    检查是否存在分区

    +

    [HasPartition](https://milvus.io/docs/manage-partitions.md)

    +

    显示分区

    +

    查看 Collections 中的所有分区

    +

    [ShowPartitions](https://milvus.io/docs/manage-partitions.md)

    +

    创建分区

    +

    创建分区

    +

    [CreatePartition](https://milvus.io/docs/manage-partitions.md)

    +

    删除分区

    +

    删除分区

    +

    [DropPartition](https://milvus.io/docs/manage-partitions.md)

    +

    索引权限

    +

    索引详情

    +

    查看索引详情

    +

    +

    [DescribeIndex/GetIndexState/GetIndexBuildProgress](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    创建索引

    +

    创建索引

    +

    [CreateIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    删除索引

    +

    删除索引

    +

    [DropIndex](https://milvus.io/docs/index-vector-fields.md?tab=floating)

    +

    资源管理权限

    +

    +

    负载平衡

    +

    实现负载平衡

    +

    [LoadBalance](https://milvus.io/docs/resource_group.md)

    +

    创建资源组

    +

    创建资源组

    +

    [CreateResourceGroup](https://milvus.io/api-reference/pymilvus/v2.5.x/ORM/utility/create_resource_group.md)

    +

    删除资源组

    +

    删除一个资源组

    +

    [DropResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    更新资源组

    +

    更新资源组

    +

    [UpdateResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    描述资源组

    +

    查看资源组的详细信息

    +

    [DescribeResourceGroup](https://milvus.io/docs/resource_group.md)

    +

    列出资源组

    +

    查看当前实例的所有资源组

    +

    [ListResourceGroups](https://milvus.io/docs/resource_group.md)

    +

    传输节点

    +

    在资源组之间传输节点

    +

    [TransferNode](https://milvus.io/docs/resource_group.md)

    +

    传输副本

    +

    在资源组之间传输副本

    +

    [TransferReplica](https://milvus.io/docs/resource_group.md)

    +

    备份 RBAC

    +

    为当前实例中所有与 RBAC 相关的操作创建备份

    +

    备份 RBAC

    +

    还原 RBAC

    +

    恢复当前实例中所有 RBAC 相关操作的备份

    +

    还原 RBAC

    +

    实体权限

    +

    +

    查询

    +

    进行查询

    +

    [查询](https://milvus.io/docs/get-and-scalar-query.md)

    +

    搜索

    +

    进行搜索

    +

    [Search](https://milvus.io/docs/single-vector-search.md)

    +

    插入

    +

    插入实体

    +

    [Insert](https://milvus.io/docs/insert-update-delete.md)

    +

    删除

    +

    删除实体

    +

    [删除](https://milvus.io/docs/delete-entities.md)

    +

    插入

    +

    插入实体

    +

    [Upsert](https://milvus.io/docs/upsert-entities.md)

    +

    导入

    +

    批量插入或导入实体

    +

    [批量插入/导入](https://milvus.io/docs/import-data.md)

    +

    RBAC 权限

    +

    创建所有权

    +

    创建用户或角色

    +

    [创建用户/创建角色](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    更新用户

    +

    更新用户密码

    +

    [UpdateCredential](https://zilliverse.feishu.cn/wiki/CnzkwQBW3i7bE3kVtLzcqQLtn9d)

    +

    删除所有权

    +

    删除用户密码或角色

    +

    删除用户密码或角色[DeleteCredential/DropRole](https://zilliverse.feishu.cn/wiki/OqZnwJHrJilLPukfvp5cSgnmnTh)

    +

    选择所有权

    +

    查看被授予特定角色的所有用户

    +

    [选择角色/选择授权](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    管理所有权

    +

    管理用户或角色,或向用户授予角色

    +

    [OperateUserRole/OperatePrivilege/OperatePrivilegeV2](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    选择用户

    +

    查看授予用户的所有角色

    +

    [SelectUser](https://zilliverse.feishu.cn/wiki/ZsNZwn1MkiOtH9kFU35cyRgVnue)

    +

    创建权限组

    +

    创建权限组

    +

    [创建权限组](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    删除权限组

    +

    删除权限组

    +

    [DropPrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    列出特权组

    +

    查看当前实例中的所有权限组

    +

    [ListPrivilegeGroups](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +

    操作权限组

    +

    向特权组添加特权或从特权组移除特权

    +

    [OperatePrivilegeGroup](https://zilliverse.feishu.cn/wiki/FpV8wdWcZiDwnQkBloucYF7wnUg)

    +
    +

    下面的示例演示了如何在collection_01 上授予默认数据库下的PrivilegeSearch 权限,以及如何将名为privilege_group_1 的特权组授予角色role_a

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.grant_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.GrantPrivilegeReqV2
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.grantPrivilegeV2(GrantPrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "collection_01", "privilege_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.GrantV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +const address = "http://localhost:19530";
    +const token = "root:Milvus";
    +const client = new MilvusClient({address, token});
    +
    +await milvusClient.grantPrivilege({
    +   roleName: 'role_a',
    +   object: 'Collection', 
    +   objectName: 'collection_01',
    +   privilegeName: 'Search'
    + });
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "privilege_group_1",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/grant_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    +

    描述角色

    下面的示例演示了如何使用 describe_role 方法查看授予角色 role_a 的权限。

    + +
    from pymilvus import MilvusClient
    +
    +client.describe_role(role_name="role_a")
    +
    +
    import io.milvus.v2.service.rbac.response.DescribeRoleResp;
    +import io.milvus.v2.service.rbac.request.DescribeRoleReq
    +
    +DescribeRoleReq describeRoleReq = DescribeRoleReq.builder()
    +        .roleName("role_a")
    +        .build();
    +DescribeRoleResp resp = client.describeRole(describeRoleReq);
    +List<DescribeRoleResp.GrantInfo> infos = resp.getGrantInfos();
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.ListRoles(context.Background())
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")
    +
    +await milvusClient.describeRole({roleName: 'role_a'});
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/describe" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a"
    +}'
    +
    +

    下面是一个输出示例。

    +
    {
    +     "role": "role_a",
    +     "privileges": [
    +         {
    +             "collection_name": "collection_01",
    +             "db_name": "default",
    +             "role_name": "role_a",
    +             "privilege": "Search",
    +             "grantor_name": "root"
    +         },
    +         "privilege_group_1"
    +     ]
    +}
    +
    +

    撤销角色的权限或权限组

    下面的示例演示了如何撤销默认数据库下collection_01 上的PrivilegeSearch 权限以及授予角色role_aprivilege_group_1 权限组。

    + +
    from pymilvus import MilvusClient
    +
    +client = MilvusClient(
    +    uri="http://localhost:19530",
    +    token="root:Milvus"
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="Search"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +    
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="privilege_group_1"
    +    collection_name='collection_01'
    +    db_name='default',
    +)
    +
    +client.revoke_privilege_v2(
    +    role_name="role_a",
    +    privilege="ClusterReadOnly"
    +    collection_name='*'
    +    db_name='*',
    +)
    +
    +
    import io.milvus.v2.service.rbac.request.RevokePrivilegeReqV2
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("Search")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("privilege_group_1")
    +        .collectionName("collection_01")
    +        .dbName("default")
    +        .build());
    +
    +client.revokePrivilegeV2(RevokePrivilegeReqV2.builder()
    +        .roleName("role_a")
    +        .privilege("ClusterReadOnly")
    +        .collectionName("*")
    +        .dbName("*")
    +        .build());
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "Search", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "collection_01", "privielge_group_1", entity.WithOperatePrivilegeDatabase("default"))
    +
    +client.RevokeV2(context.Background(), "role_a", "*", "ClusterReadOnly", entity.WithOperatePrivilegeDatabase("*"))
    +
    +
    curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "Search",
    +    "collectionName": "collection_01",
    +    "dbName":"default"
    +}'
    +
    +curl --request POST \
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/revoke_privilege_v2" \
    +--header "Authorization: Bearer ${TOKEN}" \
    +--header "Content-Type: application/json" \
    +-d '{
    +    "roleName": "role_a",
    +    "privilege": "ClusterReadOnly",
    +    "collectionName": "*",
    +    "dbName":"*"
    +}'
    +
    diff --git a/localization/v2.5.x/site/zh/adminGuide/grant_roles.json b/localization/v2.5.x/site/zh/adminGuide/grant_roles.json new file mode 100644 index 000000000..0d11b1db6 --- /dev/null +++ b/localization/v2.5.x/site/zh/adminGuide/grant_roles.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.grant_role(user_name=\"user_1\", role_name=\"role_a\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.GrantRoleReq;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nGrantRoleReq grantRoleReq = GrantRoleReq.builder()​\n .roleName(\"role_a\")​\n .userName(\"user_1\")​\n .build();​\nclient.grantRole(grantRoleReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nmilvusClient.grantRole({​\n username: 'user_1',​\n roleName: 'role_a'​\n })​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"roleName\": \"role_a\",​\n \"userName\": \"user_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.describe_user(user_name=\"user_1\")​\n\n","import io.milvus.v2.service.rbac.request.DescribeUserReq;​\nimport io.milvus.v2.service.rbac.response.DescribeUserResp;​\n​\nDescribeUserReq describeUserReq = DescribeUserReq.builder()​\n .userName(\"user_1\")​\n .build();​\nDescribeUserResp describeUserResp = client.describeUser(describeUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nmilvusClient.describeUser({username: 'user_1'})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/describe\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\"​\n}'​\n\n","{'user_name': 'user_1', 'roles': 'role_a'}​\n\n","from pymilvus import MilvusClient​\n​\nclient.revoke_role(​\n user_name='user_1',​\n role_name='role_a'​\n)​\n\n","import io.milvus.v2.service.rbac.request.RevokeRoleReq;​\n​\nclient.revokeRole(RevokeRoleReq.builder()​\n .userName(\"user_1\")​\n .roleName(\"role_a\")​\n .build());​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\n​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"userName\": \"user_1\",​\n \"roleName\": \"role_a\"​\n}'​\n\n"],"headingContent":"Grant Roles to Users​","anchorList":[{"label":"向用户授予角色","href":"Grant-Roles-to-Users​","type":1,"isActive":false},{"label":"向用户授予角色","href":"Grant-a-role-to-a-user​","type":2,"isActive":false},{"label":"描述用户","href":"Describe-user​","type":2,"isActive":false},{"label":"撤销角色","href":"Revoke-a-role​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/grant_roles.md b/localization/v2.5.x/site/zh/adminGuide/grant_roles.md new file mode 100644 index 000000000..106f10114 --- /dev/null +++ b/localization/v2.5.x/site/zh/adminGuide/grant_roles.md @@ -0,0 +1,200 @@ +--- +id: grant_roles.md +related_key: enable RBAC +summary: >- + 创建角色并授予角色权限后,就可以将角色授予用户,这样用户就可以访问资源并执行角色所定义的操作。可以向一个用户授予多个角色,也可以向多个用户授予一个角色。本指南将介绍如何向用户授予角色。 +title: 向用户授予角色 +--- +

    向用户授予角色

    创建角色并授予角色权限后,就可以将角色授予用户,这样用户就可以访问资源并执行角色所定义的操作。可以向一个用户授予多个角色,也可以向多个用户授予一个角色。本指南将介绍如何向用户授予角色。

    +

    milvus 中的内置用户root 已被授予admin 角色,该角色拥有所有权限。您不需要为其分配任何其他角色。

    +

    向用户授予角色

    下面的示例演示了如何向用户user_1 授予role_a 角色。

    + +
    from pymilvus import MilvusClient​
    +​
    +client = MilvusClient(​
    +    uri="http://localhost:19530",​
    +    token="root:Milvus"​
    +)​
    +​
    +client.grant_role(user_name="user_1", role_name="role_a")​
    +
    +
    +
    import io.milvus.v2.client.ConnectConfig;​
    +import io.milvus.v2.client.MilvusClientV2;​
    +import io.milvus.v2.service.rbac.request.GrantRoleReq;​
    +​
    +String CLUSTER_ENDPOINT = "http://localhost:19530";​
    +String TOKEN = "root:Milvus";​
    +​
    +​
    +ConnectConfig connectConfig = ConnectConfig.builder()​
    +    .uri(CLUSTER_ENDPOINT)​
    +    .token(TOKEN)​
    +    .build();​
    +    ​
    +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
    +​
    +GrantRoleReq grantRoleReq = GrantRoleReq.builder()​
    +        .roleName("role_a")​
    +        .userName("user_1")​
    +        .build();​
    +client.grantRole(grantRoleReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +const address = "http://localhost:19530";​
    +const token = "root:Milvus";​
    +const client = new MilvusClient({address, token});​
    +​
    +milvusClient.grantRole({​
    +   username: 'user_1',​
    +   roleName: 'role_a'​
    + })​
    +
    +
    +
    export CLUSTER_ENDPOINT="http://localhost:19530"​
    +export TOKEN="root:Milvus"​
    +​
    +curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/grant_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "roleName": "role_a",​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    描述用户

    向用户授予角色后,可以通过describe_user() 方法检查授予操作是否成功。

    +

    下面的示例演示了如何检查用户user_1 的角色。

    + +
    from pymilvus import MilvusClient​
    +​
    +client.describe_user(user_name="user_1")​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DescribeUserReq;​
    +import io.milvus.v2.service.rbac.response.DescribeUserResp;​
    +​
    +DescribeUserReq describeUserReq = DescribeUserReq.builder()​
    +        .userName("user_1")​
    +        .build();​
    +DescribeUserResp describeUserResp = client.describeUser(describeUserReq);​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +milvusClient.describeUser({username: 'user_1'})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/describe" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1"​
    +}'​
    +
    +
    +

    下面是一个输出示例。

    +
    {'user_name': 'user_1', 'roles': 'role_a'}​
    +
    +
    +

    撤销角色

    您还可以撤销已分配给用户的角色。

    +

    下面的示例演示了如何撤销分配给用户role_a 的角色user_1

    + +
    from pymilvus import MilvusClient​
    +​
    +client.revoke_role(​
    +    user_name='user_1',​
    +    role_name='role_a'​
    +)​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RevokeRoleReq;​
    +​
    +client.revokeRole(RevokeRoleReq.builder()​
    +        .userName("user_1")​
    +        .roleName("role_a")​
    +        .build());​
    +
    +
    +
    const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
    +​
    +​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/revoke_role" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "userName": "user_1",​
    +    "roleName": "role_a"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/zh/adminGuide/privilege_group.json b/localization/v2.5.x/site/zh/adminGuide/privilege_group.json new file mode 100644 index 000000000..b54a27b24 --- /dev/null +++ b/localization/v2.5.x/site/zh/adminGuide/privilege_group.json @@ -0,0 +1 @@ +{"codeList":["from pymilvus import MilvusClient​\nclient.create_privileg_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​\n​\nclient.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.CreatePrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​\n\n","import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​\n​\nclient.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Arrays.asList(\"Query\", \"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.AddPrivilegesToGroup(context.Background(), \"privilege_group_1\", []string{\"Query\", \"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Query\", \"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​\n\n","import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​\n​\nclient.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .privileges(Collections.singletonList(\"Search\"))​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.RemovePrivilegesFromGroup(context.Background(), \"privilege_group_1\", []string{\"Search\"})​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\",​\n \"privileges\":[\"Search\"]​\n}'​\n\n","from pymilvus import MilvusClient​\nclient.list_privilege_groups()​\n\n","import io.milvus.v2.service.rbac.PrivilegeGroup;​\nimport io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​\nimport io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​\n​\nListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​\n .build());​\nList groups = resp.getPrivilegeGroups();​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.ListPrivilegeGroups(context.Background())​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","PrivilegeGroupItem: , ​\n\n","from pymilvus import MilvusClient​\nclient.drop_privilege_group(group_name='privilege_group_1')​\n\n","import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​\n​\nclient.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​\n .groupName(\"privilege_group_1\")​\n .build());​\n\n","import \"github.com/milvus-io/milvus-sdk-go/v2/client\"​\n​\nclient.DropPrivilegeGroup(context.Background(), \"privilege_group_1\")​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"privilegeGroupName\":\"privilege_group_1\"​\n}'​\n\n"],"headingContent":"Create Privilege Group​","anchorList":[{"label":"创建权限组","href":"Create-Privilege-Group​","type":1,"isActive":false},{"label":"特权组与特权","href":"Privilege-group-vs-privileges​","type":2,"isActive":false},{"label":"内置特权组","href":"Built-in-privilege-groups​","type":2,"isActive":false},{"label":"操作步骤","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/privilege_group.md b/localization/v2.5.x/site/zh/adminGuide/privilege_group.md new file mode 100644 index 000000000..5d7099f55 --- /dev/null +++ b/localization/v2.5.x/site/zh/adminGuide/privilege_group.md @@ -0,0 +1,489 @@ +--- +id: privilege_group.md +related_key: enable RBAC +summary: 为了简化授予权限的流程,建议将多个权限合并为一个权限组。 +title: 创建权限组 +--- +

    创建权限组

    为简化授予权限的流程,建议将多个权限合并为一个权限组。

    +

    特权组与特权

    特权组由多个特权组成。

    +

    + + Privilege group illustrated + 特权组示例

    +

    如上图所示,假设需要向一个角色授予三种不同的权限。

    +
      +
    • 如果不使用特权组,则需要授予三次权限。

    • +
    • 如果使用特权组,则只需创建一个特权组并将三种特权添加到该特权组中,然后将该特权组授予角色 A。

    • +
    +

    通过使用特权组,可以向角色批量授予多项特权。

    +

    内置特权组

    为方便使用,Milvus 在 Collections、数据库和实例级别上提供了共 9 个内置特权:COLL_RO、COLL_RW、COLL_ADMIN、DB_RO、DB_RW、DB_Admin、Cluster_RO、Cluster_RW 和 Cluster_Admin。

    +
    +

    内置特权组的三个级别没有级联关系。在实例级别设置特权组不会自动为该实例下的所有数据库和 Collections 设置权限。数据库和集合级别的权限需要手动设置。

    +
    +

    下表解释了每个内置权限组所包含的权限。

    +

    Collection 级别

      +
    • COLL_RO:包括读取 Collections 数据的权限

    • +
    • COLL_RW:包括读取和写入 Collections 数据的权限

    • +
    • COLL_ADMIN:包括读写收集数据和管理收集的权限。

    • +
    +

    下表列出了集合级三个内置权限组所包含的具体权限。

    +

    **权限**

    +

    **只读集合**

    +

    **只读**

    +

    **集合管理员**

    +

    查询

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    搜索

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    索引详情

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    获取冲洗状态

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    获取加载状态

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    获取加载进度

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    HasPartition

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    显示分区

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    列出别名

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    描述集合

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    描述别名

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    获取统计数据

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    创建索引

    +

    +

    ✔️

    +

    ✔️

    +

    删除索引

    +

    +

    ✔️

    +

    ✔️

    +

    创建分区

    +

    +

    ✔️

    +

    ✔️

    +

    删除分区

    +

    +

    ✔️

    +

    ✔️

    +

    加载

    +

    +

    ✔️

    +

    ✔️

    +

    发布

    +

    +

    ✔️

    +

    ✔️

    +

    插入

    +

    +

    ✔️

    +

    ✔️

    +

    删除

    +

    +

    ✔️

    +

    ✔️

    +

    增加

    +

    +

    ✔️

    +

    ✔️

    +

    进口

    +

    +

    ✔️

    +

    ✔️

    +

    同花顺

    +

    +

    ✔️

    +

    ✔️

    +

    压实

    +

    +

    ✔️

    +

    ✔️

    +

    负载平衡

    +

    +

    ✔️

    +

    ✔️

    +

    创建别名

    +

    +

    +

    ✔️

    +

    删除别名

    +

    +

    +

    ✔️

    +
    +

    数据库级别

      +
    • DB_RO:包括读取数据库数据的权限

    • +
    • DB_RW:包括读取和写入数据库数据的权限

    • +
    • DB_Admin:包括读写数据库数据和管理数据库的权限。

    • +
    +

    下表列出了数据库级三个内置权限组所包含的具体权限。

    +

    **权限**

    +

    **只读数据库**

    +

    **数据库读写**

    +

    **数据库管理**

    +

    显示收藏

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    描述数据库

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    创建集合

    +

    +

    +

    ✔️

    +

    删除收藏

    +

    +

    +

    ✔️

    +

    更改数据库

    +

    +

    ✔️

    +

    ✔️

    +
    +

    群集级别

      +
    • Cluster_RO:包括读取实例数据的权限

    • +
    • Cluster_RW:包括读取和写入实例数据的权限

    • +
    • Cluster_Admin:包括读写实例数据和管理实例的权限。

    • +
    +

    下表列出了实例级三个内置权限组所包含的具体权限。

    +

    **权限**

    +

    **只读群集**

    +

    只读** 群集读写**

    +

    **群集管理员**

    +

    列出数据库

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    重命名收藏

    +

    +

    +

    ✔️

    +

    创建所有权

    +

    +

    +

    ✔️

    +

    更新用户

    +

    +

    +

    ✔️

    +

    删除所有者

    +

    +

    +

    ✔️

    +

    选择所有权

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    管理所有权

    +

    +

    +

    ✔️

    +

    选择用户

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    备份

    +

    +

    +

    ✔️

    +

    还原 RBAC

    +

    +

    +

    ✔️

    +

    创建资源组

    +

    +

    +

    ✔️

    +

    删除资源组

    +

    +

    +

    ✔️

    +

    更新资源组

    +

    +

    ✔️

    +

    ✔️

    +

    描述资源组

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    ListResourceGroups

    +

    ✔️

    +

    ✔️

    +

    ✔️

    +

    传输节点

    +

    +

    ✔️

    +

    ✔️

    +

    传输复制

    +

    +

    ✔️

    +

    ✔️

    +

    创建数据库

    +

    +

    +

    ✔️

    +

    删除数据库

    +

    +

    +

    ✔️

    +

    冲洗全部

    +

    +

    ✔️

    +

    ✔️

    +

    创建权限组

    +

    +

    +

    ✔️

    +

    删除特权组

    +

    +

    +

    ✔️

    +

    ListPrivilegeGroups

    +

    +

    +

    ✔️

    +

    操作特权组

    +

    +

    +

    ✔️

    +
    +

    操作步骤

    可以创建权限组,然后向权限组添加权限。

    +

    创建权限组

    下面的示例演示了如何创建名为privilege_group_1 的特权组。

    + +
    from pymilvus import MilvusClient​
    +client.create_privileg_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.CreatePrivilegeGroupReq;​
    +​
    +client.createPrivilegeGroup(CreatePrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.CreatePrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/create" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    +

    向特权组添加权限

    下面的示例演示了如何将PrivilegeBackupRBACPrivilegeRestoreRBAC 添加到刚刚创建的特权组privilege_group_1 中。

    + +
    from pymilvus import MilvusClient​
    +client.add_privileges_to_group(group_name='privilege_group_1', privileges=['Query', 'Search'])​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.AddPrivilegesToGroupReq;​
    +​
    +client.addPrivilegesToGroup(AddPrivilegesToGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Arrays.asList("Query", "Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.AddPrivilegesToGroup(context.Background(), "privilege_group_1", []string{"Query", "Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/add_privileges_to_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Query", "Search"]​
    +}'​
    +
    +
    +

    从特权组中删除权限

    下面的示例演示了如何从特权组privilege_group_1 中移除特权PrivilegeRestoreRBAC

    + +
    from pymilvus import MilvusClient​
    +client.remove_privileges_from_group(group_name='privilege_group_1', privileges='Search')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.RemovePrivilegesFromGroupReq;​
    +​
    +client.removePrivilegesFromGroup(RemovePrivilegesFromGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .privileges(Collections.singletonList("Search"))​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.RemovePrivilegesFromGroup(context.Background(), "privilege_group_1", []string{"Search"})​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/remove_privileges_from_group" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1",​
    +    "privileges":["Search"]​
    +}'​
    +
    +
    +

    列出特权组

    下面的示例演示了如何列出所有现有特权组。

    + +
    from pymilvus import MilvusClient​
    +client.list_privilege_groups()​
    +
    +
    +
    import io.milvus.v2.service.rbac.PrivilegeGroup;​
    +import io.milvus.v2.service.rbac.request.ListPrivilegeGroupsReq;​
    +import io.milvus.v2.service.rbac.response.ListPrivilegeGroupsResp;​
    +​
    +ListPrivilegeGroupsResp resp = client.listPrivilegeGroups(ListPrivilegeGroupsReq.builder()​
    +        .build());​
    +List<PrivilegeGroup> groups = resp.getPrivilegeGroups();​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.ListPrivilegeGroups(context.Background())​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/list" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{}'​
    +
    +
    +

    下面是一个输出示例。

    +
    PrivilegeGroupItem: <privilege_group:privilege_group_1>, <privileges:('Search', 'Query')>​
    +
    +
    +

    删除权限组

    下面的示例演示了如何删除权限组privilege_group_1

    + +
    from pymilvus import MilvusClient​
    +client.drop_privilege_group(group_name='privilege_group_1')​
    +
    +
    +
    import io.milvus.v2.service.rbac.request.DropPrivilegeGroupReq;​
    +​
    +client.dropPrivilegeGroup(DropPrivilegeGroupReq.builder()​
    +        .groupName("privilege_group_1")​
    +        .build());​
    +
    +
    +
    import "github.com/milvus-io/milvus-sdk-go/v2/client"​
    +​
    +client.DropPrivilegeGroup(context.Background(), "privilege_group_1")​
    +
    +
    +
    curl --request POST \​
    +--url "${CLUSTER_ENDPOINT}/v2/vectordb/privilege_groups/drop" \​
    +--header "Authorization: Bearer ${TOKEN}" \​
    +--header "Content-Type: application/json" \​
    +-d '{​
    +    "privilegeGroupName":"privilege_group_1"​
    +}'​
    +
    +
    diff --git a/localization/v2.5.x/site/zh/adminGuide/rbac.json b/localization/v2.5.x/site/zh/adminGuide/rbac.json index f0dbf8ef9..9a9c0be1c 100644 --- a/localization/v2.5.x/site/zh/adminGuide/rbac.json +++ b/localization/v2.5.x/site/zh/adminGuide/rbac.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient\n\nclient = MilvusClient(\n uri='http://localhost:19530', # replace with your own Milvus server address\n token='root:Milvus' # replace with your own Milvus server token\n)\n","client.create_user(\n user_name='user_1',\n password='P@ssw0rd'\n)\n","client.update_password(\n user_name='user_1',\n old_password='P@ssw0rd',\n new_password='P@ssw0rd123'\n)\n","client.list_users()\n\n# output:\n# ['root', 'user_1']\n","client.describe_user(user_name='user_1')\n\n# output:\n# {'user_name': 'user_1', 'roles': ()}\n","client.create_role(\n role_name=\"roleA\",\n)\n","client.list_roles()\n\n# output:\n# ['admin', 'public', 'roleA']\n","# grant privilege to a role\n\nclient.grant_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.describe_role(\n role_name='roleA'\n)\n\n# output:\n# {'role': 'roleA',\n# 'privileges': [{'object_type': 'User',\n# 'object_name': 'user_1',\n# 'db_name': 'default',\n# 'role_name': 'roleA',\n# 'privilege': 'SelectUser',\n# 'grantor_name': 'root'}]}\n","# grant a role to a user\n\nclient.grant_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.describe_user(\n user_name='user_1'\n)\n\n# output:\n# {'user_name': 'user_1', 'roles': ('roleA')}\n","client.revoke_privilege(\n role_name='roleA',\n object_type='User', # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName\n object_name='user_1', # value here can be * or a specific user name if object type is 'User'\n privilege='SelectUser'\n)\n","client.revoke_role(\n user_name='user_1',\n role_name='roleA'\n)\n","client.drop_role(role_name='roleA')\n","client.drop_user(user_name='user_1')\n"],"headingContent":"Enable RBAC","anchorList":[{"label":"启用 RBAC","href":"Enable-RBAC","type":1,"isActive":false},{"label":"1.启动 Milvus 客户端建立连接","href":"1-Initiate-a-Milvus-client-to-establish-a-connection","type":2,"isActive":false},{"label":"2.创建用户","href":"2-Create-a-user","type":2,"isActive":false},{"label":"3.创建角色","href":"3-Create-a-role","type":2,"isActive":false},{"label":"4.向角色授予权限","href":"4-Grant-a-privilege-to-a-role","type":2,"isActive":false},{"label":"5.向用户授予角色","href":"5-Grant-a-role-to-a-user","type":2,"isActive":false},{"label":"6.撤销权限","href":"6-Revoke-privileges","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"RBAC Explained​","anchorList":[{"label":"RBAC 解释","href":"RBAC-Explained​","type":1,"isActive":false},{"label":"RBAC 主要概念","href":"RBAC-key-concepts​","type":2,"isActive":false},{"label":"程序","href":"Procedures​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/rbac.md b/localization/v2.5.x/site/zh/adminGuide/rbac.md index f4bd8bda9..8ca8bbd7f 100644 --- a/localization/v2.5.x/site/zh/adminGuide/rbac.md +++ b/localization/v2.5.x/site/zh/adminGuide/rbac.md @@ -1,10 +1,12 @@ --- id: rbac.md related_key: enable RBAC -summary: 了解如何管理用户、角色和权限。 -title: 启用 RBAC +summary: >- + RBAC(基于角色的访问控制)是一种基于角色的访问控制方法。通过 RBAC,可以精细控制用户在 + Collections、数据库和实例级别上可以执行的操作,增强数据的安全性。 +title: RBAC 解释 --- -

    启用 RBAC

    通过启用 RBAC,可以根据用户角色和权限控制对特定 Milvus 资源(如 Collections 或分区)或权限的访问。目前,该功能仅在 Python 和 Java 中可用。

    -

    本主题介绍如何启用 RBAC 并管理用户和角色

    -
    -

    本页的代码片段使用新的MilvusClient(Python)与 Milvus 进行交互。用于其他语言的新 MilvusClient SDK 将在未来更新中发布。

    -
    -

    1.启动 Milvus 客户端建立连接

    RBAC(基于角色的访问控制)是一种基于角色的访问控制方法。通过 RBAC,可以精细控制用户在 Collections、数据库和实例级别上可以执行的操作,增强数据的安全性。

    +

    与传统的用户访问控制模型不同,RBAC 引入了角色的概念。在 RBAC 模型中,先授予角色权限,然后再将这些角色授予用户。然后,用户才能获得权限。

    +

    RBAC 模型可以提高访问控制管理的效率。例如,如果多个用户需要同一套权限,就不需要为每个用户手动设置权限。相反,你可以创建一个角色并将该角色分配给用户。如果要调整这些用户的权限,只需调整角色的权限,修改后的权限将应用到所有拥有该角色的用户。

    +

    RBAC 主要概念

    启用用户身份验证后,使用由用户名和密码组成的token 连接到 Milvus 实例。默认情况下,Milvus 使用root 用户,密码为Milvus

    -
    from pymilvus import MilvusClient
    -
    -client = MilvusClient(
    -    uri='http://localhost:19530', # replace with your own Milvus server address
    -    token='root:Milvus' # replace with your own Milvus server token
    -)
    -
    -

    2.创建用户

    创建一个名为user_1 的用户,密码为P@ssw0rd

    -
    client.create_user(
    -    user_name='user_1',
    -    password='P@ssw0rd'
    -)
    -
    -

    创建用户后,您可以

    -
      -
    • 更新用户密码。您需要提供原始密码和新密码。
    • -
    -
    client.update_password(
    -    user_name='user_1',
    -    old_password='P@ssw0rd',
    -    new_password='P@ssw0rd123'
    -)
    -
    -
      -
    • 列出所有用户。
    • -
    -
    client.list_users()
    -
    -# output:
    -# ['root', 'user_1']
    -
    -
      -
    • 检查某个用户的角色。
    • -
    -
    client.describe_user(user_name='user_1')
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ()}
    -
    -

    3.创建角色

    下面的示例创建了一个名为roleA 的角色。

    -
    client.create_role(
    -    role_name="roleA",
    -)
    -
    -

    创建角色后,您可以

    +

    + + Users, roles, and privileges + 用户、角色和权限

    +

    RBAC 模型中有四个主要组成部分。

      -
    • 列出所有角色。
    • +
    • **资源:**可访问的资源实体。Milvus 中的资源分为三个级别--实例、数据库和 Collections。

    • +
    • **权限:**对 Milvus 资源执行特定操作的权限(如创建 Collection、插入数据等)。

    • +
    • **权限组:**由多个权限组成的组。

    • +
    • **角色:**角色由权限和资源两部分组成。权限定义了角色可以执行的操作类型,而资源则定义了可以执行操作的目标资源。例如,数据库管理员角色可以对某些数据库执行读、写和管理操作。

    • +
    • **用户:**用户是指使用 Milvus 的人。每个用户都有一个唯一的 ID,并被授予一个或多个角色。

    -
    client.list_roles()
    -
    -# output:
    -# ['admin', 'public', 'roleA']
    -
    -

    4.向角色授予权限

    下面的示例演示了如何向名为roleA 的角色授予搜索所有 Collections 的权限。

    -

    object_type 指定对象类型,也可以理解为资源类型。目前,有效值包括 Collections/User/Global 等,其中 Global 表示没有特定的资源类型。object_name 是资源名称。如果 objecttype为 Collection,那么 object name 可以指特定的 Collections 名称,也可以使用 * 来指定所有 Collections。如果对象类型为全局,则只能用 * 指定对象名称。有关可以授予的其他权限类型,请参阅用户和角色

    -

    在管理角色权限之前,请确保已启用用户身份验证。否则可能会出错。有关如何启用用户身份验证的信息,请参阅验证用户访问

    -
    # grant privilege to a role
    -
    -client.grant_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -

    向角色授予权限后,您可以

    -
      -
    • 查看授予角色的权限。
    • -
    -
    client.describe_role(
    -    role_name='roleA'
    -)
    -
    -# output:
    -# {'role': 'roleA',
    -#  'privileges': [{'object_type': 'User',
    -#    'object_name': 'user_1',
    -#    'db_name': 'default',
    -#    'role_name': 'roleA',
    -#    'privilege': 'SelectUser',
    -#    'grantor_name': 'root'}]}
    -
    -

    5.向用户授予角色

    向用户授予角色,使该用户可以继承角色的所有权限。

    -
    # grant a role to a user
    -
    -client.grant_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -

    授予角色后,验证角色是否已授予:

    -
    client.describe_user(
    -    user_name='user_1'
    -)
    -
    -# output:
    -# {'user_name': 'user_1', 'roles': ('roleA')}
    -
    -

    6.撤销权限

    -

    执行以下操作时要谨慎,因为这些操作是不可逆的。

    -
    -
      -
    • 从角色中删除权限。如果撤销的权限尚未授予角色,则会出现错误。
    • -
    -
    client.revoke_privilege(
    -    role_name='roleA',
    -    object_type='User',  # value here can be Global, Collection or User, object type also depends on the API defined in privilegeName
    -    object_name='user_1',  # value here can be * or a specific user name if object type is 'User'
    -    privilege='SelectUser'
    -)
    -
    -
      -
    • 从角色中删除用户。如果撤销未授予用户的角色,将发生错误。
    • -
    -
    client.revoke_role(
    -    user_name='user_1',
    -    role_name='roleA'
    -)
    -
    -
      -
    • 删除角色。
    • -
    -
    client.drop_role(role_name='roleA')
    -
    -
      -
    • 删除用户。
    • -
    -
    client.drop_user(user_name='user_1')
    -
    -

    下一步

    +

    要通过 RBAC 实现访问控制,需要遵循以下步骤。

    +
      +
    1. 创建用户:除了 Milvus 的默认用户root 外,您还可以创建新用户并设置密码,以保护数据安全。

    2. +
    3. 创建角色:您可以根据需要创建自定义角色。角色的具体功能由其权限决定。

    4. +
    5. 创建权限组:将多个权限合并为一个权限组,以简化向角色授予权限的流程。

    6. +
    7. 向角色授予权限或权限组:通过向角色授予权限或权限组来定义角色的功能。

    8. +
    9. 向用户授予角色:向用户授予具有特定权限的角色,这样用户就可以拥有某个角色的权限。一个角色可以授予多个用户。

    10. +
    diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.json b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.json index 532dad1eb..665a18158 100644 --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.json +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.json @@ -1 +1 @@ -{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0-beta\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0-beta \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0-beta\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0-beta \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0-beta\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"使用 Docker Compose 升级 Milvus 群集","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["...\nrootcoord:\n container_name: milvus-rootcoord\n image: milvusdb/milvus:v2.5.0\n...\nproxy:\n container_name: milvus-proxy\n image: milvusdb/milvus:v2.5.0\n...\nquerycoord:\n container_name: milvus-querycoord\n image: milvusdb/milvus:v2.5.0 \n...\nquerynode:\n container_name: milvus-querynode\n image: milvusdb/milvus:v2.5.0\n...\nindexcoord:\n container_name: milvus-indexcoord\n image: milvusdb/milvus:v2.5.0\n...\nindexnode:\n container_name: milvus-indexnode\n image: milvusdb/milvus:v2.5.0 \n...\ndatacoord:\n container_name: milvus-datacoord\n image: milvusdb/milvus:v2.5.0 \n...\ndatanode:\n container_name: milvus-datanode\n image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n # Option: run/backup/rollback\n type: run\n runWithBackup: true\nconfig:\n sourceVersion: 2.1.4 # Specify your milvus version\n targetVersion: 2.5.0\n backupFilePath: /tmp/migration.bak\nmetastore:\n type: etcd\netcd:\n endpoints:\n - milvus-etcd:2379 # Use the etcd container name\n rootPath: by-dev # The root path where data is stored in etcd\n metaSubPath: meta\n kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvus/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","Update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Cluster with Docker Compose","anchorList":[{"label":"使用 Docker Compose 升级 Milvus 群集","href":"Upgrade-Milvus-Cluster-with-Docker-Compose","type":1,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.md b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.md index 4da013a89..2777e7a72 100644 --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.md +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-docker.md @@ -20,7 +20,7 @@ title: 使用 Docker Compose 升级 Milvus 群集 >

    本主题介绍如何使用 Docker Compose 升级 Milvus。

    -

    在正常情况下,你可以通过更改映像来升级 Milvus。不过,在从 v2.1.x 升级到 v2.5.0-beta 之前,需要迁移元数据

    +

    在正常情况下,你可以通过更改映像来升级 Milvus。不过,在从 v2.1.x 升级到 v2.5.0 之前,需要迁移元数据

    通过更改映像升级 Milvus

    在正常情况下,你可以按以下方法升级 Milvus:

    1. docker-compose.yaml 中更改 Milvus 图像标签。

      -

      请注意,您需要更改代理、所有协调器和所有工作节点的镜像标签。

      +

      请注意,您需要更改代理、所有协调器和所有工作节点的映像标签。

      ...
       rootcoord:
         container_name: milvus-rootcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       proxy:
         container_name: milvus-proxy
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       querycoord:
         container_name: milvus-querycoord
      -  image: milvusdb/milvus:v2.5.0-beta  
      +  image: milvusdb/milvus:v2.5.0  
       ...
       querynode:
         container_name: milvus-querynode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexcoord:
         container_name: milvus-indexcoord
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       ...
       indexnode:
         container_name: milvus-indexnode
      -  image: milvusdb/milvus:v2.5.0-beta 
      +  image: milvusdb/milvus:v2.5.0 
       ...
       datacoord:
         container_name: milvus-datacoord
      -  image: milvusdb/milvus:v2.5.0-beta   
      +  image: milvusdb/milvus:v2.5.0   
       ...
       datanode:
         container_name: milvus-datanode
      -  image: milvusdb/milvus:v2.5.0-beta
      +  image: milvusdb/milvus:v2.5.0
       
    2. 运行以下命令执行升级。

      docker compose down
      @@ -105,7 +105,7 @@ cmd:
         runWithBackup: true
       config:
         sourceVersion: 2.1.4   # Specify your milvus version
      -  targetVersion: 2.5.0-beta
      +  targetVersion: 2.5.0
         backupFilePath: /tmp/migration.bak
       metastore:
         type: etcd
      diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.json b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.json
      index f43193c4a..87887471f 100644
      --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.json
      +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.json
      @@ -1 +1 @@
      -{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"使用 Helm 图表升级 Milvus 群集","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"检查 Milvus Helm 图表","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"使用 Helm 升级 Milvus","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      +{"codeList":["$ helm repo update zilliztech\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update zilliztech\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION    \nnew-release         default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4 \n","NAME                                             READY   STATUS      RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running     0          21m\nmy-release-etcd-1                               1/1     Running     0          21m\nmy-release-etcd-2                               1/1     Running     0          21m\nmy-release-milvus-datacoord-664c58798d-fl75s    1/1     Running     0          21m\nmy-release-milvus-datanode-5f75686c55-xfg2r     1/1     Running     0          21m\nmy-release-milvus-indexcoord-5f98b97589-2l48r   1/1     Running     0          21m\nmy-release-milvus-indexnode-857b4ddf98-vmd75    1/1     Running     0          21m\nmy-release-milvus-proxy-6c548f787f-scspp        1/1     Running     0          21m\nmy-release-milvus-querycoord-c454f44cd-dwmwq    1/1     Running     0          21m\nmy-release-milvus-querynode-76bb4946d-lbrz6     1/1     Running     0          21m\nmy-release-milvus-rootcoord-7764c5b686-62msm    1/1     Running     0          21m\nmy-release-minio-0                              1/1     Running     0          21m\nmy-release-minio-1                              1/1     Running     0          21m\nmy-release-minio-2                              1/1     Running     0          21m\nmy-release-minio-3                              1/1     Running     0          21m\nmy-release-pulsar-bookie-0                      1/1     Running     0          21m\nmy-release-pulsar-bookie-1                      1/1     Running     0          21m\nmy-release-pulsar-bookie-2                      1/1     Running     0          21m\nmy-release-pulsar-bookie-init-tjxpj             0/1     Completed   0          21m\nmy-release-pulsar-broker-0                      1/1     Running     0          21m\nmy-release-pulsar-proxy-0                       1/1     Running     0          21m\nmy-release-pulsar-pulsar-init-c8vvc             0/1     Completed   0          21m\nmy-release-pulsar-recovery-0                    1/1     Running     0          21m\nmy-release-pulsar-zookeeper-0                   1/1     Running     0          21m\nmy-release-pulsar-zookeeper-1                   1/1     Running     0          20m\nmy-release-pulsar-zookeeper-2                   1/1     Running     0          20m\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -w milvusdb/milvus:v2.2.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -w milvusdb/milvus:v2.2.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.4\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -r by-dev -o migrate -w milvusdb/milvus:v2.2.0\n"],"headingContent":"Upgrade Milvus Cluster with Helm Chart","anchorList":[{"label":"使用 Helm 图表升级 Milvus 群集","href":"Upgrade-Milvus-Cluster-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"检查 Milvus Helm 图表","href":"Check-Milvus-Helm-Chart","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"使用 Helm 升级 Milvus","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]}
      \ No newline at end of file
      diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.md b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.md
      index 891a0d895..209532995 100644
      --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.md
      +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-helm.md
      @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
       zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
       

      您可以按以下方式选择 Milvus 的升级路径:

      -
      - 进行滚动升级](#conduct-a-rolling-upgrade) 从 Milvus v2.2.3 及以后的版本升级到 v2.5.0-beta。
      +
      - 进行滚动升级](#conduct-a-rolling-upgrade) 从 Milvus v2.2.3 及以后的版本升级到 v2.5.0。

      进行滚动升级

      自 Milvus 2.2.3 起,您可以将 Milvus 协调器配置为主动待机模式,并为它们启用滚动升级功能,这样 Milvus 就能在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定的停机时间。

      +

      自 Milvus 2.2.3 起,您可以将 Milvus 协调器配置为主动待机模式工作,并为它们启用滚动升级功能,这样 Milvus 就可以在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定的停机时间。

      滚动升级要求协调程序以活动-待机模式工作。您可以使用我们提供的脚本将协调程序配置为活动-待机模式,然后开始滚动升级。

      基于 Kubernetes 提供的滚动更新功能,上述脚本会根据部署的依赖关系对部署进行有序更新。此外,Milvus 还实现了一种机制,确保其组件在升级过程中与依赖它们的组件保持兼容,从而大大减少了潜在的服务停机时间。

      该脚本仅适用于升级与 Helm 一起安装的 Milvus。下表列出了脚本中可用的命令标志。

      @@ -145,8 +145,8 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope o操作符update假 -

      确保 Milvus 实例中的所有部署都处于正常状态后。就可以运行以下命令将 Milvus 实例升级到 2.5.0-beta。

      -
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
      +

      确保 Milvus 实例中的所有部署都处于正常状态后。就可以运行以下命令将 Milvus 实例升级到 2.5.0。

      +
      sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
       
        @@ -229,7 +229,7 @@ my-release-pulsar-zookeeper-2
        $ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'
         # milvusdb/milvus:v2.1.4
         
        -

        4.迁移元数据

        Milvus 2.2 的一个主要变化是段索引的元数据结构。因此,当 Milvus 从 v2.1.x 升级到 v2.2.0 时,你需要使用 Helm 来迁移元数据。 下面是一个脚本,供你安全迁移元数据。

        +

        4.迁移元数据

        Milvus 2.2 的一个主要变化是段索引的元数据结构。因此,当 Milvus 从 v2.1.x 升级到 v2.2.0 时,你需要使用 Helm 来迁移元数据。 这里有一个脚本供你安全迁移元数据。

        此脚本仅适用于安装在 K8s 集群上的 Milvus。如果过程中出现错误,请先使用回滚操作符回滚到之前的版本。

        下表列出了元数据迁移的操作符。

        diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.json b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.json index 983632fe9..e448d7a81 100644 --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.json +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"使用 Milvus Operator 升级 Milvus 群集","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"升级您的 Milvus 操作符","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://github.com/zilliztech/milvus-operator/blob/main/config/samples/beta/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Cluster with Milvus Operator","anchorList":[{"label":"使用 Milvus Operator 升级 Milvus 群集","href":"Upgrade-Milvus-Cluster-with-Milvus-Operator","type":1,"isActive":false},{"label":"升级您的 Milvus 操作符","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.md b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.md index ebf6586b0..3aee8b25c 100644 --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.md +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_cluster-operator.md @@ -46,9 +46,9 @@ helm -n milvus-operator upgrade milvus-

        将您的 Milvus 操作符升级到最新版本后,您有以下选择:

        进行滚动升级

        自 Milvus 2.2.3 起,你可以将 Milvus 协调器配置为主动待机模式,并为它们启用滚动升级功能,这样 Milvus 就能在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定程度的停机。

        +

        自 Milvus 2.2.3 起,你可以将 Milvus 协调器配置为主动待机模式工作,并为它们启用滚动升级功能,这样 Milvus 就能在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定的停机时间。

        基于 Kubernetes 提供的滚动更新功能,Milvus 操作符会根据部署的依赖关系强制执行有序更新。此外,Milvus 还实施了一种机制,确保其组件在升级期间与依赖于它们的组件保持兼容,从而大大减少了潜在的服务停机时间。

        滚动升级功能默认为禁用。你需要通过配置文件明确启用它。

        apiVersion: milvus.io/v1beta1
        @@ -76,7 +76,7 @@ spec:
           components:
             enableRollingUpdate: true
             imageUpdateMode: rollingUpgrade # Default value, can be omitted
        -    image: milvusdb/milvus:v2.5.0-beta
        +    image: milvusdb/milvus:v2.5.0
         

        在上述配置文件中,将spec.components.enableRollingUpdate 设置为true ,将spec.components.image 设置为所需的 Milvus 版本。

        默认情况下,Milvus 会以有序方式对协调器执行滚动升级,即逐个替换协调器 pod 映像。要缩短升级时间,可以考虑将spec.components.imageUpdateMode 设置为all ,这样 Milvus 就会同时替换所有 pod 映像。

        @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

        可以将spec.components.imageUpdateMode 设置为rollingDowngrade ,让 Milvus 用较低的版本替换协调器 pod 映像。

        apiVersion: milvus.io/v1beta1
        @@ -101,7 +101,7 @@ spec:
             imageUpdateMode: rollingDowngrade
             image: milvusdb/milvus:<some-old-version>
         
        -

        然后将配置保存为 YAML 文件(例如milvusupgrade.yml ),并将此配置文件修补到 Milvus 实例中,具体方法如下:

        +

        然后将配置保存为 YAML 文件(例如milvusupgrade.yml ),并将此配置文件修补到 Milvus 实例中,如下所示:

        kubectl patch -f milvusupgrade.yml
         

        通过更改映像升级 Milvus

        然后运行以下命令执行升级:

        kubectl patch -f milvusupgrade.yaml
        @@ -148,8 +148,8 @@ spec:
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        自 Milvus 2.2.0 起,元数据与以前版本的元数据不兼容。以下示例片段假定从 Milvus 2.1.4 升级到 Milvus 2.5.0-beta。

        -

        1.创建用于元数据迁移的.yaml 文件

        创建元数据迁移文件。下面是一个示例。需要在配置文件中指定namesourceVersiontargetVersion 。下面的示例将name 设置为my-release-upgrade ,将sourceVersion 设置为v2.1.4 ,将targetVersion 设置为v2.5.0-beta 。这意味着您的 Milvus 群集将从 v2.1.4 升级到 v2.5.0-beta。

        +

        自 Milvus 2.2.0 起,元数据与以前版本的元数据不兼容。以下示例片段假定从 Milvus 2.1.4 升级到 Milvus 2.5.0。

        +

        1.创建用于元数据迁移的.yaml 文件

        创建元数据迁移文件。下面是一个示例。需要在配置文件中指定namesourceVersiontargetVersion 。下面的示例将name 设置为my-release-upgrade ,将sourceVersion 设置为v2.1.4 ,将targetVersion 设置为v2.5.0 。这意味着您的 Milvus 群集将从 v2.1.4 升级到 v2.5.0。

        apiVersion: milvus.io/v1beta1
         kind: MilvusUpgrade
         metadata:
        @@ -159,9 +159,9 @@ spec:
             namespace: default
             name: my-release
           sourceVersion: "v2.1.4"
        -  targetVersion: "v2.5.0-beta"
        +  targetVersion: "v2.5.0"
           # below are some omit default values:
        -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
        +  # targetImage: "milvusdb/milvus:v2.5.0"
           # toolImage: "milvusdb/meta-migration:v2.2.0"
           # operation: upgrade
           # rollbackIfFailed: true
        diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.json b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.json
        index 9b8b788aa..86d5eea77 100644
        --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.json
        +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.json
        @@ -1 +1 @@
        -{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0-beta\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0-beta\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"使用 Docker Compose 升级 Milvus 单机版","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["...\nstandalone:\n  container_name: milvus-standalone\n  image: milvusdb/milvus:v2.5.0\n","docker compose down\ndocker compose up -d\n","docker stop \n","# migration.yaml\ncmd:\n  # Option: run/backup/rollback\n  type: run\n  runWithBackup: true\nconfig:\n  sourceVersion: 2.1.4   # Specify your milvus version\n  targetVersion: 2.5.0\n  backupFilePath: /tmp/migration.bak\nmetastore:\n  type: etcd\netcd:\n  endpoints:\n    - milvus-etcd:2379  # Use the etcd container name\n  rootPath: by-dev # The root path where data is stored in etcd\n  metaSubPath: meta\n  kvSubPath: kv\n","# Suppose your docker-compose run with the default milvus network,\n# and you put migration.yaml in the same directory with docker-compose.yaml.\ndocker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml\n","// Run the following only after update the milvus image tag in the docker-compose.yaml\ndocker compose down\ndocker compose up -d\n"],"headingContent":"Upgrade Milvus Standalone with Docker Compose","anchorList":[{"label":"使用 Docker Compose 升级 Milvus 单机版","href":"Upgrade-Milvus-Standalone-with-Docker-Compose","type":1,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.md b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.md
        index d3020f4ff..4e0292f23 100644
        --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.md
        +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-docker.md
        @@ -24,7 +24,7 @@ title: 使用 Docker Compose 升级 Milvus 单机版
                 >
               
             

        本主题介绍如何使用 Docker Compose 升级 Milvus。

        -

        在正常情况下,你可以通过更改映像来升级 Milvus。不过,在从 v2.1.x 升级到 v2.5.0-beta 之前,你需要迁移元数据

        +

        在正常情况下,你可以通过更改映像来升级 Milvus。不过,在从 v2.1.x 升级到 v2.5.0 之前,你需要迁移元数据

        出于安全考虑,Milvus 在发布 v2.2.5 时将其 MinIO 升级为 RELEASE.2023-03-20T20-16-18Z。在使用 Docker Compose 从以前安装的 Milvus Standalone 版本升级之前,应创建一个 Single-Node Single-Drive MinIO 部署,并将现有 MinIO 设置和内容迁移到新部署。有关详细信息,请参阅本指南

        @@ -49,7 +49,7 @@ title: 使用 Docker Compose 升级 Milvus 单机版
        ...
         standalone:
           container_name: milvus-standalone
        -  image: milvusdb/milvus:v2.5.0-beta
        +  image: milvusdb/milvus:v2.5.0
         
      1. 运行以下命令执行升级。

        docker compose down
        @@ -83,7 +83,7 @@ cmd:
           runWithBackup: true
         config:
           sourceVersion: 2.1.4   # Specify your milvus version
        -  targetVersion: 2.5.0-beta
        +  targetVersion: 2.5.0
           backupFilePath: /tmp/migration.bak
         metastore:
           type: etcd
        diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.json b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.json
        index 0bdf448cf..e4d869f0a 100644
        --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.json
        +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.json
        @@ -1 +1 @@
        -{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"使用 Helm 图表升级 Milvus 单机版","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"检查 Milvus 版本","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"使用 Helm 升级 Milvus","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ helm repo update\n$ helm search repo zilliztech/milvus --versions\n","helm repo add zilliztech https://zilliztech.github.io/milvus-helm\nhelm repo update zilliztech\n# upgrade existing helm release\nhelm upgrade my-release zilliztech/milvus --reset-then-reuse-values\n","NAME                    CHART VERSION   APP VERSION             DESCRIPTION                                       \nzilliztech/milvus       4.1.34          2.4.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.33          2.4.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.32          2.4.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.31          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.30          2.4.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.29          2.4.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.24          2.3.11                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.23          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.22          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.21          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.20          2.3.10                  Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.18          2.3.10                  Milvus is an open-source vector database built ... \nzilliztech/milvus       4.1.18          2.3.9                   Milvus is an open-source vector database built ...                                       \nzilliztech/milvus       4.1.17          2.3.8                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.16          2.3.7                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.15          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.14          2.3.6                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.13          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.12          2.3.5                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.11          2.3.4                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.10          2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.9           2.3.3                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.8           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.7           2.3.2                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.6           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.5           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.4           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.3           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.2           2.3.1                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.1           2.3.0                   Milvus is an open-source vector database built ...\nzilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...\n","sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'\n","helm repo update\nhelm upgrade my-release milvus/milvus --reset-then-reuse-values --version=4.1.24 # use the helm chart version here\n","NAME                NAMESPACE   REVISION    UPDATED                                 STATUS      CHART           APP VERSION     \nmy-release          default     1           2022-11-21 15:41:25.51539 +0800 CST     deployed    milvus-3.2.18   2.1.4\n","NAME                                            READY   STATUS    RESTARTS   AGE\nmy-release-etcd-0                               1/1     Running   0          84s\nmy-release-milvus-standalone-75c599fffc-6rwlj   1/1     Running   0          84s\nmy-release-minio-744dd9586f-qngzv               1/1     Running   0          84s\n","$ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'\n# milvusdb/milvus:v2.1.4\n","./migrate.sh -i my-release -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true\n","./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1\n./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0\n"],"headingContent":"Upgrade Milvus Standalone with Helm Chart","anchorList":[{"label":"使用 Helm 图表升级 Milvus 单机版","href":"Upgrade-Milvus-Standalone-with-Helm-Chart","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"检查 Milvus 版本","href":"Check-the-Milvus-version","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"使用 Helm 升级 Milvus","href":"Upgrade-Milvus-using-Helm","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.md b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.md
        index a78f93b69..4dd032292 100644
        --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.md
        +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-helm.md
        @@ -108,10 +108,10 @@ zilliztech/milvus       4.1.1           2.3.0                   Milvus is an ope
         zilliztech/milvus       4.1.0           2.3.0                   Milvus is an open-source vector database built ...
         

        您可以按以下方式选择 Milvus 的升级路径:

        -
        - 进行滚动升级](#conduct-a-rolling-upgrade) 从 Milvus v2.2.3 及以后的版本升级到 v2.5.0-beta。
        +
        - 进行滚动升级](#conduct-a-rolling-upgrade) 从 Milvus v2.2.3 及以后的版本升级到 v2.5.0。

        进行滚动升级

        自 Milvus 2.2.3 起,您可以将 Milvus 协调器配置为主动待机模式,并为它们启用滚动升级功能,这样 Milvus 就能在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定的停机时间。

        +

        自 Milvus 2.2.3 起,您可以将 Milvus 协调器配置为主动待机模式工作,并为它们启用滚动升级功能,这样 Milvus 就可以在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定的停机时间。

        滚动升级要求协调程序以活动-待机模式工作。您可以使用我们提供的脚本将协调程序配置为活动-待机模式,然后开始滚动升级。

        -

        基于 Kubernetes 提供的滚动更新功能,上述脚本会根据部署的依赖关系对部署进行有序更新。此外,Milvus 还实现了一种机制,确保其组件在升级期间与依赖它们的组件保持兼容,从而大大减少了潜在的服务停机时间。

        +

        基于 Kubernetes 提供的滚动更新功能,上述脚本会根据部署的依赖关系对部署进行有序更新。此外,Milvus 还实现了一种机制,确保其组件在升级过程中与依赖它们的组件保持兼容,从而大大减少了潜在的服务停机时间。

        该脚本仅适用于升级与 Helm 一起安装的 Milvus。下表列出了脚本中可用的命令标志。

      2. @@ -145,14 +145,14 @@ zilliztech/milvus 4.1.0 2.3.0 Milvus is an ope
        o操作符update
        -

        确保 Milvus 实例中的所有部署都处于正常状态后。你可以运行以下命令将 Milvus 实例升级到 2.5.0-beta。

        -
        sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0-beta -w 'milvusdb/milvus:v2.5.0-beta'
        +

        确保 Milvus 实例中的所有部署都处于正常状态后。你可以运行以下命令将 Milvus 实例升级到 2.5.0。

        +
        sh rollingUpdate.sh -n default -i my-release -o update -t 2.5.0 -w 'milvusdb/milvus:v2.5.0'
         
        1. 该脚本不适用于与RocksMQ 一起安装的 Milvus 实例。
        2. 脚本对部署的升级顺序进行了硬编码,无法更改。
        3. -
        4. 脚本使用kubectl patch 更新部署,并使用kubectl rollout status 观察部署状态。
        5. +
        6. 脚本使用kubectl patch 更新部署,使用kubectl rollout status 观察部署状态。
        7. 脚本使用kubectl patch 将部署的app.kubernetes.io/version 标签更新为命令中-t 标志后指定的标签。
        @@ -207,8 +207,8 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
        $ kubectl get pods my-release-milvus-proxy-6c548f787f-scspp -o=jsonpath='{$.spec.containers[0].image}'
         # milvusdb/milvus:v2.1.4
         
        -

        4.迁移元数据

        Milvus 2.2 的一个主要变化是段索引的元数据结构。因此,当 Milvus 从 v2.1.x 升级到 v2.2.0 时,你需要使用 Helm 来迁移元数据。 这里有一个脚本供你安全迁移元数据。

        -

        此脚本仅适用于安装在 K8s 集群上的 Milvus。如果过程中出现错误,请先使用回滚操作符回滚到之前的版本。

        +

        4.迁移元数据

        Milvus 2.2 的一个主要变化是段索引的元数据结构。因此,当 Milvus 从 v2.1.x 升级到 v2.2.0 时,你需要使用 Helm 来迁移元数据。 下面是一个脚本,供你安全迁移元数据。

        +

        该脚本仅适用于安装在 K8s 集群上的 Milvus。如果过程中出现错误,请先使用回滚操作符回滚到之前的版本。

        下表列出了元数据迁移的操作符。

        @@ -235,25 +235,25 @@ my-release-minio-744dd9586f-qngzv 1/1 Running 0 84s
      3. 迁移 Milvus 元数据。
      4. 使用新镜像启动 Milvus 组件。
      5. -

        2.将 Milvus 从 2.1.x 版升级到 2.5.0-beta 版

        以下命令假定你将 Milvus 从 v2.1.4 升级到 2.5.0-beta。请将它们改为适合你需要的版本。

        +

        2.将 Milvus 从 2.1.x 版升级到 2.5.0 版

        以下命令假定你将 Milvus 从 v2.1.4 升级到 2.5.0。请将它们更改为适合你需要的版本。

        1. 指定 Milvus 实例名称、源 Milvus 版本和目标 Milvus 版本。

          -
          ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0-beta
          +
          ./migrate.sh -i my-release -s 2.1.4 -t 2.5.0
           
        2. 如果你的 Milvus 没有安装在默认的 K8s 命名空间,请用-n 指定命名空间。

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0
           
        3. 如果 Milvus 安装的是自定义rootpath ,请用-r 指定根路径。

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev
           
        4. 如果你的 Milvus 安装的是自定义image ,请用-w 指定图片标签。

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -w milvusdb/milvus:v2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -w milvusdb/milvus:v2.5.0
           
        5. 如果想在迁移完成后自动移除迁移 pod,请设置-d true

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -w milvusdb/milvus:v2.5.0-beta -d true
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -w milvusdb/milvus:v2.5.0 -d true
           
        6. 如果迁移失败,请回滚并重新迁移。

          -
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
          -./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0-beta -r by-dev -o migrate -w milvusdb/milvus:v2.5.0-beta
          +
          ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o rollback -w milvusdb/milvus:v2.1.1
          +./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.5.0 -r by-dev -o migrate -w milvusdb/milvus:v2.5.0
           
        diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.json b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.json index 228ef46f9..23161ef46 100644 --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.json +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.json @@ -1 +1 @@ -{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0-beta\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0-beta\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0-beta\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0-beta\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"使用 Milvus Operator 升级 Milvus Standalone","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"升级 Milvus 操作符","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["helm repo add zilliztech-milvus-operator https://zilliztech.github.io/milvus-operator/\nhelm repo update zilliztech-milvus-operator\nhelm -n milvus-operator upgrade milvus-operator zilliztech-milvus-operator/milvus-operator\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingUpgrade # Default value, can be omitted\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: all\n image: milvusdb/milvus:v2.5.0\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nspec:\n components:\n enableRollingUpdate: true\n imageUpdateMode: rollingDowngrade\n image: milvusdb/milvus:\n","kubectl patch -f milvusupgrade.yml\n","apiVersion: milvus.io/v1beta1\nkind: Milvus\nmetadata:\n name: my-release\nlabels:\n app: milvus\nspec:\n # Omit other fields ...\n components:\n image: milvusdb/milvus:v2.5.0\n","kubectl patch -f milvusupgrade.yaml\n","apiVersion: milvus.io/v1beta1\nkind: MilvusUpgrade\nmetadata:\n name: my-release-upgrade\nspec:\n milvus:\n namespace: default\n name: my-release\n sourceVersion: \"v2.1.4\"\n targetVersion: \"v2.5.0\"\n # below are some omit default values:\n # targetImage: \"milvusdb/milvus:v2.5.0\"\n # toolImage: \"milvusdb/meta-migration:v2.2.0\"\n # operation: upgrade\n # rollbackIfFailed: true\n # backupPVC: \"\"\n # maxRetry: 3\n","$ kubectl create -f https://raw.githubusercontent.com/zilliztech/milvus-operator/main/config/samples/milvusupgrade.yaml\n","kubectl describe milvus release-name\n"],"headingContent":"Upgrade Milvus Standalone with Milvus Operator","anchorList":[{"label":"使用 Milvus Operator 升级 Milvus Standalone","href":"Upgrade-Milvus-Standalone-with-Milvus-Operator","type":1,"isActive":false},{"label":"升级 Milvus 操作符","href":"Upgrade-your-Milvus-operator","type":2,"isActive":false},{"label":"进行滚动升级","href":"Conduct-a-rolling-upgrade","type":2,"isActive":false},{"label":"通过更改映像升级 Milvus","href":"Upgrade-Milvus-by-changing-its-image","type":2,"isActive":false},{"label":"迁移元数据","href":"Migrate-the-metadata","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.md b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.md index d54466589..b0d2d8e68 100644 --- a/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.md +++ b/localization/v2.5.x/site/zh/adminGuide/upgrade_milvus_standalone-operator.md @@ -23,7 +23,7 @@ title: 使用 Milvus Operator 升级 Milvus Standalone d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

        本指南介绍如何使用 Milvus Operator 升级 Milvus Standalone。

        +

        本指南描述如何使用 Milvus Operator 升级您的 Milvus Standalone。

        升级 Milvus 操作符

        将 Milvus 操作符升级到最新版本后,您有以下选择:

        进行滚动升级

        自 Milvus 2.2.3 起,你可以将 Milvus 协调器配置为主动待机模式,并为它们启用滚动升级功能,这样 Milvus 就能在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定程度的停机。

        +

        自 Milvus 2.2.3 起,你可以将 Milvus 协调器配置为主动待机模式工作,并为它们启用滚动升级功能,这样 Milvus 就能在协调器升级期间响应传入的请求。在以前的版本中,升级时需要移除协调器,然后再创建协调器,这可能会导致服务出现一定的停机时间。

        基于 Kubernetes 提供的滚动更新功能,Milvus 操作符会根据部署的依赖关系强制执行有序更新。此外,Milvus 还实施了一种机制,确保其组件在升级期间与依赖于它们的组件保持兼容,从而大大减少了潜在的服务停机时间。

        滚动升级功能默认为禁用。你需要通过配置文件明确启用它。

        apiVersion: milvus.io/v1beta1
        @@ -76,7 +76,7 @@ spec:
           components:
             enableRollingUpdate: true
             imageUpdateMode: rollingUpgrade # Default value, can be omitted
        -    image: milvusdb/milvus:v2.5.0-beta
        +    image: milvusdb/milvus:v2.5.0
         

        在上述配置文件中,将spec.components.enableRollingUpdate 设置为true ,将spec.components.image 设置为所需的 Milvus 版本。

        默认情况下,Milvus 会以有序的方式对协调器进行滚动升级,即逐个替换协调器 pod 映像。要缩短升级时间,可以考虑将spec.components.imageUpdateMode 设置为all ,这样 Milvus 就会同时替换所有 pod 映像。

        @@ -88,7 +88,7 @@ spec: components: enableRollingUpdate: true imageUpdateMode: all - image: milvusdb/milvus:v2.5.0-beta + image: milvusdb/milvus:v2.5.0

        可以将spec.components.imageUpdateMode 设置为rollingDowngrade ,让 Milvus 用较低的版本替换协调器 pod 映像。

        apiVersion: milvus.io/v1beta1
        @@ -101,7 +101,7 @@ spec:
             imageUpdateMode: rollingDowngrade
             image: milvusdb/milvus:<some-older-version>
         
        -

        然后将配置保存为 YAML 文件(例如milvusupgrade.yml ),并将此配置文件修补到 Milvus 实例中,具体方法如下:

        +

        然后将配置保存为 YAML 文件(例如milvusupgrade.yml ),并将此配置文件修补到 Milvus 实例中,如下所示:

        kubectl patch -f milvusupgrade.yml
         

        通过更改映像升级 Milvus

        然后运行以下命令执行升级:

        kubectl patch -f milvusupgrade.yaml
        @@ -150,8 +150,8 @@ spec:
                   d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"
                 >
               
        -    

        自 Milvus 2.2.0 起,元数据与以前版本的元数据不兼容。以下示例片段假定从 Milvus 2.1.4 升级到 Milvus v2.5.0-beta。

        -

        1.创建用于元数据迁移的.yaml 文件

        创建元数据迁移文件。下面是一个示例。需要在配置文件中指定namesourceVersiontargetVersion 。下面的示例将name 设置为my-release-upgrade ,将sourceVersion 设置为v2.1.4 ,将targetVersion 设置为v2.5.0-beta 。这意味着你的 Milvus 实例将从 v2.1.4 升级到 v2.5.0-beta。

        +

        自 Milvus 2.2.0 起,元数据与以前版本的元数据不兼容。以下示例片段假定从 Milvus 2.1.4 升级到 Milvus v2.5.0。

        +

        1.创建用于元数据迁移的.yaml 文件

        创建元数据迁移文件。下面是一个示例。需要在配置文件中指定namesourceVersiontargetVersion 。下面的示例将name 设置为my-release-upgrade ,将sourceVersion 设置为v2.1.4 ,将targetVersion 设置为v2.5.0 。这意味着你的 Milvus 实例将从 v2.1.4 升级到 v2.5.0。

        apiVersion: milvus.io/v1beta1
         kind: MilvusUpgrade
         metadata:
        @@ -161,9 +161,9 @@ spec:
             namespace: default
             name: my-release
           sourceVersion: "v2.1.4"
        -  targetVersion: "v2.5.0-beta"
        +  targetVersion: "v2.5.0"
           # below are some omit default values:
        -  # targetImage: "milvusdb/milvus:v2.5.0-beta"
        +  # targetImage: "milvusdb/milvus:v2.5.0"
           # toolImage: "milvusdb/meta-migration:v2.2.0"
           # operation: upgrade
           # rollbackIfFailed: true
        diff --git a/localization/v2.5.x/site/zh/adminGuide/users_and_roles.json b/localization/v2.5.x/site/zh/adminGuide/users_and_roles.json
        new file mode 100644
        index 000000000..882aee4fa
        --- /dev/null
        +++ b/localization/v2.5.x/site/zh/adminGuide/users_and_roles.json
        @@ -0,0 +1 @@
        +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n    uri=\"http://localhost:19530\",​\n    token=\"root:Milvus\"​\n)​\n​\nclient.create_user(user_name=\"user_1\", password=\"P@ssw0rd\")​\n\n","import io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\nimport io.milvus.v2.service.rbac.request.CreateUserReq;​\n​\nConnectConfig connectConfig = ConnectConfig.builder()​\n        .uri(\"http://localhost:19530\")​\n        .token(\"root:Milvus\")​\n        .build();​\n        ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nCreateUserReq createUserReq = CreateUserReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .build();​\n        ​\nclient.createUser(createUserReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nawait milvusClient.createUser({​\n   username: 'user_1',​\n   password: 'P@ssw0rd',​\n });​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.update_password(​\n    user_name=\"user_1\",​\n    old_password=\"P@ssw0rd\",​\n    new_password=\"NewP@ssw0rd\"​\n)​\n\n","import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​\n​\nUpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​\n        .userName(\"user_1\")​\n        .password(\"P@ssw0rd\")​\n        .newPassword(\"NewP@ssw0rd\")​\n        .build();​\nclient.updatePassword(updatePasswordReq);​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.updateUser({​\n   username: 'user_1',​\n   newPassword: 'P@ssw0rd',​\n   oldPassword: 'NewP@ssw0rd',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"newPassword\": \"P@ssw0rd!\",​\n    \"userName\": \"user_1\",​\n    \"password\": \"P@ssw0rd\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_users()​\n\n","List resp = client.listUsers();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listUsers();​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/users/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['root', 'user_1']​\n\n","from pymilvus import MilvusClient​\n​\nclient.create_role(role_name=\"role_a\")​\nimport io.milvus.v2.service.rbac.request.CreateRoleReq;​\n\n","CreateRoleReq createRoleReq = CreateRoleReq.builder()​\n        .roleName(\"role_a\")​\n        .build();​\n       ​\n\n","client.createRole(createRoleReq);​\nconst { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.createRole({​\n   roleName: 'role_a',​\n});​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/create\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n    \"roleName\": \"role_a\"​\n}'​\n\n","from pymilvus import MilvusClient​\n​\nclient.list_roles()​\n\n","List roles = client.listRoles();​\n\n","const { MilvusClient, DataType } = require(\"@zilliz/milvus2-sdk-node\")​\n​\nawait milvusClient.listRoles(​\n    includeUserInfo: True​\n);​\n\n","curl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/roles/list\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{}'​\n\n","['admin', 'role_a']​\n\n"],"headingContent":"Create Users & Roles​","anchorList":[{"label":"创建用户和角色","href":"Create-Users--Roles​","type":1,"isActive":false},{"label":"用户","href":"User​","type":2,"isActive":false},{"label":"角色","href":"Role​","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/zh/adminGuide/users_and_roles.md b/localization/v2.5.x/site/zh/adminGuide/users_and_roles.md
        new file mode 100644
        index 000000000..0ff6f58e3
        --- /dev/null
        +++ b/localization/v2.5.x/site/zh/adminGuide/users_and_roles.md
        @@ -0,0 +1,258 @@
        +---
        +id: users_and_roles.md
        +related_key: 'users, roles'
        +summary: >-
        +  Milvus 通过 RBAC
        +  实现细粒度访问控制。您可以从创建用户和角色开始,然后为角色分配权限或权限组,最后通过向用户授予角色来管理访问控制。这种方法可确保访问管理的效率和安全性。本页将介绍如何在
        +  Milvus 中创建用户和角色。
        +title: 创建用户和角色
        +---
        +

        创建用户和角色

        Milvus 通过 RBAC 实现细粒度访问控制。您可以从创建用户和角色开始,然后为角色分配权限或权限组,最后通过向用户授予角色来管理访问控制。这种方法可确保访问管理的效率和安全性。本页将介绍如何在 Milvus 中创建用户和角色。

        +

        用户

        初始化 Milvus 实例后,会自动生成一个根用户,用于首次连接 Milvus 时进行身份验证。根用户的用户名是root ,密码是Milvus 。根用户的默认角色是admin ,可以访问所有资源。为确保数据安全,请妥善保管根用户的凭据,防止未经授权的访问。

        +

        对于日常操作,我们建议创建用户而不是使用根用户。

        +

        创建用户

        下面的示例显示了如何创建用户名为user_1 、密码为P@ssw0rd 的用户。用户名和密码必须遵循以下规则。

        +
          +
        • 用户名:必须以字母开头,只能包含大写或小写字母、数字和下划线。

        • +
        • 密码:长度必须为 8-64 个字符,必须包括以下三种字符:大写字母、小写字母、数字和特殊字符。

        • +
        + +
        from pymilvus import MilvusClient​
        +​
        +client = MilvusClient(​
        +    uri="http://localhost:19530",​
        +    token="root:Milvus"​
        +)​
        +​
        +client.create_user(user_name="user_1", password="P@ssw0rd")​
        +
        +
        +
        import io.milvus.v2.client.ConnectConfig;​
        +import io.milvus.v2.client.MilvusClientV2;​
        +import io.milvus.v2.service.rbac.request.CreateUserReq;​
        +​
        +ConnectConfig connectConfig = ConnectConfig.builder()​
        +        .uri("http://localhost:19530")​
        +        .token("root:Milvus")​
        +        .build();​
        +        ​
        +MilvusClientV2 client = new MilvusClientV2(connectConfig);​
        +​
        +CreateUserReq createUserReq = CreateUserReq.builder()​
        +        .userName("user_1")​
        +        .password("P@ssw0rd")​
        +        .build();​
        +        ​
        +client.createUser(createUserReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +const address = "http://localhost:19530";​
        +const token = "root:Milvus";​
        +const client = new MilvusClient({address, token});​
        +​
        +await milvusClient.createUser({​
        +   username: 'user_1',​
        +   password: 'P@ssw0rd',​
        + });​
        +
        +
        +
        export CLUSTER_ENDPOINT="http://localhost:19530"​
        +export TOKEN="root:Milvus"​
        +​
        +curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "userName": "user_1",​
        +    "password": "P@ssw0rd"​
        +}'​
        +
        +
        +

        更新密码

        创建用户后,如果忘记密码,可以更新密码。

        +

        新密码也必须遵循以下规则。

        +
          +
        • 长度必须为 8-64 个字符,并包含以下三个字符:大写字母、小写字母、数字和特殊字符。
        • +
        +

        下面的示例显示了如何将用户user_1 的密码更新为NewP@ssw0rd

        + +
        from pymilvus import MilvusClient​
        +​
        +client.update_password(​
        +    user_name="user_1",​
        +    old_password="P@ssw0rd",​
        +    new_password="NewP@ssw0rd"​
        +)​
        +
        +
        +
        import io.milvus.v2.service.rbac.request.UpdatePasswordReq;​
        +​
        +UpdatePasswordReq updatePasswordReq = UpdatePasswordReq.builder()​
        +        .userName("user_1")​
        +        .password("P@ssw0rd")​
        +        .newPassword("NewP@ssw0rd")​
        +        .build();​
        +client.updatePassword(updatePasswordReq);​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.updateUser({​
        +   username: 'user_1',​
        +   newPassword: 'P@ssw0rd',​
        +   oldPassword: 'NewP@ssw0rd',​
        +});​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "newPassword": "P@ssw0rd!",​
        +    "userName": "user_1",​
        +    "password": "P@ssw0rd"​
        +}'​
        +
        +
        +

        列出用户

        创建多个用户后,您可以列出并查看所有现有用户。

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_users()​
        +
        +
        +
        List<String> resp = client.listUsers();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.listUsers();​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        下面是一个输出示例。root 是 Milvus 自动生成的默认用户。user_1 是刚刚创建的新用户。

        +
        ['root', 'user_1']​
        +
        +
        +

        角色

        Milvus 提供了一个名为admin 的内置角色,它是一个管理员角色,可以访问所有实例下的资源,并拥有所有操作的权限。为实现更精细的访问管理和增强数据安全性,建议根据需要创建自定义角色。

        +

        创建角色

        下面的示例演示了如何创建名为role_a 的角色。

        +

        角色名称必须遵循以下规则。

        +
          +
        • 必须以字母开头,且只能包含大写或小写字母、数字和下划线"。
        • +
        + +
        from pymilvus import MilvusClient​
        +​
        +client.create_role(role_name="role_a")​
        +import io.milvus.v2.service.rbac.request.CreateRoleReq;​
        +
        +
        +
        CreateRoleReq createRoleReq = CreateRoleReq.builder()​
        +        .roleName("role_a")​
        +        .build();​
        +       ​
        +
        +
        +
        client.createRole(createRoleReq);​
        +const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.createRole({​
        +   roleName: 'role_a',​
        +});​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/create" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{​
        +    "roleName": "role_a"​
        +}'​
        +
        +
        +

        列出角色

        创建多个角色后,您可以列出并查看所有现有角色。

        + +
        from pymilvus import MilvusClient​
        +​
        +client.list_roles()​
        +
        +
        +
        List<String> roles = client.listRoles();​
        +
        +
        +
        const { MilvusClient, DataType } = require("@zilliz/milvus2-sdk-node")​
        +​
        +await milvusClient.listRoles(​
        +    includeUserInfo: True​
        +);​
        +
        +
        +
        curl --request POST \​
        +--url "${CLUSTER_ENDPOINT}/v2/vectordb/roles/list" \​
        +--header "Authorization: Bearer ${TOKEN}" \​
        +--header "Content-Type: application/json" \​
        +-d '{}'​
        +
        +
        +

        下面是一个输出示例。admin 是 Milvus 中的默认角色。role_a 是刚刚创建的新角色。

        +
        ['admin', 'role_a']​
        +
        +
        diff --git a/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.json b/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.json index 70d53aa4e..8163b9510 100644 --- a/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.json +++ b/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.json @@ -1 +1 @@ -{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"使用 Docker Compose 运行 Milvus (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"安装 Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["# Download the configuration file\n$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml\n\n# Start Milvus\n$ sudo docker compose up -d\n\nCreating milvus-etcd ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker-compose ps\n\n Name Command State Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp\nmilvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp\nmilvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n"],"headingContent":"Run Milvus with Docker Compose (Linux)","anchorList":[{"label":"使用 Docker Compose 运行 Milvus (Linux)","href":"Run-Milvus-with-Docker-Compose-Linux","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"安装 Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.md b/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.md index d8f678244..d9fcdaeee 100644 --- a/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.md +++ b/localization/v2.5.x/site/zh/getstarted/run-milvus-docker/install_standalone-docker-compose.md @@ -57,7 +57,7 @@ title: 使用 Docker Compose 运行 Milvus (Linux)

        Milvus 在 Milvus 资源库中提供了 Docker Compose 配置文件。要使用 Docker Compose 安装 Milvus,只需运行

        # Download the configuration file
        -$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose.yml -O docker-compose.yml
        +$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose.yml -O docker-compose.yml
         
         # Start Milvus
         $ sudo docker compose up -d
        diff --git a/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json b/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
        index 94523b53f..c19613e5e 100644
        --- a/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
        +++ b/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.json
        @@ -1 +1 @@
        -{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"使用 Docker Compose 运行支持 GPU 的 Milvus","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"安装 Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"配置内存池","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        +{"codeList":["$ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: [\"0\"]\n...\n","...\nstandalone:\n  ...\n  deploy:\n    resources:\n      reservations:\n        devices:\n          - driver: nvidia\n            capabilities: [\"gpu\"]\n            device_ids: ['0', '1']\n...\n","$ sudo docker compose up -d\n\nCreating milvus-etcd  ... done\nCreating milvus-minio ... done\nCreating milvus-standalone ... done\n","$ sudo docker compose ps\n\n      Name                     Command                  State                            Ports\n--------------------------------------------------------------------------------------------------------------------\nmilvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp\nmilvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp\nmilvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp\n","$ CUDA_VISIBLE_DEVICES=0 ./milvus run standalone\n","$ CUDA_VISIBLE_DEVICES=0,1 ./milvus run standalone\n","# Stop Milvus\n$ sudo docker compose down\n\n# Delete service data\n$ sudo rm -rf volumes\n","docker cp :/milvus/configs/milvus.yaml milvus.yaml\n","vim milvus.yaml\n","...\ngpu:\n  initMemSize: 0\n  maxMemSize: 0\n...\n","docker cp milvus.yaml :/milvus/configs/milvus.yaml\n","docker stop \ndocker start \n"],"headingContent":"Run Milvus with GPU Support Using Docker Compose","anchorList":[{"label":"使用 Docker Compose 运行支持 GPU 的 Milvus","href":"Run-Milvus-with-GPU-Support-Using-Docker-Compose","type":1,"isActive":false},{"label":"前提条件","href":"Prerequisites","type":2,"isActive":false},{"label":"安装 Milvus","href":"Install-Milvus","type":2,"isActive":false},{"label":"配置内存池","href":"Configure-memory-pool","type":2,"isActive":false},{"label":"下一步","href":"Whats-next","type":2,"isActive":false}]}
        \ No newline at end of file
        diff --git a/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md b/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
        index f36e2ec50..0944e3ca3 100644
        --- a/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
        +++ b/localization/v2.5.x/site/zh/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md
        @@ -59,8 +59,8 @@ title: 使用 Docker Compose 运行支持 GPU 的 Milvus
                 >
               
             

        要使用 Docker Compose 安装支持 GPU 的 Milvus,请按照以下步骤操作。

        -

        1.下载并配置 YAML 文件

        下载 milvus-standalone-docker-compose-gpu.yml并手动将其保存为 docker-compose.yml,或使用以下命令。

        -
        $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0-beta/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
        +

        1.下载并配置 YAML 文件

        下载 milvus-standalone-docker-compose-gpu.yml并手动保存为 docker-compose.yml,或使用以下命令。

        +
        $ wget https://github.com/milvus-io/milvus/releases/download/v2.5.0/milvus-standalone-docker-compose-gpu.yml -O docker-compose.yml
         

        您需要对 YAML 文件中单机服务的环境变量做如下修改:

          diff --git a/localization/v2.5.x/site/zh/menuStructure/zh.json b/localization/v2.5.x/site/zh/menuStructure/zh.json index 91b5134e8..654768e75 100644 --- a/localization/v2.5.x/site/zh/menuStructure/zh.json +++ b/localization/v2.5.x/site/zh/menuStructure/zh.json @@ -701,40 +701,71 @@ "order": 5, "children": [] }, + { + "label": "过滤", + "id": "filtering", + "order": 6, + "children": [ + { + "label": "过滤说明", + "id": "boolean.md", + "order": 0, + "children": [] + }, + { + "label": "基本操作符", + "id": "basic-operators.md", + "order": 1, + "children": [] + }, + { + "label": "过滤模板", + "id": "filtering-templating.md", + "order": 2, + "children": [] + }, + { + "label": "JSON 操作符", + "id": "json-operators.md", + "order": 3, + "children": [] + }, + { + "label": "数组操作符", + "id": "array-operators.md", + "order": 4, + "children": [] + } + ] + }, { "label": "全文检索", "id": "full-text-search.md", - "order": 6, + "order": 7, "children": [] }, { "label": "文本匹配", "id": "keyword-match.md", - "order": 7, + "order": 8, "children": [] }, { "label": "搜索迭代器", "id": "with-iterators.md", - "order": 8, + "order": 9, "children": [] }, { "label": "使用 Partition Key", "id": "use-partition-key.md", - "order": 9, - "children": [] - }, - { - "label": "元数据过滤", - "id": "boolean.md", - "order": 14, + "order": 10, "children": [] }, { "label": "Rerankers", "id": "reranking.md", - "order": 15, + "order": 11, "children": [] } ] @@ -1364,17 +1395,48 @@ "children": [] }, { - "label": "用户、权限和角色", - "id": "users_and_roles.md", - "order": 10, - "children": [] - }, - { - "label": "启用 RBAC", - "id": "rbac.md", + "label": "RBAC", + "id": "rbac", "order": 1, "isMenu": true, - "children": [] + "children": [ + { + "label": "RBAC 解释", + "id": "rbac.md", + "order": 0, + "children": [] + }, + { + "label": "创建用户和角色", + "id": "users_and_roles.md", + "order": 1, + "children": [] + }, + { + "label": "创建权限组", + "id": "privilege_group.md", + "order": 2, + "children": [] + }, + { + "label": "授予特权", + "id": "grant_privileges.md", + "order": 3, + "children": [] + }, + { + "label": "资助角色", + "id": "grant_roles.md", + "order": 4, + "children": [] + }, + { + "label": "删除用户和角色", + "id": "drop_users_roles.md", + "order": 5, + "children": [] + } + ] }, { "label": "传输中加密", @@ -1513,6 +1575,12 @@ } ] }, + { + "label": "Milvus 网络用户界面", + "id": "milvus-webui.md", + "order": 6, + "children": [] + }, { "label": "Milvus 尺寸工具", "id": "sizing", diff --git a/localization/v2.5.x/site/zh/release_notes.json b/localization/v2.5.x/site/zh/release_notes.json index a69442914..7cafc3079 100644 --- a/localization/v2.5.x/site/zh/release_notes.json +++ b/localization/v2.5.x/site/zh/release_notes.json @@ -1 +1 @@ -{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"版本说明","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0-beta","href":"v250-beta","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":[],"headingContent":"Release Notes","anchorList":[{"label":"版本说明","href":"Release-Notes","type":1,"isActive":false},{"label":"v2.5.0","href":"v250","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/release_notes.md b/localization/v2.5.x/site/zh/release_notes.md index 1a1d992e0..34eaaa07c 100644 --- a/localization/v2.5.x/site/zh/release_notes.md +++ b/localization/v2.5.x/site/zh/release_notes.md @@ -19,7 +19,7 @@ title: 版本说明 >

          了解 Milvus 的新功能!本页总结了每个版本的新功能、改进、已知问题和错误修复。您可以在本部分找到 v2.5.0 之后每个版本的发布说明。我们建议您定期访问此页面以了解更新信息。

          -

          v2.5.0-beta

          发布日期:2024 年 11 月 26 日

          +

          发布日期:2024 年 12 月 23 日

        - +
        Milvus 版本Python SDK 版本Node.js SDK 版本Java SDK 版本
        2.5.0-beta2.5.02.5.02.5.0
        2.5.02.5.12.5.22.5.2
        -

        Milvus 2.5.0-beta 带来了重大进步,为处理向量搜索和大规模数据管理的用户提高了可用性、可扩展性和性能。通过这一版本,Milvus 集成了强大的新功能,如基于术语的搜索、用于优化查询的聚类压缩,以及对稀疏和密集向量搜索方法的多功能支持。集群管理、索引和数据处理方面的增强功能将灵活性和易用性提高到了新的水平,使 Milvus 成为一个更加强大和用户友好的向量数据库。

        -

        主要功能

        Milvus 2.5 支持使用 Sparse-BM25 实现全文搜索!该功能是对 Milvus 强大语义搜索功能的重要补充,尤其是在涉及罕见词汇或专业术语的情况下。在以前的版本中,Milvus 支持稀疏向量来辅助关键词搜索。这些稀疏向量由 SPLADEv2/BGE-M3 等神经模型或 BM25 算法等统计模型在 Milvus 外部生成。

        +

        Milvus 2.5.0 带来了重大进步,为处理向量搜索和大规模数据管理的用户提高了可用性、可扩展性和性能。通过这一版本,Milvus 集成了强大的新功能,如基于术语的搜索、用于优化查询的聚类压缩,以及对稀疏和密集向量搜索方法的多功能支持。集群管理、索引和数据处理方面的增强功能将灵活性和易用性提高到了新的水平,使 Milvus 成为一个更加强大和用户友好的向量数据库。

        +

        主要功能

        Milvus 2.5 支持使用 Sparse-BM25 实现全文搜索!该功能是对 Milvus 强大语义搜索功能的重要补充,尤其是在涉及罕见词或专业术语的情况下。在以前的版本中,Milvus 支持稀疏向量来辅助关键词搜索。这些稀疏向量由 SPLADEv2/BGE-M3 等神经模型或 BM25 算法等统计模型在 Milvus 外部生成。

        Milvus 2.5 由Tantivy 提供技术支持,内置分析器和稀疏向量提取功能,将 API 从仅接收向量作为输入扩展到直接接受文本。在插入数据时,BM25 统计信息会实时更新,从而提高了可用性和准确性。此外,基于近似近邻(ANN)算法的稀疏向量比标准关键字搜索系统具有更强大的性能。

        有关详情,请参阅分析器概述全文搜索

        集群管理 WebUI(测试版)

        为了更好地支持海量数据和丰富功能,Milvus 的复杂设计包括各种依赖关系、众多节点角色、复杂数据结构等。这些方面都会给使用和维护带来挑战。

        @@ -54,15 +54,15 @@ title: 版本说明

        位图索引

        Milvus 系列新增了一种标量数据索引。位图索引使用长度与行数相等的位数组来表示值的存在并加速搜索。

        位图索引传统上对低Cardinality字段很有效,这些字段的不同值数量不多--例如,包含性别信息的列只有两个可能的值:男性和女性。

        有关详细信息,请参阅位图索引

        -

        可归零和默认值

        Milvus 现在支持为主键字段以外的标量字段设置可归零属性和默认值。对于标记为nullable=True 的标量字段,用户可以在插入数据时省略该字段;系统会将其视为空值或默认值(如果已设置),而不会出错。

        -

        默认值和可空属性为 Milvus 提供了更大的灵活性。用户在创建 Collections 时,可以利用这一功能来处理具有不确定值的字段。它还简化了从其他数据库系统到 Milvus 的数据迁移,允许处理包含空值的数据集,同时保留原始默认值设置。

        +

        可空值和默认值

        Milvus 现在支持为主键字段以外的标量字段设置可归零属性和默认值。对于标记为nullable=True 的标量字段,用户可以在插入数据时省略该字段;系统会将其视为空值或默认值(如果已设置),而不会出错。

        +

        默认值和可归零属性为 Milvus 提供了更大的灵活性。用户在创建 Collections 时,可以利用这一功能来处理具有不确定值的字段。它还简化了从其他数据库系统到 Milvus 的数据迁移,允许处理包含空值的数据集,同时保留原始默认值设置。

        有关详情,请参阅 "可空值和默认值"。

        基于 Faiss 的 HNSW SQ/PQ/PRQ

        通过与 Faiss 社区的密切合作,Faiss 中的 HNSW 算法在功能和性能方面都有了显著的改进。出于稳定性和可维护性的考虑,Milvus 2.5 正式将对 HNSW 的支持从 hnswlib 迁移到 Faiss。

        -

        基于 Faiss,Milvus 2.5 支持 HNSW 上的多种量化方法,以满足不同场景的需求:SQ(标量量化器)、PQ(乘积量化器)和 PRQ(乘积残差量化器)。SQ 和 PQ 比较常见;SQ 具有良好的查询性能和构建速度,而 PQ 在相同压缩比的情况下具有更好的召回率。许多向量数据库通常使用二进制量化,这是 SQ 量化的一种简单形式。

        -

        PRQ 是 PQ 和 AQ(加法量化器)的融合。与 PQ 相比,它需要更长的构建时间,但却能提供更好的召回率,尤其是在高压缩率的情况下,比如二进制压缩。

        -

        聚类压缩(测试版)

        Milvus 2.5 引入了聚类压缩(Clustering Compaction)功能,以加快搜索速度并降低大型 Collections 的成本。通过指定一个标量字段作为聚类关键字,数据会按范围重新分配,以优化存储和检索。该功能的作用类似于全局索引,可让 Milvus 在基于聚类元数据的查询过程中有效地剪裁数据,从而在应用标量过滤器时提高搜索性能。

        +

        基于 Faiss,Milvus 2.5 支持 HNSW 上的多种量化方法,以满足不同场景的需求:SQ(标量量化器)、PQ(乘积量化器)和 PRQ(乘积残差量化器)。SQ 和 PQ 比较常见;SQ 提供了良好的查询性能和构建速度,而 PQ 在相同压缩比的情况下提供了更好的召回率。许多向量数据库通常使用二进制量化,这是 SQ 量化的一种简单形式。

        +

        PRQ 是 PQ 和 AQ(加法量化器)的融合。与 PQ 相比,PRQ 需要更长的构建时间,但却能提供更好的召回率,尤其是在高压缩率的情况下,二进制压缩的召回率更高。

        +

        聚类压缩(测试版)

        Milvus 2.5 引入了聚类压缩(Clustering Compaction)功能,以加快搜索速度并降低大型 Collections 的成本。通过指定一个标量字段作为聚类关键字,数据会按范围重新分配,以优化存储和检索。该功能的作用类似于全局索引,可使 Milvus 在基于聚类元数据的查询过程中有效地剪裁数据,从而在应用标量过滤器时提高搜索性能。

        有关详情,请参阅聚类压缩

        -

        其他功能

        流节点(测试版)

        Milvus 2.5 引入了一个名为流节点的新组件,它可提供先写日志(WAL)服务。这使 Milvus 能够在读写通道前后达成共识,解锁新特性、功能和优化。Milvus 2.5 默认禁用此功能,将在 3.0 版本中正式启用。

        +

        其他功能

        流节点(测试版)

        Milvus 2.5 引入了一个名为流节点的新组件,它提供了先写日志(WAL)服务。这使 Milvus 能够在读写通道前后达成共识,解锁新特性、功能和优化。Milvus 2.5 版默认禁用此功能,3.0 版将正式启用。

        支持 IPv6

        Milvus 现在支持 IPv6,从而扩大了网络连接和兼容性。

        CSV 批量导入

        除 JSON 和 Parquet 格式外,Milvus 现在还支持直接批量导入 CSV 格式的数据。

        加速查询的表达式模板

        Milvus 现在支持表达式模板,提高了表达式解析效率,尤其是在使用复杂表达式的情况下。

        @@ -78,6 +78,9 @@ title: 版本说明

        依赖关系升级

        升级至 ETCD 3.5.16 和 Pulsar 3.0.7 LTS,修复了现有的 CVE 并增强了安全性。注意:升级到 Pulsar 3.x 与之前的 2.x 版本不兼容。

        对于已经拥有可正常使用的 Milvus 部署的用户,需要先升级 ETCD 和 Pulsar 组件,然后才能使用新特性和功能。详情请参阅将 Pulsar 从 2.x 升级到 3.x。

        本地存储 V2

        在 Milvus 2.5 中引入了新的本地文件格式,提高了标量数据的加载和查询效率,减少了内存开销,并为未来的优化奠定了基础。

        -

        表达式解析优化

        通过对重复表达式实施缓存、升级 ANTLR 以及优化NOT IN 子句的性能,改进了表达式解析。

        +

        表达式解析优化

        通过对重复表达式实施缓存、升级 ANTLR 和优化NOT IN 子句的性能,改进了表达式解析。

        改进 DDL 并发性能

        优化了数据定义语言 (DDL) 操作的并发性能。

        RESTful API 功能调整

        使 RESTful API 的功能与其他 SDK 保持一致。

        +

        安全和配置更新

        支持 TLS,以确保更复杂或企业环境中的节点间通信安全。有关详情,请参阅安全配置

        +

        压缩性能增强

        删除了混合压缩中的最大分段限制,现在会优先处理较小的分段,从而提高效率并加快对大型或碎片化数据集的查询。

        +

        基于分数的通道平衡

        引入了一种可动态平衡各通道负载的策略,提高了大规模部署中的资源利用率和整体稳定性。

        diff --git a/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.json b/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.json index c186b53d7..64a20129f 100644 --- a/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.json +++ b/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.json @@ -1 +1 @@ -{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","# Currently not available for Python\n\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"修改 Collections","href":"Modify-Collection​","type":1,"isActive":false},{"label":"重新命名 Collections","href":"Rename-Collection​","type":2,"isActive":false},{"label":"设置 Collections TTL","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file +{"codeList":["from pymilvus import MilvusClient​\n​\nclient = MilvusClient(​\n uri=\"http://localhost:19530\",​\n token=\"root:Milvus\"​\n)​\n​\nclient.rename_collection(​\n old_name=\"my_collection\",​\n new_name=\"my_new_collection\"​\n)​\n\n","import io.milvus.v2.service.collection.request.RenameCollectionReq;​\nimport io.milvus.v2.client.ConnectConfig;​\nimport io.milvus.v2.client.MilvusClientV2;​\n​\nString CLUSTER_ENDPOINT = \"http://localhost:19530\";​\nString TOKEN = \"root:Milvus\";​\n​\n// 1. Connect to Milvus server​\nConnectConfig connectConfig = ConnectConfig.builder()​\n .uri(CLUSTER_ENDPOINT)​\n .token(TOKEN)​\n .build();​\n ​\nMilvusClientV2 client = new MilvusClientV2(connectConfig);​\n​\nRenameCollectionReq renameCollectionReq = RenameCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .newCollectionName(\"my_new_collection\")​\n .build();​\n​\nclient.renameCollection(renameCollectionReq);​\n\n","import { MilvusClient, DataType } from \"@zilliz/milvus2-sdk-node\";​\n​\nconst address = \"http://localhost:19530\";​\nconst token = \"root:Milvus\";​\nconst client = new MilvusClient({address, token});​\n​\nconst res = await client.renameCollection({​\n oldName: \"my_collection\",​\n newName: \"my_new_collection\"​\n});​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n)​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.RenameCollection(ctx, client.NewRenameCollectionOption(\"my_collection\", \"my_new_collection\"))​\nif err != nil {​\n // handle error​\n}​\n\n","export CLUSTER_ENDPOINT=\"http://localhost:19530\"​\nexport TOKEN=\"root:Milvus\"​\n​\ncurl --request POST \\​\n--url \"${CLUSTER_ENDPOINT}/v2/vectordb/collections/rename\" \\​\n--header \"Authorization: Bearer ${TOKEN}\" \\​\n--header \"Content-Type: application/json\" \\​\n-d '{​\n \"collectionName\": \"my_collection\",​\n \"newCollectionName\": \"my_new_collection\"​\n}'​\n\n","from pymilvus import MilvusClient\n\nclient.alter_collection_properties(\n collection_name=\"collection_name\",\n properties = {\"collection.ttl.seconds\": 500}\n)\n","import io.milvus.v2.service.collection.request.AlterCollectionReq;​\nimport java.util.HashMap;​\nimport java.util.Map;​\n​\nMap properties = new HashMap<>();​\nproperties.put(\"collection.ttl.seconds\", \"60\");​\n​\nAlterCollectionReq alterCollectionReq = AlterCollectionReq.builder()​\n .collectionName(\"my_collection\")​\n .properties(properties)​\n .build();​\n​\nclient.alterCollection(alterCollectionReq);​\n\n","res = await client.alterCollection({​\n collection_name: \"my_collection\",​\n properties: {​\n \"collection.ttl.seconds\": 60​\n }​\n})​\n\n","import (​\n \"context\"​\n \"fmt\"​\n \"log\"​\n​\n \"github.com/milvus-io/milvus/client/v2\"​\n \"github.com/milvus-io/milvus/pkg/common\"​\n)​\n​\n​\nctx, cancel := context.WithCancel(context.Background())​\ndefer cancel()​\n​\nmilvusAddr := \"127.0.0.1:19530\"​\ntoken := \"root:Milvus\"​\n​\ncli, err := client.New(ctx, &client.ClientConfig{​\n Address: milvusAddr,​\n APIKey: token,​\n})​\nif err != nil {​\n log.Fatal(\"failed to connect to milvus server: \", err.Error())​\n}​\n​\ndefer cli.Close(ctx)​\n​\nerr = cli.AlterCollection(ctx, client.NewAlterCollectionOption(\"my_collection\").WithProperty(common.CollectionTTLConfigKey, 60))​\nif err != nil {​\n // handle error​\n}​\n\n","# Currently not available for REST\n\n"],"headingContent":"Modify Collection​","anchorList":[{"label":"修改 Collections","href":"Modify-Collection​","type":1,"isActive":false},{"label":"重新命名 Collections","href":"Rename-Collection​","type":2,"isActive":false},{"label":"设置 Collections TTL","href":"Set-Collection-TTL​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.md b/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.md index 1faf4280e..db9c1e29e 100644 --- a/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.md +++ b/localization/v2.5.x/site/zh/userGuide/collections/modify-collection.md @@ -142,12 +142,16 @@ curl --request POST \​ d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z" > -

        如果某个 Collectionions 需要在特定时间内丢弃,可以考虑设置其生存时间(TTL),单位为秒。一旦 TTL 超时,Milvus 就会删除集合中的实体并丢弃集合。删除是异步的,这表明在删除完成之前,搜索和查询仍然可以进行。

        +

        如果某个 Collectionions 需要在特定时间内丢弃,可以考虑设置其生存时间(TTL),单位为秒。一旦 TTL 超时,Milvus 就会删除 Collection 中的实体。删除是异步的,这表明在删除完成之前,搜索和查询仍然可以进行。

        下面的代码片段演示了如何更改 Collections 的 TTL。

        -
        # Currently not available for Python
        +
        from pymilvus import MilvusClient
         
        +client.alter_collection_properties(
        +  collection_name="collection_name",
        +  properties = {"collection.ttl.seconds": 500}
        +)
         
        import io.milvus.v2.service.collection.request.AlterCollectionReq;​
         import java.util.HashMap;​
        diff --git a/localization/v2.5.x/site/zh/userGuide/schema/string.md b/localization/v2.5.x/site/zh/userGuide/schema/string.md
        index 8c40191bb..345c9584e 100644
        --- a/localization/v2.5.x/site/zh/userGuide/schema/string.md
        +++ b/localization/v2.5.x/site/zh/userGuide/schema/string.md
        @@ -3,7 +3,7 @@ id: string.md
         title: 字符串字段
         summary: >-
           在 Milvus 中,VARCHAR 是用于存储字符串类型数据的数据类型,适合存储长度可变的字符串。它可以存储具有单字节和多字节字符的字符串,最大长度可达
        -  60,535 个字符。定义 VARCHAR 字段时,还必须指定最大长度参数 max_length。VARCHAR
        +  65,535 个字符。定义 VARCHAR 字段时,还必须指定最大长度参数 max_length。VARCHAR
           字符串类型为存储和管理文本数据提供了一种高效灵活的方式,非常适合处理不同长度字符串的应用程序。
         ---
         

        字符串字段

        在 Milvus 中,VARCHAR 是用于存储字符串类型数据的数据类型,适合存储长度可变的字符串。它可以存储具有单字节和多字节字符的字符串,最大长度可达 60,535 个字符。定义VARCHAR 字段时,还必须指定最大长度参数max_lengthVARCHAR 字符串类型为存储和管理文本数据提供了一种高效灵活的方式,非常适合处理不同长度字符串的应用程序。

        +

        在 Milvus 中,VARCHAR 是用于存储字符串类型数据的数据类型,适合存储长度可变的字符串。它可以存储具有单字节和多字节字符的字符串,最大长度可达 65,535 个字符。定义VARCHAR 字段时,还必须指定最大长度参数max_lengthVARCHAR 字符串类型为存储和管理文本数据提供了一种高效灵活的方式,非常适合处理不同长度字符串的应用程序。

        添加 VARCHAR 字段

        Milvus 提供强大的操作符来查询数组字段,允许您根据数组内容过滤和检索实体。

        +
        +

        数组中的所有元素必须是同一类型,数组中的嵌套结构将被视为纯字符串。因此,在使用 ARRAY 字段时,建议避免过深的嵌套,并确保数据结构尽可能扁平,以获得最佳性能。

        +
        +

        可用的 ARRAY 操作符

        ARRAY 操作符允许在 Milvus 中对数组字段进行精细查询。这些操作符包括

        + +

        ARRAY_CONTAINS

        ARRAY_CONTAINS 操作符用于检查数组字段中是否存在特定元素。当您想查找数组中存在给定元素的实体时,它非常有用。

        +

        示例

        +

        假设有一个数组字段history_temperatures ,其中包含不同年份的最低气温记录。要查找数组中包含值23 的所有实体,可以使用以下过滤表达式。

        +
        filter = 'ARRAY_CONTAINS(history_temperatures, 23)'​
        +
        +
        +

        这将返回history_temperatures 数组包含23 值的所有实体。

        +

        array_contains_all

        ARRAY_CONTAINS_ALL 操作符可确保指定列表中的所有元素都出现在数组字段中。当您要匹配数组中包含多个值的实体时,此操作符非常有用。

        +

        示例

        +

        如果要查找history_temperatures 数组同时包含2324 的所有实体,可以使用 。

        +
        filter = 'ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])'​
        +
        +
        +

        这将返回history_temperatures 数组同时包含指定值的所有实体。

        +

        array_contains_any

        ARRAY_CONTAINS_ANY 操作符会检查数组字段中是否存在指定列表中的任何元素。当您想匹配数组中至少包含一个指定值的实体时,此操作非常有用。

        +

        示例

        +

        要查找history_temperatures 数组包含2324 的所有实体,可以使用 。

        +
        filter = 'ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])'​
        +
        +
        +

        这将返回history_temperatures 数组包含2324 中至少一个值的所有实体。

        +

        ARRAY_LENGTH

        ARRAY_LENGTH 操作符允许您根据数组字段中元素的数量过滤实体。这在需要查找具有一定长度数组的实体时非常有用。

        +

        示例

        +

        如果要查找history_temperatures 数组中元素少于 10 个的所有实体,可以使用。

        +
        filter = 'ARRAY_LENGTH(history_temperatures) < 10'​
        +
        +
        +

        这将返回history_temperatures 数组中元素少于 10 个的所有实体。

        diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.json b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.json new file mode 100644 index 000000000..c78fa9d10 --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.json @@ -0,0 +1 @@ +{"codeList":["filter = 'status == \"active\"'​\n\n","filter = 'status != \"inactive\"'​\n\n","filter = 'age > 30'​\n\n","filter = 'price < 100'​\n\n","filter = 'rating >= 4'​\n\n","filter = 'discount <= 10'​\n\n","filter = 'color in [\"red\", \"green\", \"blue\"]'​\n\n","filter = 'name LIKE \"Prod%\"'​\n\n","filter = 'name LIKE \"%XYZ\"'​\n\n","filter = 'name LIKE \"%Pro%\"'​\n\n","filter = 'total == base_price + tax'​\n\n","filter = 'quantity - quantity_sold > 50'​\n\n","filter = 'price * quantity > 1000'​\n\n","filter = 'total_price / quantity < 50'​\n\n","filter = 'id % 2 == 0'​\n\n","filter = 'price ** 2 > 1000'​\n\n","filter = 'price > 100 AND stock > 50'​\n\n","filter = 'color == \"red\" OR color == \"blue\"'​\n\n","filter = 'NOT color == \"green\"'​\n\n","filter = 'product[\"price\"] > 1000'​\n\n","filter = 'history_temperatures[0] > 30'​\n\n"],"headingContent":"Basic Operators​","anchorList":[{"label":"基本操作符","href":"Basic-Operators​","type":1,"isActive":false},{"label":"比较操作符","href":"Comparison-operators​","type":2,"isActive":false},{"label":"范围操作符","href":"Range-operators​","type":2,"isActive":false},{"label":"算术操作符","href":"Arithmetic-Operators​","type":2,"isActive":false},{"label":"逻辑操作符","href":"Logical-Operators​","type":2,"isActive":false},{"label":"在 JSON 和 ARRAY 字段中使用基本操作符的提示","href":"Tips-on-Using-Basic-Operators-with-JSON-and-ARRAY-Fields​","type":2,"isActive":false},{"label":"结论","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.md b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.md new file mode 100644 index 000000000..54163c5c9 --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/basic-operators.md @@ -0,0 +1,233 @@ +--- +id: basic-operators.md +summary: >- + Milvus + 提供丰富的基本操作符,帮助您高效地过滤和查询数据。这些操作符允许您根据标量字段、数字计算、逻辑条件等来完善搜索条件。了解如何使用这些操作符对于建立精确查询和最大限度地提高搜索效率至关重要。 +title: 基本操作符 +--- +

        基本操作符

        Milvus 提供丰富的基本操作符,帮助您高效地过滤和查询数据。这些操作符允许您根据标量字段、数字计算、逻辑条件等来完善搜索条件。了解如何使用这些操作符对于建立精确查询和最大限度地提高搜索效率至关重要。

        +

        比较操作符

        比较操作符用于根据相等、不等或大小过滤数据。它们适用于数字、文本和日期字段。

        +

        支持的比较操作符。

          +
        • == 等于

        • +
        • != (不等于

        • +
        • > 大于

        • +
        • < 小于

        • +
        • >= (大于或等于

        • +
        • <= (小于或等于

        • +
        +

        例 1:使用 "等于 "进行筛选 (==)

        假设有一个名为status 的字段,您想查找status 为 "活动 "的所有实体。您可以使用相等操作符==

        +
        filter = 'status == "active"'​
        +
        +
        +

        例 2:使用不等于 (!=) 过滤

        查找status 不是 "非活动 "的实体。

        +
        filter = 'status != "inactive"'​
        +
        +
        +

        例 3:使用大于 (>) 进行筛选

        如果要查找age 大于 30 的所有实体。

        +
        filter = 'age > 30'​
        +
        +
        +

        例 4:使用小于 (<) 过滤

        要查找price 小于 100 的实体。

        +
        filter = 'price < 100'​
        +
        +
        +

        例 5:使用大于或等于 (>=) 过滤

        如果要查找rating 大于或等于 4 的所有实体。

        +
        filter = 'rating >= 4'​
        +
        +
        +

        例 6:使用小于或等于 (<=) 过滤

        要查找discount 小于或等于 10% 的实体。

        +
        filter = 'discount <= 10'​
        +
        +
        +

        范围操作符

        范围操作符有助于根据特定的值集或范围过滤数据。

        +

        支持的范围操作符。

          +
        • IN:用于匹配特定集合或范围内的值。

        • +
        • LIKE:用于匹配模式(主要用于文本字段)。

        • +
        +

        例 1:使用IN 匹配多个值

        如果要查找color 为 "红色"、"绿色 "或 "蓝色 "的所有实体。

        +
        filter = 'color in ["red", "green", "blue"]'​
        +
        +
        +

        当您要检查值列表中的成员资格时,这很有用。

        +

        例 2:使用LIKE 进行模式匹配

        LIKE 操作符用于字符串字段中的模式匹配。它可以匹配文本中不同位置的子串:前缀后缀后缀LIKE 操作符使用% 符号作为通配符,可以匹配任意数量的字符(包括 0)。

        +

        前缀匹配(从开始

        要执行前缀匹配,即字符串以给定的模式开始,可以将模式放在开头,然后使用% 匹配其后的任何字符。例如,要查找name 以 "Prod "开头的所有产品。

        +
        filter = 'name LIKE "Prod%"'​
        +
        +
        +

        这将匹配名称以 "Prod "开头的任何产品,如 "Product A"、"Product B "等。

        +

        后缀匹配(以 "结束 "结尾

        后缀匹配中,如果字符串以给定的模式结尾,则将% 符号放在模式的开头。例如,查找name 以 "XYZ "结尾的所有产品。

        +
        filter = 'name LIKE "%XYZ"'​
        +
        +
        +

        这将匹配名称以 "XYZ "结尾的任何产品,如 "ProductXYZ"、"SampleXYZ "等。

        +

        后缀匹配(包含

        要执行词缀匹配,即模式可以出现在字符串的任何位置,可以在模式的开头和结尾处都加上% 符号。例如,要查找name 中包含 "Pro "一词的所有产品。

        +
        filter = 'name LIKE "%Pro%"'​
        +
        +
        +

        这将匹配名称包含子串 "Pro "的任何产品,如 "Product"、"ProLine "或 "SuperPro"。

        +

        算术操作符

        算术操作符允许您根据涉及数字字段的计算创建条件。

        +

        支持的算术操作符。

          +
        • + 加法

        • +
        • - 减法

        • +
        • * 乘法

        • +
        • / 除法

        • +
        • % 模乘

        • +
        • **

        • +
        +

        例 1:使用加法 (+)

        查找total 价格是base_pricetax 之和的实体。

        +
        filter = 'total == base_price + tax'​
        +
        +
        +

        例 2:使用减法 (-)

        查找quantity 大于 50 且quantity_sold 小于 30 的实体。

        +
        filter = 'quantity - quantity_sold > 50'​
        +
        +
        +

        例 3:使用乘法 (*)

        查找price 大于 100 和quantity 大于 10 的实体相乘。

        +
        filter = 'price * quantity > 1000'​
        +
        +
        +

        例 4:使用除法 (/)

        查找total_price 除以quantity 小于 50 的乘积。

        +
        filter = 'total_price / quantity < 50'​
        +
        +
        +

        例 5:使用模数 (%)

        查找id 是偶数(即能被 2 整除)的实体。

        +
        filter = 'id % 2 == 0'​
        +
        +
        +

        例 6:使用幂 (**)

        查找price 升为 2 的幂大于 1000 的实体。

        +
        filter = 'price ** 2 > 1000'​
        +
        +
        +

        逻辑操作符

        逻辑操作符用于将多个条件组合成更复杂的过滤表达式。这些运算符包括AND,OR, 和NOT

        +

        支持的逻辑操作符。

          +
        • AND:组合必须全部为真的多个条件。

        • +
        • OR:组合至少一个必须为真的条件。

        • +
        • NOT:否定一个条件。

        • +
        +

        例 1:使用AND 合并条件

        查找price 大于 100 且stock 大于 50 的所有产品。

        +
        filter = 'price > 100 AND stock > 50'​
        +
        +
        +

        例 2:使用OR 合并条件

        查找color 为 "红色 "或 "蓝色 "的所有产品。

        +
        filter = 'color == "red" OR color == "blue"'​
        +
        +
        +

        例 3:使用NOT 排除条件

        查找color 不是 "绿色 "的所有产品。

        +
        filter = 'NOT color == "green"'​
        +
        +
        +

        在 JSON 和 ARRAY 字段中使用基本操作符的提示

        虽然 Milvus 的基本操作符用途广泛,可以应用于标量字段,但它们也可以有效地与 JSON 和 ARRAY 字段中的键和索引一起使用。

        +

        例如,如果product 字段包含多个键,如pricemodeltags ,则始终直接引用键。

        +
        filter = 'product["price"] > 1000'​
        +
        +
        +

        要查找记录温度的数组中第一个温度超过特定值的记录,请使用。

        +
        filter = 'history_temperatures[0] > 30'​
        +
        +
        +

        结论

        Milvus 提供了一系列基本操作符,让您可以灵活地过滤和查询数据。通过结合比较、范围、算术和逻辑操作符,您可以创建功能强大的过滤表达式,从而缩小搜索结果的范围,并高效检索所需的数据。

        diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.json b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.json new file mode 100644 index 000000000..3cbeb78c6 --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.json @@ -0,0 +1 @@ +{"codeList":["filter='color in [\"red\", \"green\", \"blue\"]'​\n\n","filter='product[\"model\"] == \"JSN-087\" AND product[\"price\"] < 1850'​\n\n","filter='history_temperatures[10] > 23'​\n\n","filter = \"age > 25 AND city IN ['北京', '上海']\"​\n\n","filter = \"age > {age} AND city in {city}\",​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter='json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter='json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n","filter=\"ARRAY_CONTAINS(history_temperatures, 23)\"​\n\n","filter=\"ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])\"​\n\n","filter=\"ARRAY_LENGTH(history_temperatures) < 10\"​\n\n"],"headingContent":"Filtering Explained​","anchorList":[{"label":"过滤说明","href":"Filtering-Explained​","type":1,"isActive":false},{"label":"基本操作符","href":"Basic-operators​","type":2,"isActive":false},{"label":"过滤表达式模板","href":"Filter-expression-templates​","type":2,"isActive":false},{"label":"特定数据类型操作符","href":"Data-type-specific-operators​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.md b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.md new file mode 100644 index 000000000..978b68966 --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/boolean.md @@ -0,0 +1,143 @@ +--- +id: boolean.md +summary: >- + Milvus 提供强大的过滤功能,可对数据进行精确查询。过滤表达式允许你针对特定的标量字段,用不同的条件细化搜索结果。本指南介绍如何在 Milvus + 中使用过滤表达式,并以查询操作符为例进行说明。您还可以在搜索和删除请求中应用这些过滤器。 +title: 过滤说明 +--- +

        过滤说明

        Milvus 提供强大的过滤功能,可精确查询数据。过滤表达式允许你针对特定的标量字段,用不同的条件细化搜索结果。本指南介绍如何在 Milvus 中使用过滤表达式,并以查询操作符为例。您还可以在搜索和删除请求中应用这些过滤器。

        +

        基本操作符

        Milvus 支持几种用于过滤数据的基本操作符。

        +
          +
        • 比较操作符==,!=,>,<,>=, 和<= 允许基于数字、文本或日期字段进行筛选。

        • +
        • 范围过滤器INLIKE 可帮助匹配特定的值范围或集合。

        • +
        • 算术操作符+,-,*,/,%, 和** 用于涉及数字字段的计算。

        • +
        • 逻辑操作符AND,OR, 和NOT 将多个条件组合成复杂的表达式。

        • +
        +

        举例说明:按颜色筛选

        要在标量字段color 中查找具有三原色(红色、绿色或蓝色)的实体,请使用以下过滤表达式。

        +
        filter='color in ["red", "green", "blue"]'​
        +
        +
        +

        示例过滤 JSON 字段

        Milvus 允许在 JSON 字段中引用键。例如,如果您有一个带有键pricemodel 的 JSON 字段product ,并想查找具有特定模型且价格低于 1,850 的产品,请使用此过滤表达式。

        +
        filter='product["model"] == "JSN-087" AND product["price"] < 1850'​
        +
        +
        +

        示例:过滤数组字段

        如果您有一个包含温度记录的数组字段history_temperatures ,并希望找到第 10 个记录的温度超过 23°C 的观测站,请使用此表达式。

        +
        filter='history_temperatures[10] > 23'​
        +
        +
        +

        有关这些基本操作符的更多信息,请参阅基本操作符

        +

        过滤表达式模板

        使用中日韩字符进行筛选时,由于字符集较大且编码不同,处理过程可能会更加复杂。这会导致性能变慢,尤其是使用IN 操作符时。

        +

        Milvus 引入了过滤表达式模板,以优化处理中日韩字符时的性能。通过将动态值从过滤器表达式中分离出来,查询引擎能更有效地处理参数插入。

        +

        示例

        要查找居住在 "北京"(北京)或 "上海"(上海)的 25 岁以上的个人,请使用以下模板表达式。

        +
        filter = "age > 25 AND city IN ['北京', '上海']"​
        +
        +
        +

        为提高性能,可使用这种带参数的变体。

        +
        filter = "age > {age} AND city in {city}",​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        这种方法可减少解析开销,提高查询速度。更多信息,请参阅过滤器模板

        +

        特定数据类型操作符

        Milvus 为特定数据类型(如 JSON、ARRAY 和 VARCHAR 字段)提供高级过滤操作符。

        +

        特定于 JSON 字段的操作符

        Milvus 为查询 JSON 字段提供高级操作符,可在复杂的 JSON 结构中进行精确过滤。

        +

        **JSON_CONTAINS(identifier, jsonExpr)**:检查字段中是否存在 JSON 表达式。

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains(tags, "sale")'​
        +
        +
        +

        **JSON_CONTAINS_ALL(identifier, jsonExpr)**:确保 JSON 表达式的所有元素都存在。

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter='json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        **JSON_CONTAINS_ANY(identifier, jsonExpr)**:筛选 JSON 表达式中至少存在一个元素的实体。

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter='json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        有关 JSON 操作符的更多详情,请参阅JSON 操作符

        +

        ARRAY 字段特定操作符

        Milvus 为数组字段提供了高级过滤操作符,如ARRAY_CONTAINS,ARRAY_CONTAINS_ALL,ARRAY_CONTAINS_ANY, 和ARRAY_LENGTH ,可对数组数据进行细粒度控制。

        +

        **ARRAY_CONTAINS**:过滤包含特定元素的实体。

        +
        filter="ARRAY_CONTAINS(history_temperatures, 23)"​
        +
        +
        +

        **ARRAY_CONTAINS_ALL**:过滤包含列表中所有元素的实体。

        +
        filter="ARRAY_CONTAINS_ALL(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_CONTAINS_ANY**:过滤包含列表中任何元素的实体。

        +
        filter="ARRAY_CONTAINS_ANY(history_temperatures, [23, 24])"​
        +
        +
        +

        **ARRAY_LENGTH**:根据数组长度进行筛选。

        +
        filter="ARRAY_LENGTH(history_temperatures) < 10"​
        +
        +
        +

        有关数组操作符的更多详情,请参阅ARRAY Operators

        +

        VARCHAR 字段特定操作符

        **Text_Match** 操作符允许根据特定查询词精确检索文档。它对于结合标量过滤器和向量相似性搜索的过滤搜索特别有用。与语义搜索不同,文本匹配侧重于精确的术语出现。

        +

        Milvus 使用 Tantivy 支持倒排索引和基于术语的文本搜索。过程包括

        +
          +
        1. 分析器:标记化和处理输入文本。

        2. +
        3. 索引:创建将唯一标记映射到文档的倒排索引。

        4. +
        +

        更多详情,请参阅文本匹配

        diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.json b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.json new file mode 100644 index 000000000..7a3a91f70 --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.json @@ -0,0 +1 @@ +{"codeList":["filter = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.search(​\n \"hello_milvus\",​\n vectors[:nq],​\n filter=expr,​\n limit=10,​\n output_fields=[\"age\", \"city\"],​\n search_params={\"metric_type\": \"COSINE\", \"params\": {\"search_list\": 100}},​\n filter_params=filter_params,​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.query(​\n \"hello_milvus\",​\n filter=expr,​\n output_fields=[\"age\", \"city\"],​\n filter_params=filter_params​\n)​\n\n","expr = \"age > {age} AND city IN {city}\"​\nfilter_params = {\"age\": 25, \"city\": [\"北京\", \"上海\"]}​\nres = client.delete(​\n \"hello_milvus\",​\n filter=expr,​\n filter_params=filter_params​\n)​\n\n"],"headingContent":"Filter Templating​","anchorList":[{"label":"过滤器模板","href":"Filter-Templating​","type":1,"isActive":false},{"label":"概述","href":"Overview​","type":2,"isActive":false},{"label":"搜索操作符","href":"Search-Operations​","type":2,"isActive":false},{"label":"查询操作符","href":"Query-Operations​","type":2,"isActive":false},{"label":"删除操作符","href":"Delete-Operations​","type":2,"isActive":false},{"label":"结论","href":"Conclusion​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.md b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.md new file mode 100644 index 000000000..fa04b6e6a --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/filtering-templating.md @@ -0,0 +1,150 @@ +--- +id: filtering-templating.md +summary: >- + 在 Milvus 中,元素众多的复杂过滤表达式,尤其是涉及中日韩字符等非 ASCII 字符的过滤表达式,会严重影响查询性能。为了解决这个问题,Milvus + 引入了过滤表达式模板机制,旨在通过减少解析复杂表达式所花费的时间来提高效率。本页介绍了在搜索、查询和删除操作中使用过滤表达式模板的方法。 +title: 过滤模板 +--- +

        过滤器模板

        在 Milvus 中,包含大量元素的复杂过滤表达式,尤其是那些涉及非 ASCII 字符(如中日韩字符)的表达式,会严重影响查询性能。为了解决这个问题,Milvus 引入了过滤表达式模板机制,旨在通过减少解析复杂表达式所花费的时间来提高效率。本页介绍了在搜索、查询和删除操作中使用过滤表达式模板的方法。

        +

        概述

        过滤表达式模板化允许你创建带有占位符的过滤表达式,这些占位符可以在查询执行过程中动态替换为值。使用模板,可以避免直接在过滤器中嵌入大型数组或复杂表达式,从而减少解析时间并提高查询性能。

        +

        假设有一个涉及两个字段agecity 的过滤器表达式,要查找所有年龄大于 25 岁且居住在 "北京"(北京)或 "上海"(上海)的人。您可以使用模板来代替直接在筛选表达式中嵌入值。

        +
        filter = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +
        +
        +

        在这里,{age}{city} 是占位符,在执行查询时将被替换为filter_params 中的实际值。

        +

        在 Milvus 中使用过滤表达式模板有几个主要优点。

        +
          +
        • 减少解析时间:通过用占位符替换大型或复杂的过滤器表达式,系统可以减少解析和处理过滤器的时间。

        • +
        • 提高查询性能:解析开销减少后,查询性能就会提高,从而获得更高的 QPS 和更快的响应时间。

        • +
        • 可扩展性:随着数据集的增长和过滤器表达式的复杂化,模板化可确保性能保持高效和可扩展。

        • +
        +

        搜索操作符

        对于 Milvus 中的搜索操作,filter 表达式用于定义过滤条件,filter_params 参数用于指定占位符的值。filter_params 字典包含 Milvus 将用于代入过滤表达式的动态值。

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.search(​
        +    "hello_milvus",​
        +    vectors[:nq],​
        +    filter=expr,​
        +    limit=10,​
        +    output_fields=["age", "city"],​
        +    search_params={"metric_type": "COSINE", "params": {"search_list": 100}},​
        +    filter_params=filter_params,​
        +)​
        +
        +
        +

        在本例中,Milvus 将在执行搜索时用25 动态替换{age} ,用["北京", "上海"] 动态替换{city}

        +

        查询操作符

        同样的模板机制也可应用于 Milvus 的查询操作符。在query 函数中,您可以定义过滤表达式,并使用filter_params 指定要替换的值。

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.query(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    output_fields=["age", "city"],​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        通过使用filter_params ,Milvus 可以有效处理值的动态插入,提高查询执行速度。

        +

        删除操作符

        在删除操作中也可以使用过滤表达式模板。与搜索和查询类似,filter 表达式定义条件,filter_params 为占位符提供动态值。

        +
        expr = "age > {age} AND city IN {city}"​
        +filter_params = {"age": 25, "city": ["北京", "上海"]}​
        +res = client.delete(​
        +    "hello_milvus",​
        +    filter=expr,​
        +    filter_params=filter_params​
        +)​
        +
        +
        +

        这种方法可以提高删除操作的性能,尤其是在处理复杂的过滤条件时。

        +

        结论

        过滤器表达式模板化是优化 Milvus 查询性能的重要工具。通过使用占位符和filter_params 字典,可以大大减少解析复杂过滤器表达式所花费的时间。这将加快查询执行速度,提高整体性能。

        diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.json b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.json new file mode 100644 index 000000000..e2bd6f00c --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.json @@ -0,0 +1 @@ +{"codeList":["# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains(tags, \"sale\")'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\", \"discount\"]}​\nfilter = 'json_contains_all(tags, [\"electronics\", \"sale\", \"new\"])'​\n\n","# JSON data: {\"tags\": [\"electronics\", \"sale\", \"new\"]}​\nfilter = 'json_contains_any(tags, [\"electronics\", \"new\", \"clearance\"])'​\n\n"],"headingContent":"JSON Operators​","anchorList":[{"label":"JSON 操作符","href":"JSON-Operators​","type":1,"isActive":false},{"label":"可用的 JSON 操作符","href":"Available-JSON-Operators​","type":2,"isActive":false},{"label":"JSON_CONTAINS","href":"JSONCONTAINS​","type":2,"isActive":false},{"label":"json_contains_all","href":"JSONCONTAINSALL​","type":2,"isActive":false},{"label":"json_cotains_any","href":"JSONCOTAINSANY​","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.md b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.md new file mode 100644 index 000000000..f09d40023 --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/search-query-get/boolean/json-operators.md @@ -0,0 +1,117 @@ +--- +id: json-operators.md +summary: >- + Milvus 支持用于查询和过滤 JSON 字段的高级操作符,使其成为管理复杂结构化数据的完美工具。这些操作符可实现对 JSON 文档的高效查询,允许您根据 + JSON 字段中的特定元素、值或条件检索实体。本节将指导您在 Milvus 中使用特定于 JSON 的操作符,并提供实际示例来说明其功能。 +title: JSON 操作符 +--- +

        JSON 操作符

        Milvus 支持用于查询和过滤 JSON 字段的高级操作符,使其成为管理复杂结构化数据的完美工具。这些操作符可实现对 JSON 文档的高效查询,允许您根据 JSON 字段中的特定元素、值或条件检索实体。本节将指导你在 Milvus 中使用特定于 JSON 的操作符,并提供实际示例来说明它们的功能。

        +
        +

        JSON 字段无法处理复杂的嵌套结构,而是将所有嵌套结构视为纯字符串。因此,在使用 JSON 字段时,建议避免过深的嵌套,并确保数据结构尽可能扁平,以获得最佳性能。

        +
        +

        可用的 JSON 操作符

        Milvus 提供了几个强大的 JSON 操作符,帮助过滤和查询 JSON 数据,这些操作符是

        + +

        让我们通过示例来了解这些操作符在实际场景中的应用。

        +

        JSON_CONTAINS

        json_contains 操作符检查 JSON 字段中是否存在特定元素或子阵。当你想确保一个 JSON 数组或对象包含一个特定值时,它就非常有用了。

        +

        示例

        +

        假设您有一个产品 Collections,每个 Collections 都有一个tags 字段,其中包含一个由字符串组成的 JSON 数组,如["electronics", "sale", "new"] 。您想过滤带有"sale" 标记的产品。

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains(tags, "sale")'​
        +
        +
        +

        在此示例中,Milvus 将返回tags 字段包含"sale" 元素的所有产品。

        +

        json_contains_all

        json_contains_all 操作符可确保目标字段中包含指定 JSON 表达式的所有元素。当需要匹配 JSON 数组中的多个值时,该操作符尤其有用。

        +

        示例

        +

        继续使用产品标记方案,如果要查找具有"electronics""sale""new" 标记的所有产品,可以使用json_contains_all 操作符。

        +
        # JSON data: {"tags": ["electronics", "sale", "new", "discount"]}​
        +filter = 'json_contains_all(tags, ["electronics", "sale", "new"])'​
        +
        +
        +

        此查询将返回tags 数组包含所有三个指定元素的所有产品:"electronics","sale", 和"new"

        +

        json_cotains_any

        json_contains_any 操作符可过滤字段中至少存在一个 JSON 表达式成员的实体。当您想根据多个可能值中的任意一个值来匹配实体时,该操作符非常有用。

        +

        示例

        +

        假设您想过滤至少有一个标签"electronics","sale", 或"new" 的产品。您可以使用json_contains_any 操作符来实现这一目的。

        +
        # JSON data: {"tags": ["electronics", "sale", "new"]}​
        +filter = 'json_contains_any(tags, ["electronics", "new", "clearance"])'​
        +
        +
        +

        在这种情况下,Milvus 将返回列表["electronics", "new", "clearance"] 中至少有一个标签的所有产品。即使产品只有其中一个标签,也会包含在结果中。

        diff --git a/localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.json b/localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.json new file mode 100644 index 000000000..94108116d --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.json @@ -0,0 +1 @@ +{"codeList":[],"headingContent":"Milvus WebUI","anchorList":[{"label":"Milvus WebUI","href":"Milvus-WebUI","type":1,"isActive":false},{"label":"概述","href":"Overview","type":2,"isActive":false},{"label":"主页","href":"Home","type":2,"isActive":false},{"label":"Collections","href":"Collections","type":2,"isActive":false},{"label":"查询","href":"Query","type":2,"isActive":false},{"label":"数据","href":"Data","type":2,"isActive":false},{"label":"任务","href":"Tasks","type":2,"isActive":false},{"label":"慢请求","href":"Slow-requests","type":2,"isActive":false},{"label":"配置","href":"Configurations","type":2,"isActive":false},{"label":"工具","href":"Tools","type":2,"isActive":false}]} \ No newline at end of file diff --git a/localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.md b/localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.md new file mode 100644 index 000000000..9bbb53b0e --- /dev/null +++ b/localization/v2.5.x/site/zh/userGuide/tools/milvus-webui.md @@ -0,0 +1,277 @@ +--- +id: milvus-webui.md +summary: Milvus Web UI 是 Milvus 的图形化管理工具。它以简单直观的界面提高了系统的可观察性。你可以 +title: Milvus WebUI +--- +

        Milvus WebUI

        Milvus Web UI 是 Milvus 的图形化管理工具。它以简单直观的界面增强了系统的可观察性。您可以使用 Milvus Web UI 观察 Milvus 组件和依赖关系的统计和指标,检查数据库和 Collections 的详细信息,并列出详细的 Milvus 配置。

        +

        概述

        Milvus Web UI 与 Birdwatcher 和 Attu 不同,它是一个内置工具,以简单直观的界面提供整体系统可观察性。

        +

        下表比较了 Milvus Web UI 和 Birdwatcher/Attu 的功能:

        + + + + + + + + + + + +
        功能Milvus 网络用户界面BirdwatcherAttu
        操作符图形用户界面CLI图形用户界面
        目标用户维护人员、开发人员维护人员开发人员
        安装内置独立工具独立工具
        依赖关系MilvusMilvus / etcdMilvus
        主要功能运行环境、数据库/ Collections 详情、段、通道、任务和慢查询请求元数据检查和 Milvus API 执行数据库管理和操作任务
        +

        Milvus Web UI 提供以下功能:

        +

        + + Milvus Web UI overview + Milvus Web UI 概述

        +
          +
        • 主页

          +

          你可以找到关于当前运行的 Milvus 实例、其组件、连接的客户端和依赖关系的信息。

        • +
        • Collections

          +

          可查看 Milvus 当前的数据库和 Collections 列表,并检查其详细信息。

        • +
        • 查询

          +

          您可以查看收集到的查询节点和查询协调器在网段、通道、副本和资源组方面的统计数据。

        • +
        • 数据

          +

          您可以查看收集到的数据节点在网段和通道方面的统计数据。

        • +
        • 任务

          +

          可以查看 Milvus 中运行的任务列表,包括 Querycoord 调度器任务、压缩任务、索引构建任务、导入任务和数据同步任务。

        • +
        • 慢速请求

          +

          可以查看 Milvus 中的慢请求列表,包括请求类型、请求持续时间和请求参数。

        • +
        • 配置

          +

          可以查看 Milvus 配置及其值的列表。

        • +
        • 工具

          +

          可从 Web UI 访问两个内置工具,即 pprof 和 Milvus 数据可视化工具。

        • +
        +

        主页

        在主页上,您可以找到以下信息:

        +

        + + Milvus Web UI Home + Milvus Web UI 主页

        +
          +
        • 系统信息:查看系统信息,包括部署模式、部署中使用的映像和相关信息。

        • +
        • 组件信息:查看 Milvus 中组件的状态和指标,包括查询节点、数据节点、索引节点、协调器和代理的状态和指标。

        • +
        • 已连接客户端:查看已连接的客户端及其信息,包括 SDK 类型和版本、用户名及其访问历史记录。

        • +
        • 系统依赖关系:查看 Milvus 依赖项的状态和指标,包括元存储、消息队列和对象存储的状态和指标。

        • +
        +

        Collections

        在 "Collections "页面,您可以查看 Milvus 当前的数据库和 Collections 列表,并检查它们的详细信息。

        +

        + + Milvus Web UI Collections + Milvus Web UI 集合

        +
          +
        • 数据库:查看当前 Milvus 中的数据库列表及其详细信息。

        • +
        • Collections:查看每个数据库中的 Collection 列表及其详细信息。

        • +
        +

        查询

        + + Milvus Web UI Query Page + Milvus Web UI 查询页面

        +
          +
        • 分段:查看分段列表及其详细信息,包括分段 ID、对应的 Collections、状态、大小等。

          +

          在 "来自 "列中,您可以找到数据段的来源。可能的来源指标如下:

          +
            +
          • QN:查询节点

          • +
          • CT:查询节点中的当前目标

          • +
          • NT:QueryCoord 中的下一个目标

          • +
          • DIST:QueryCoord 中的分布

          • +
        • +
        • 通道:查看频道列表及其详细信息,包括频道名称、对应的 Collections 等。

          +

          在 "来自 "列中,您可以找到数据段的来源。可能的来源指标如下:

          +
            +
          • QN:查询节点

          • +
          • CT:QueryCoord 中的当前目标

          • +
          • NT:QueryCoord 中的下一个目标

          • +
          • DIST:查询记录中的分布

          • +
        • +
        • 副本:查看副本列表及其详细信息,包括副本 ID、对应的 Collections 等。

        • +
        • 资源组:查看资源组列表及其详细信息,包括资源组名称、组中查询节点的数量及其配置等。

        • +
        +

        数据

        + + Milvus Web UI Data Page + Milvus Web UI 数据页面

        +
          +
        • 分段:查看数据节点/协调器的分段列表及其详细信息,包括分段 ID、对应的 Collections、状态、大小等。

        • +
        • 通道:查看数据节点/协调器的通道列表及其详细信息,包括通道名称、相应的 Collections 等。

        • +
        +

        任务

        + + Milvus Web UI Tasks Page + Milvus Web UI 任务页面

        +
          +
        • 任务:查看在 Milvus 中运行的任务列表,包括任务类型、状态和操作。

          +
            +
          • QueryCoord 任务:查看所有 QueryCoord 调度器任务,包括过去 15 分钟内的平衡器、索引/区段/通道/领导者检查器。

          • +
          • 压缩任务:查看过去 15 分钟内来自数据协调器的所有压缩任务。

          • +
          • 索引建立任务:查看数据协调人员在过去 30 分钟内执行的所有索引建立任务。

          • +
          • 导入任务:查看过去 30 分钟内数据协调人员的所有导入任务。

          • +
          • 数据同步任务:查看过去 15 分钟内数据节点的所有数据同步任务。

          • +
        • +
        +

        慢请求

        + + Milvus Web UI Slow Requests Page + Milvus Web UI 慢请求页面

        +
          +
        • 慢请求:慢请求是指延迟时间超过配置中指定的proxy.slowQuerySpanInSeconds 值的搜索或查询。慢速请求列表显示最近 15 分钟内的所有慢速请求。
        • +
        +

        配置

        + + Milvus Web UI Configurations Page + Milvus Web UI 配置页面

        +
          +
        • 配置:查看 Milvus 运行时配置及其值的列表。
        • +
        +

        工具

          +
        • pprof:访问用于剖析和调试 Milvus 的 pprof 工具。

        • +
        • Milvus 数据可视化工具:访问 Milvus 数据可视化工具,以可视化 Milvus 中的数据。

        • +
        diff --git a/tools/cache.json b/tools/cache.json index d6cc7fbb1..1f760f49b 100644 --- a/tools/cache.json +++ b/tools/cache.json @@ -212,7 +212,7 @@ "v2.4.x/site/en/reference/array_data_type.md": "2024-12-04T08:00:16.529Z", "v2.4.x/site/en/userGuide/search-query-get/single-vector-search.md": "2024-12-04T08:01:10.984Z", "v2.4.x/site/en/userGuide/use-json-fields.md": "2024-12-09T08:39:18.854Z", - "v2.4.x/site/en/menuStructure/en.json": "2024-12-23T08:51:41.964Z", + "v2.4.x/site/en/menuStructure/en.json": "2024-12-23T13:01:34.164Z", "v2.4.x/site/en/userGuide/manage-collections.md": "2024-11-18T03:34:16.027Z", "v2.4.x/site/en/getstarted/milvus_lite.md": "2024-09-06T02:54:42.351Z", "v2.4.x/site/en/release_notes.md": "2024-12-23T08:35:12.721Z", @@ -230,7 +230,7 @@ "v2.4.x/site/en/integrations/build_rag_on_arm.md": "2024-10-15T03:26:00.948Z", "v2.4.x/site/en/integrations/rag_with_langflow.md": "2024-10-15T03:26:07.319Z", "v2.4.x/site/en/tutorials/contextual_retrieval_with_milvus.md": "2024-11-04T02:21:27.445Z", - "v2.4.x/site/en/adminGuide/config_jaeger_tracing.md": "2024-10-18T08:07:16.076Z", + "v2.4.x/site/en/adminGuide/config_jaeger_tracing.md": "2024-12-23T12:39:53.109Z", "v2.4.x/site/en/adminGuide/connect_kafka_ssl.md": "2024-12-06T07:03:46.321Z", "v2.4.x/site/en/integrations/build_RAG_with_milvus_and_fireworks.md": "2024-10-23T04:58:12.689Z", "v2.4.x/site/en/integrations/build_RAG_with_milvus_and_lepton.md": "2024-10-23T04:58:19.829Z", @@ -970,8 +970,8 @@ "v2.5.x/site/en/adminGuide/clouds/gcp/gcp_layer7.md": "2024-11-27T07:19:51.396Z", "v2.5.x/site/en/adminGuide/clouds/gcp/gcs.md": "2024-11-27T07:19:52.521Z", "v2.5.x/site/en/adminGuide/clouds/openshift/openshift.md": "2024-11-27T07:19:53.649Z", - "v2.5.x/site/en/adminGuide/config_jaeger_tracing.md": "2024-11-27T07:19:54.679Z", - "v2.5.x/site/en/adminGuide/configure-docker.md": "2024-11-27T07:19:55.872Z", + "v2.5.x/site/en/adminGuide/config_jaeger_tracing.md": "2024-12-23T12:34:27.562Z", + "v2.5.x/site/en/adminGuide/configure-docker.md": "2024-12-23T12:34:35.922Z", "v2.5.x/site/en/adminGuide/configure-helm.md": "2024-11-27T07:19:56.880Z", "v2.5.x/site/en/adminGuide/configure-querynode-localdisk.md": "2024-11-27T07:19:58.215Z", "v2.5.x/site/en/adminGuide/configure_access_logs.md": "2024-11-27T07:19:59.376Z", @@ -991,18 +991,18 @@ "v2.5.x/site/en/adminGuide/monitor/monitor_overview.md": "2024-11-27T07:20:18.633Z", "v2.5.x/site/en/adminGuide/monitor/visualize.md": "2024-12-23T08:31:33.647Z", "v2.5.x/site/en/adminGuide/object_storage_operator.md": "2024-11-27T07:20:21.093Z", - "v2.5.x/site/en/adminGuide/rbac.md": "2024-11-27T07:20:22.231Z", + "v2.5.x/site/en/adminGuide/rbac.md": "2024-12-23T12:35:29.912Z", "v2.5.x/site/en/adminGuide/resource_group.md": "2024-11-27T07:20:23.865Z", "v2.5.x/site/en/adminGuide/scale-dependencies.md": "2024-11-27T07:20:24.930Z", "v2.5.x/site/en/adminGuide/scaleout.md": "2024-11-27T07:20:26.060Z", "v2.5.x/site/en/adminGuide/tls.md": "2024-12-06T07:01:08.720Z", "v2.5.x/site/en/adminGuide/upgrade-pulsar-v3.md": "2024-12-12T07:25:53.073Z", - "v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md": "2024-11-27T07:20:30.496Z", - "v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md": "2024-11-27T07:20:31.959Z", - "v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.md": "2024-11-27T07:20:33.178Z", - "v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.md": "2024-11-27T07:20:34.196Z", - "v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.md": "2024-11-27T07:20:35.749Z", - "v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.md": "2024-11-27T07:20:36.902Z", + "v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-docker.md": "2024-12-23T12:35:37.909Z", + "v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-helm.md": "2024-12-23T12:35:51.368Z", + "v2.5.x/site/en/adminGuide/upgrade_milvus_cluster-operator.md": "2024-12-23T12:36:01.810Z", + "v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-docker.md": "2024-12-23T12:36:10.913Z", + "v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-helm.md": "2024-12-23T12:36:24.899Z", + "v2.5.x/site/en/adminGuide/upgrade_milvus_standalone-operator.md": "2024-12-23T12:36:36.316Z", "v2.5.x/site/en/embeddings/embed-with-bgm-m3.md": "2024-11-27T07:20:37.834Z", "v2.5.x/site/en/embeddings/embed-with-bm25.md": "2024-11-27T07:20:38.944Z", "v2.5.x/site/en/embeddings/embed-with-cohere.md": "2024-11-27T07:20:39.962Z", @@ -1027,11 +1027,11 @@ "v2.5.x/site/en/getstarted/install_SDKs/install-pymilvus.md": "2024-11-27T07:21:01.240Z", "v2.5.x/site/en/getstarted/milvus_lite.md": "2024-11-27T07:21:02.835Z", "v2.5.x/site/en/getstarted/quickstart.md": "2024-11-27T07:21:04.185Z", - "v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.md": "2024-12-06T07:01:13.541Z", + "v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker-compose.md": "2024-12-23T12:36:56.013Z", "v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-docker.md": "2024-12-04T07:57:36.065Z", "v2.5.x/site/en/getstarted/run-milvus-docker/prerequisite-docker.md": "2024-11-27T07:21:07.882Z", "v2.5.x/site/en/getstarted/run-milvus-gpu/install_cluster-helm-gpu.md": "2024-11-27T07:21:09.373Z", - "v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md": "2024-11-27T07:21:10.554Z", + "v2.5.x/site/en/getstarted/run-milvus-gpu/install_standalone-docker-compose-gpu.md": "2024-12-23T12:37:06.193Z", "v2.5.x/site/en/getstarted/run-milvus-gpu/prerequisite-gpu.md": "2024-11-27T07:21:11.779Z", "v2.5.x/site/en/getstarted/run-milvus-k8s/install_cluster-helm.md": "2024-11-28T09:46:34.193Z", "v2.5.x/site/en/getstarted/run-milvus-k8s/install_cluster-milvusoperator.md": "2024-11-27T07:21:14.619Z", @@ -1135,7 +1135,7 @@ "v2.5.x/site/en/reference/time_sync.md": "2024-11-27T07:23:30.616Z", "v2.5.x/site/en/reference/timestamp.md": "2024-11-27T07:23:31.970Z", "v2.5.x/site/en/reference/users_and_roles.md": "2024-11-27T07:23:33.399Z", - "v2.5.x/site/en/release_notes.md": "2024-12-04T07:58:16.435Z", + "v2.5.x/site/en/release_notes.md": "2024-12-23T12:37:19.347Z", "v2.5.x/site/en/rerankers/rerankers-bge.md": "2024-11-27T07:23:35.658Z", "v2.5.x/site/en/rerankers/rerankers-cohere.md": "2024-11-27T07:23:36.671Z", "v2.5.x/site/en/rerankers/rerankers-cross-encoder.md": "2024-11-27T07:23:37.640Z", @@ -1169,7 +1169,7 @@ "v2.5.x/site/en/userGuide/collections/manage-aliases.md": "2024-11-27T07:24:12.727Z", "v2.5.x/site/en/userGuide/collections/manage-collections.md": "2024-11-28T09:47:14.183Z", "v2.5.x/site/en/userGuide/collections/manage-partitions.md": "2024-11-27T07:24:15.489Z", - "v2.5.x/site/en/userGuide/collections/modify-collection.md": "2024-11-27T07:24:16.607Z", + "v2.5.x/site/en/userGuide/collections/modify-collection.md": "2024-12-23T12:37:27.068Z", "v2.5.x/site/en/userGuide/collections/view-collections.md": "2024-11-27T07:24:17.532Z", "v2.5.x/site/en/userGuide/data-import/import-data.md": "2024-11-27T07:24:18.744Z", "v2.5.x/site/en/userGuide/data-import/prepare-source-data.md": "2024-11-27T07:24:20.511Z", @@ -1207,7 +1207,7 @@ "v2.5.x/site/en/userGuide/schema/schema-hands-on.md": "2024-11-27T07:25:02.048Z", "v2.5.x/site/en/userGuide/schema/schema.md": "2024-11-27T07:25:03.727Z", "v2.5.x/site/en/userGuide/schema/sparse_vector.md": "2024-11-28T09:47:52.969Z", - "v2.5.x/site/en/userGuide/schema/string.md": "2024-11-27T07:25:06.902Z", + "v2.5.x/site/en/userGuide/schema/string.md": "2024-12-23T12:37:43.267Z", "v2.5.x/site/en/userGuide/schema/use-json-fields.md": "2024-11-27T07:25:08.435Z", "v2.5.x/site/en/userGuide/search-query-get/boolean.md": "2024-12-06T07:02:49.486Z", "v2.5.x/site/en/userGuide/search-query-get/clustering-compaction.md": "2024-11-27T07:25:11.309Z", @@ -1238,13 +1238,24 @@ "v2.5.x/site/en/userGuide/tools/milvus_backup_api.md": "2024-11-27T07:25:46.624Z", "v2.5.x/site/en/userGuide/tools/milvus_backup_cli.md": "2024-11-27T07:25:47.846Z", "v2.5.x/site/en/userGuide/tools/milvus_backup_overview.md": "2024-11-27T07:25:49.181Z", - "v2.5.x/site/en/menuStructure/en.json": "2024-12-23T08:43:45.428Z", + "v2.5.x/site/en/menuStructure/en.json": "2024-12-23T12:52:41.573Z", "v2.5.x/site/en/getstarted/run-milvus-docker/install_standalone-windows.md": "2024-12-06T07:01:20.487Z", "v2.5.x/site/en/integrations/build_RAG_with_milvus_and_cognee.md": "2024-12-06T07:01:27.204Z", "v2.5.x/site/en/integrations/build_RAG_with_milvus_and_gemini.md": "2024-12-06T07:01:34.066Z", "v2.5.x/site/en/integrations/build_RAG_with_milvus_and_ollama.md": "2024-12-06T07:01:41.084Z", "v2.5.x/site/en/integrations/milvus_rag_with_dynamiq.md": "2024-12-06T07:02:12.036Z", "v2.5.x/site/en/tutorials/full_text_search_with_milvus.md": "2024-12-06T07:02:31.417Z", - "v2.5.x/site/en/adminGuide/use-pulsar-v2.md": "2024-12-16T08:33:00.666Z" + "v2.5.x/site/en/adminGuide/use-pulsar-v2.md": "2024-12-16T08:33:00.666Z", + "v2.5.x/site/en/adminGuide/drop_users_roles.md": "2024-12-23T12:34:42.029Z", + "v2.5.x/site/en/adminGuide/grant_privileges.md": "2024-12-23T12:34:56.099Z", + "v2.5.x/site/en/adminGuide/grant_roles.md": "2024-12-23T12:35:05.664Z", + "v2.5.x/site/en/adminGuide/privilege_group.md": "2024-12-23T12:35:20.656Z", + "v2.5.x/site/en/adminGuide/users_and_roles.md": "2024-12-23T12:36:45.945Z", + "v2.5.x/site/en/userGuide/search-query-get/boolean/array-operators.md": "2024-12-23T12:37:57.958Z", + "v2.5.x/site/en/userGuide/search-query-get/boolean/basic-operators.md": "2024-12-23T12:38:11.965Z", + "v2.5.x/site/en/userGuide/search-query-get/boolean/boolean.md": "2024-12-23T12:38:25.003Z", + "v2.5.x/site/en/userGuide/search-query-get/boolean/filtering-templating.md": "2024-12-23T12:38:32.738Z", + "v2.5.x/site/en/userGuide/search-query-get/boolean/json-operators.md": "2024-12-23T12:38:40.070Z", + "v2.5.x/site/en/userGuide/tools/milvus-webui.md": "2024-12-23T12:38:49.878Z" } } \ No newline at end of file