├── .github ├── ISSUE_TEMPLATE │ ├── BUG_REPORT.md │ ├── CHANGE-REQUEST.md │ └── QUESTION.md ├── PULL_REQUEST_TEMPLATE.md ├── auto_assign.yml └── workflows │ ├── auto_cherry_pick.yml │ ├── deploy-all.yml │ ├── deploy-en.yml │ └── deploy-zh.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── community_versions.json ├── docs-2.0-en ├── 1.introduction │ ├── 1.what-is-nebula-graph.md │ ├── 2.1.path.md │ ├── 2.data-model.md │ ├── 3.nebula-graph-architecture │ │ ├── 1.architecture-overview.md │ │ ├── 2.meta-service.md │ │ ├── 3.graph-service.md │ │ └── 4.storage-service.md │ └── 3.vid.md ├── 14.client │ ├── 1.nebula-client.md │ ├── 3.nebula-cpp-client.md │ ├── 4.nebula-java-client.md │ ├── 5.nebula-python-client.md │ ├── 6.nebula-go-client.md │ └── contributed-clients.md ├── 15.contribution │ └── how-to-contribute.md ├── 2.quick-start │ ├── 1.quick-start-workflow.md │ ├── 2.install-nebula-graph.md │ ├── 3.1add-storage-hosts.md │ ├── 3.connect-to-nebula-graph.md │ ├── 4.nebula-graph-crud.md │ ├── 5.start-stop-service.md │ └── 6.cheatsheet-for-ngql.md ├── 20.appendix │ ├── 0.FAQ.md │ ├── 6.eco-tool-version.md │ ├── error-code.md │ ├── history.md │ ├── learning-path.md │ ├── port-guide.md │ └── release-notes │ │ ├── dashboard-comm-release-note.md │ │ ├── nebula-comm-release-note.md │ │ └── studio-release-note.md ├── 3.ngql-guide │ ├── 1.nGQL-overview │ │ ├── 1.overview.md │ │ ├── 3.graph-patterns.md │ │ ├── comments.md │ │ ├── identifier-case-sensitivity.md │ │ ├── keywords-and-reserved-words.md │ │ └── ngql-style-guide.md │ ├── 10.tag-statements │ │ ├── 1.create-tag.md │ │ ├── 2.drop-tag.md │ │ ├── 3.alter-tag.md │ │ ├── 4.show-tags.md │ │ ├── 5.describe-tag.md │ │ ├── 6.delete-tag.md │ │ └── improve-query-by-tag-index.md │ ├── 11.edge-type-statements │ │ ├── 1.create-edge.md │ │ ├── 2.drop-edge.md │ │ ├── 3.alter-edge.md │ │ ├── 4.show-edges.md │ │ └── 5.describe-edge.md │ ├── 12.vertex-statements │ │ ├── 1.insert-vertex.md │ │ ├── 2.update-vertex.md │ │ ├── 3.upsert-vertex.md │ │ └── 4.delete-vertex.md │ ├── 13.edge-statements │ │ ├── 1.insert-edge.md │ │ ├── 2.update-edge.md │ │ ├── 3.upsert-edge.md │ │ └── 4.delete-edge.md │ ├── 14.native-index-statements │ │ ├── 1.create-native-index.md │ │ ├── 2.1.show-create-index.md │ │ ├── 2.show-native-indexes.md │ │ ├── 3.describe-native-index.md │ │ ├── 4.rebuild-native-index.md │ │ ├── 5.show-native-index-status.md │ │ ├── 6.drop-native-index.md │ │ └── README.md │ ├── 15.full-text-index-statements │ │ └── 1.search-with-text-based-index.md │ ├── 17.query-tuning-statements │ │ ├── 1.explain-and-profile.md │ │ ├── 2.kill-session.md │ │ └── 6.kill-query.md │ ├── 18.operation-and-maintenance-statements │ │ └── .1.configs-syntax.md │ ├── 3.data-types │ │ ├── 1.numeric.md │ │ ├── 10.geography.md │ │ ├── 2.boolean.md │ │ ├── 3.string.md │ │ ├── 4.date-and-time.md │ │ ├── 5.null.md │ │ ├── 6.list.md │ │ ├── 7.set.md │ │ ├── 8.map.md │ │ └── 9.type-conversion.md │ ├── 4.job-statements.md │ ├── 4.variable-and-composite-queries │ │ ├── 1.composite-queries.md │ │ ├── 2.user-defined-variables.md │ │ └── 3.property-reference.md │ ├── 5.operators │ │ ├── .3.bitwise.md │ │ ├── 1.comparison.md │ │ ├── 10.arithmetic.md │ │ ├── 2.boolean.md │ │ ├── 4.pipe.md │ │ ├── 6.set.md │ │ ├── 7.string.md │ │ ├── 8.list.md │ │ └── 9.precedence.md │ ├── 6.functions-and-expressions │ │ ├── 1.math.md │ │ ├── 14.geo.md │ │ ├── 15.aggregating.md │ │ ├── 16.type-conversion.md │ │ ├── 2.string.md │ │ ├── 3.date-and-time.md │ │ ├── 4.schema.md │ │ ├── 5.conditional-expressions.md │ │ ├── 6.list.md │ │ ├── 8.predicate.md │ │ └── 9.user-defined-functions.md │ ├── 7.general-query-statements │ │ ├── 1.general-query-statements-overview.md │ │ ├── 2.match.md │ │ ├── 3.go.md │ │ ├── 4.fetch.md │ │ ├── 5.lookup.md │ │ ├── 6.find-path.md │ │ ├── 6.show │ │ │ ├── .3.show-configs.md │ │ │ ├── 1.show-charset.md │ │ │ ├── 10.show-roles.md │ │ │ ├── 11.show-snapshots.md │ │ │ ├── 12.show-spaces.md │ │ │ ├── 14.show-stats.md │ │ │ ├── 15.show-tags-edges.md │ │ │ ├── 16.show-users.md │ │ │ ├── 17.show-sessions.md │ │ │ ├── 18.show-queries.md │ │ │ ├── 19.show-meta-leader.md │ │ │ ├── 2.show-collation.md │ │ │ ├── 4.show-create-space.md │ │ │ ├── 5.show-create-tag-edge.md │ │ │ ├── 6.show-hosts.md │ │ │ ├── 7.show-index-status.md │ │ │ ├── 8.show-indexes.md │ │ │ └── 9.show-parts.md │ │ ├── 7.get-subgraph.md │ │ └── optional-match.md │ ├── 8.clauses-and-options │ │ ├── group-by.md │ │ ├── joins.md │ │ ├── limit.md │ │ ├── order-by.md │ │ ├── return.md │ │ ├── sample.md │ │ ├── ttl-options.md │ │ ├── unwind.md │ │ ├── where.md │ │ ├── with.md │ │ └── yield.md │ └── 9.space-statements │ │ ├── 1.create-space.md │ │ ├── 2.use-space.md │ │ ├── 3.show-spaces.md │ │ ├── 4.describe-space.md │ │ ├── 5.drop-space.md │ │ └── 6.clear-space.md ├── 4.deployment-and-installation │ ├── 1.resource-preparations.md │ ├── 2.compile-and-install-nebula-graph │ │ ├── 1.install-nebula-graph-by-compiling-the-source-code.md │ │ ├── 2.install-nebula-graph-by-rpm-or-deb.md │ │ ├── 3.deploy-nebula-graph-with-docker-compose.md │ │ ├── 4.install-nebula-graph-from-tar.md │ │ ├── 6.deploy-nebula-graph-with-peripherals.md │ │ ├── 7.compile-using-docker.md │ │ ├── 8.deploy-nebula-graph-with-lite.md │ │ └── deploy-nebula-graph-cluster.md │ ├── 3.upgrade-nebula-graph │ │ └── upgrade-nebula-comm.md │ ├── 4.uninstall-nebula-graph.md │ ├── 6.deploy-text-based-index │ │ ├── 1.text-based-index-restrictions.md │ │ ├── 2.deploy-es.md │ │ └── 3.deploy-listener.md │ ├── connect-to-nebula-graph.md │ ├── manage-service.md │ ├── manage-storage-host.md │ └── standalone-deployment.md ├── 5.configurations-and-logs │ ├── 1.configurations │ │ ├── 1.configurations.md │ │ ├── 2.meta-config.md │ │ ├── 3.graph-config.md │ │ ├── 4.storage-config.md │ │ └── 6.kernel-config.md │ └── 2.log-management │ │ └── logs.md ├── 6.monitor-and-metrics │ ├── 1.query-performance-metrics.md │ └── 2.rocksdb-statistics.md ├── 7.data-security │ ├── 1.authentication │ │ ├── 1.authentication.md │ │ ├── 2.management-user.md │ │ └── 3.role-list.md │ └── 4.ssl.md ├── 8.service-tuning │ ├── 2.graph-modeling.md │ ├── 3.system-design.md │ ├── 4.plan.md │ ├── compaction.md │ ├── enable_autofdo_for_nebulagraph.md │ ├── load-balance.md │ ├── practice.md │ └── super-node.md ├── CHANGELOG.md ├── README.md ├── backup-and-restore │ ├── 3.manage-snapshot.md │ └── nebula-br │ │ ├── 1.what-is-br.md │ │ ├── 2.compile-br.md │ │ ├── 3.br-backup-data.md │ │ └── 4.br-restore-data.md ├── basketballplayer-2.X.ngql ├── connector │ ├── nebula-flink-connector.md │ └── nebula-spark-connector.md ├── css │ └── version-select.css ├── graph-computing │ └── nebula-algorithm.md ├── icon │ ├── favicon.ico │ ├── 兼容compatibility.svg │ ├── 放大镜note.svg │ ├── 炸弹danger.svg │ ├── 蜗牛snail.svg │ ├── 蝎子caution.svg │ └── 问号脸question.svg ├── import-export │ ├── nebula-exchange │ │ ├── about-exchange │ │ │ ├── ex-ug-limitations.md │ │ │ └── ex-ug-what-is-exchange.md │ │ ├── ex-ug-FAQ.md │ │ ├── ex-ug-compile.md │ │ ├── parameter-reference │ │ │ ├── ex-ug-para-import-command.md │ │ │ └── ex-ug-parameter.md │ │ └── use-exchange │ │ │ ├── ex-ug-import-from-clickhouse.md │ │ │ ├── ex-ug-import-from-csv.md │ │ │ ├── ex-ug-import-from-hbase.md │ │ │ ├── ex-ug-import-from-hive.md │ │ │ ├── ex-ug-import-from-jdbc.md │ │ │ ├── ex-ug-import-from-json.md │ │ │ ├── ex-ug-import-from-kafka.md │ │ │ ├── ex-ug-import-from-maxcompute.md │ │ │ ├── ex-ug-import-from-mysql.md │ │ │ ├── ex-ug-import-from-neo4j.md │ │ │ ├── ex-ug-import-from-oracle.md │ │ │ ├── ex-ug-import-from-orc.md │ │ │ ├── ex-ug-import-from-parquet.md │ │ │ ├── ex-ug-import-from-pulsar.md │ │ │ └── ex-ug-import-from-sst.md │ ├── use-importer.md │ └── write-tools.md ├── js │ ├── config.js │ ├── hotjar.js │ ├── jquery.js │ └── version-select.js ├── k8s-operator │ ├── 1.introduction-to-nebula-operator.md │ ├── 2.get-started │ │ ├── 2.1.install-operator.md │ │ ├── 2.3.create-cluster.md │ │ └── 2.4.connect-to-cluster.md │ ├── 3.operator-management │ │ ├── 3.1.customize-installation.md │ │ ├── 3.2.update-operator.md │ │ ├── 3.3.upgrade-operator.md │ │ ├── 3.4.unistall-operator.md │ │ └── 3.5.cluster-scope-config.md │ ├── 4.cluster-administration │ │ ├── 4.1.installation │ │ │ ├── 4.1.1.cluster-install.md │ │ │ ├── 4.1.2.cluster-upgrade.md │ │ │ └── 4.1.3.cluster-uninstall.md │ │ ├── 4.2.configuration.md │ │ ├── 4.4.storage-management │ │ │ ├── 4.4.1.use-local-pv.md │ │ │ ├── 4.4.2.pv-expansion.md │ │ │ └── 4.4.3.configure-pv-reclaim.md │ │ ├── 4.5.logging.md │ │ ├── 4.7.security │ │ │ ├── 4.7.2.enable-admission-control.md │ │ │ └── 4.7.3.config-deletion-protection.md │ │ ├── 4.8.ha-and-balancing │ │ │ └── 4.8.1.self-healing.md │ │ └── 4.9.advanced │ │ │ ├── 4.9.1.rolling-update-strategy.md │ │ │ └── 4.9.2.restart-cluster.md │ └── 5.FAQ.md ├── nebula-bench.md ├── nebula-cloud.md ├── nebula-cloud │ ├── 1.what-is-cloud.md │ ├── 2.how-to-create-subsciption.md │ ├── 3.how-to-set-solution.md │ ├── 4.user-role-description.md │ ├── 5.solution │ │ ├── 5.0.introduce-solution.md │ │ ├── 5.1.supporting-application.md │ │ ├── 5.2.connection-configuration-and-use.md │ │ └── 5.3.role-and-authority-management.md │ ├── 6.pricing.md │ ├── 7.terms-and-conditions.md │ └── 8.privacy-policy.md ├── nebula-console.md ├── nebula-dashboard │ ├── 1.what-is-dashboard.md │ ├── 2.deploy-dashboard.md │ ├── 3.connect-dashboard.md │ ├── 4.use-dashboard.md │ └── 6.monitor-parameter.md ├── nebula-studio │ ├── about-studio │ │ ├── st-ug-limitations.md │ │ └── st-ug-what-is-graph-studio.md │ ├── deploy-connect │ │ ├── st-ug-connect.md │ │ └── st-ug-deploy.md │ ├── manage-schema │ │ ├── st-ug-crud-edge-type.md │ │ ├── st-ug-crud-index.md │ │ ├── st-ug-crud-space.md │ │ ├── st-ug-crud-tag.md │ │ └── st-ug-view-schema.md │ ├── quick-start │ │ ├── draft.md │ │ ├── st-ug-console.md │ │ ├── st-ug-create-schema.md │ │ ├── st-ug-import-data.md │ │ └── st-ug-plan-schema.md │ ├── system-settings.md │ └── troubleshooting │ │ ├── st-ug-config-server-errors.md │ │ ├── st-ug-connection-errors.md │ │ └── st-ug-faq.md ├── overrides │ ├── 404.html │ ├── content.html │ ├── main.html │ └── partials │ │ ├── algolia-search.html │ │ └── header.html ├── reuse │ ├── source-monitoring-metrics.md │ ├── source_connect-to-nebula-graph.md │ ├── source_install-nebula-graph-by-rpm-or-deb.md │ └── source_manage-service.md ├── stylesheets │ ├── extra.css │ ├── logo.css │ ├── note.css │ └── pdf.css └── synchronization-and-migration │ └── 2.balance-syntax.md ├── docs-2.0-zh ├── 1.introduction │ ├── 1.what-is-nebula-graph.md │ ├── 2.1.path.md │ ├── 2.data-model.md │ ├── 3.nebula-graph-architecture │ │ ├── 1.architecture-overview.md │ │ ├── 2.meta-service.md │ │ ├── 3.graph-service.md │ │ └── 4.storage-service.md │ └── 3.vid.md ├── 14.client │ ├── 1.nebula-client.md │ ├── 3.nebula-cpp-client.md │ ├── 4.nebula-java-client.md │ ├── 5.nebula-python-client.md │ ├── 6.nebula-go-client.md │ └── contributed-clients.md ├── 15.contribution │ └── how-to-contribute.md ├── 2.quick-start │ ├── 1.quick-start-overview.md │ ├── 2.start-free-trial-on-cloud.md │ ├── 3.quick-start-on-premise │ │ ├── 2.install-nebula-graph.md │ │ ├── 3.1add-storage-hosts.md │ │ ├── 3.connect-to-nebula-graph.md │ │ ├── 4.nebula-graph-crud.md │ │ └── 5.start-stop-service.md │ └── 6.cheatsheet-for-ngql-command.md ├── 20.appendix │ ├── 0.FAQ.md │ ├── 6.eco-tool-version.md │ ├── error-code.md │ ├── history.md │ ├── learning-path.md │ ├── mind-map.md │ ├── port-guide.md │ └── release-notes │ │ ├── dashboard-comm-release-note.md │ │ ├── nebula-comm-release-note.md │ │ └── studio-release-note.md ├── 3.ngql-guide │ ├── 1.nGQL-overview │ │ ├── 1.overview.md │ │ ├── 3.graph-patterns.md │ │ ├── comments.md │ │ ├── identifier-case-sensitivity.md │ │ ├── keywords-and-reserved-words.md │ │ └── ngql-style-guide.md │ ├── 10.tag-statements │ │ ├── 1.create-tag.md │ │ ├── 2.drop-tag.md │ │ ├── 3.alter-tag.md │ │ ├── 4.show-tags.md │ │ ├── 5.describe-tag.md │ │ ├── 6.delete-tag.md │ │ └── improve-query-by-tag-index.md │ ├── 11.edge-type-statements │ │ ├── 1.create-edge.md │ │ ├── 2.drop-edge.md │ │ ├── 3.alter-edge.md │ │ ├── 4.show-edges.md │ │ └── 5.describe-edge.md │ ├── 12.vertex-statements │ │ ├── 1.insert-vertex.md │ │ ├── 2.update-vertex.md │ │ ├── 3.upsert-vertex.md │ │ └── 4.delete-vertex.md │ ├── 13.edge-statements │ │ ├── 1.insert-edge.md │ │ ├── 2.update-edge.md │ │ ├── 3.upsert-edge.md │ │ └── 4.delete-edge.md │ ├── 14.native-index-statements │ │ ├── 1.create-native-index.md │ │ ├── 2.1.show-create-index.md │ │ ├── 2.show-native-indexes.md │ │ ├── 3.describe-native-index.md │ │ ├── 4.rebuild-native-index.md │ │ ├── 5.show-native-index-status.md │ │ ├── 6.drop-native-index.md │ │ └── README.md │ ├── 15.full-text-index-statements │ │ └── 1.search-with-text-based-index.md │ ├── 17.query-tuning-statements │ │ ├── 1.explain-and-profile.md │ │ ├── 2.kill-session.md │ │ └── 6.kill-query.md │ ├── 18.operation-and-maintenance-statements │ │ └── .1.configs-syntax.md │ ├── 3.data-types │ │ ├── 1.numeric.md │ │ ├── 10.geography.md │ │ ├── 2.boolean.md │ │ ├── 3.string.md │ │ ├── 4.date-and-time.md │ │ ├── 5.null.md │ │ ├── 6.list.md │ │ ├── 7.set.md │ │ ├── 8.map.md │ │ └── 9.type-conversion.md │ ├── 4.job-statements.md │ ├── 4.variable-and-composite-queries │ │ ├── 1.composite-queries.md │ │ ├── 2.user-defined-variables.md │ │ └── 3.property-reference.md │ ├── 5.operators │ │ ├── 1.comparison.md │ │ ├── 10.arithmetic.md │ │ ├── 2.boolean.md │ │ ├── 4.pipe.md │ │ ├── 6.set.md │ │ ├── 7.string.md │ │ ├── 8.list.md │ │ └── 9.precedence.md │ ├── 6.functions-and-expressions │ │ ├── 1.math.md │ │ ├── 14.geo.md │ │ ├── 15.aggregating.md │ │ ├── 16.type-conversion.md │ │ ├── 2.string.md │ │ ├── 3.date-and-time.md │ │ ├── 4.schema.md │ │ ├── 5.conditional-expressions.md │ │ ├── 6.list.md │ │ ├── 8.predicate.md │ │ └── 9.user-defined-functions.md │ ├── 7.general-query-statements │ │ ├── 1.general-query-statements-overview.md │ │ ├── 2.match.md │ │ ├── 3.go.md │ │ ├── 4.fetch.md │ │ ├── 5.lookup.md │ │ ├── 6.find-path.md │ │ ├── 6.show │ │ │ ├── 1.show-charset.md │ │ │ ├── 10.show-roles.md │ │ │ ├── 11.show-snapshots.md │ │ │ ├── 12.show-spaces.md │ │ │ ├── 14.show-stats.md │ │ │ ├── 15.show-tags-edges.md │ │ │ ├── 16.show-users.md │ │ │ ├── 17.show-sessions.md │ │ │ ├── 18.show-queries.md │ │ │ ├── 19.show-meta-leader.md │ │ │ ├── 2.show-collation.md │ │ │ ├── 4.show-create-space.md │ │ │ ├── 5.show-create-tag-edge.md │ │ │ ├── 6.show-hosts.md │ │ │ ├── 7.show-index-status.md │ │ │ ├── 8.show-indexes.md │ │ │ └── 9.show-parts.md │ │ ├── 7.get-subgraph.md │ │ └── optional-match.md │ ├── 8.clauses-and-options │ │ ├── group-by.md │ │ ├── joins.md │ │ ├── limit.md │ │ ├── order-by.md │ │ ├── return.md │ │ ├── sample.md │ │ ├── ttl-options.md │ │ ├── unwind.md │ │ ├── where.md │ │ ├── with.md │ │ └── yield.md │ └── 9.space-statements │ │ ├── 1.create-space.md │ │ ├── 2.use-space.md │ │ ├── 3.show-spaces.md │ │ ├── 4.describe-space.md │ │ ├── 5.drop-space.md │ │ └── 6.clear-space.md ├── 4.deployment-and-installation │ ├── 1.resource-preparations.md │ ├── 2.compile-and-install-nebula-graph │ │ ├── 1.install-nebula-graph-by-compiling-the-source-code.md │ │ ├── 2.install-nebula-graph-by-rpm-or-deb.md │ │ ├── 3.deploy-nebula-graph-with-docker-compose.md │ │ ├── 4.install-nebula-graph-from-tar.md │ │ ├── 6.deploy-nebula-graph-with-peripherals.md │ │ ├── 7.compile-using-docker.md │ │ ├── 8.deploy-nebula-graph-with-lite.md │ │ └── deploy-nebula-graph-cluster.md │ ├── 3.upgrade-nebula-graph │ │ └── upgrade-nebula-comm.md │ ├── 4.uninstall-nebula-graph.md │ ├── 6.deploy-text-based-index │ │ ├── 1.text-based-index-restrictions.md │ │ ├── 2.deploy-es.md │ │ └── 3.deploy-listener.md │ ├── connect-to-nebula-graph.md │ ├── manage-service.md │ ├── manage-storage-host.md │ └── standalone-deployment.md ├── 5.configurations-and-logs │ ├── 1.configurations │ │ ├── 1.configurations.md │ │ ├── 2.meta-config.md │ │ ├── 3.graph-config.md │ │ ├── 4.storage-config.md │ │ └── 6.kernel-config.md │ └── 2.log-management │ │ └── logs.md ├── 6.monitor-and-metrics │ ├── 1.query-performance-metrics.md │ └── 2.rocksdb-statistics.md ├── 7.data-security │ ├── 1.authentication │ │ ├── 1.authentication.md │ │ ├── 2.management-user.md │ │ └── 3.role-list.md │ └── 4.ssl.md ├── 8.service-tuning │ ├── 2.graph-modeling.md │ ├── 3.system-design.md │ ├── 4.plan.md │ ├── compaction.md │ ├── enable_autofdo_for_nebulagraph.md │ ├── load-balance.md │ ├── practice.md │ └── super-node.md ├── CHANGELOG.md ├── README.md ├── backup-and-restore │ ├── 3.manage-snapshot.md │ └── nebula-br │ │ ├── 1.what-is-br.md │ │ ├── 2.compile-br.md │ │ ├── 3.br-backup-data.md │ │ └── 4.br-restore-data.md ├── connector │ ├── nebula-flink-connector.md │ └── nebula-spark-connector.md ├── css │ └── version-select.css ├── fonts │ └── NotoSansSC-Regular.ttf ├── graph-computing │ └── nebula-algorithm.md ├── icon │ ├── favicon.ico │ ├── 兼容compatibility.svg │ ├── 放大镜note.svg │ ├── 炸弹danger.svg │ ├── 蜗牛snail.svg │ ├── 蝎子caution.svg │ └── 问号脸question.svg ├── import-export │ ├── nebula-exchange │ │ ├── about-exchange │ │ │ ├── ex-ug-limitations.md │ │ │ └── ex-ug-what-is-exchange.md │ │ ├── ex-ug-FAQ.md │ │ ├── ex-ug-compile.md │ │ ├── parameter-reference │ │ │ ├── ex-ug-para-import-command.md │ │ │ └── ex-ug-parameter.md │ │ └── use-exchange │ │ │ ├── ex-ug-import-from-clickhouse.md │ │ │ ├── ex-ug-import-from-csv.md │ │ │ ├── ex-ug-import-from-hbase.md │ │ │ ├── ex-ug-import-from-hive.md │ │ │ ├── ex-ug-import-from-jdbc.md │ │ │ ├── ex-ug-import-from-json.md │ │ │ ├── ex-ug-import-from-kafka.md │ │ │ ├── ex-ug-import-from-maxcompute.md │ │ │ ├── ex-ug-import-from-mysql.md │ │ │ ├── ex-ug-import-from-neo4j.md │ │ │ ├── ex-ug-import-from-oracle.md │ │ │ ├── ex-ug-import-from-orc.md │ │ │ ├── ex-ug-import-from-parquet.md │ │ │ ├── ex-ug-import-from-pulsar.md │ │ │ └── ex-ug-import-from-sst.md │ ├── use-importer.md │ └── write-tools.md ├── js │ ├── config.js │ ├── init.js │ ├── jquery.js │ └── version-select.js ├── k8s-operator │ ├── 1.introduction-to-nebula-operator.md │ ├── 2.get-started │ │ ├── 2.1.install-operator.md │ │ ├── 2.3.create-cluster.md │ │ └── 2.4.connect-to-cluster.md │ ├── 3.operator-management │ │ ├── 3.1.customize-installation.md │ │ ├── 3.2.update-operator.md │ │ ├── 3.3.upgrade-operator.md │ │ ├── 3.4.unistall-operator.md │ │ └── 3.5.cluster-scope-config.md │ ├── 4.cluster-administration │ │ ├── 4.1.installation │ │ │ ├── 4.1.1.cluster-install.md │ │ │ ├── 4.1.2.cluster-upgrade.md │ │ │ └── 4.1.3.cluster-uninstall.md │ │ ├── 4.2.configuration.md │ │ ├── 4.4.storage-management │ │ │ ├── 4.4.1.use-local-pv.md │ │ │ ├── 4.4.2.pv-expansion.md │ │ │ └── 4.4.3.configure-pv-reclaim.md │ │ ├── 4.5.logging.md │ │ ├── 4.7.security │ │ │ ├── 4.7.2.enable-admission-control.md │ │ │ └── 4.7.3.config-deletion-protection.md │ │ ├── 4.8.ha-and-balancing │ │ │ └── 4.8.1.self-healing.md │ │ └── 4.9.advanced │ │ │ ├── 4.9.1.rolling-update-strategy.md │ │ │ └── 4.9.2.restart-cluster.md │ └── 5.FAQ.md ├── nebula-bench.md ├── nebula-cloud.md ├── nebula-cloud │ ├── 1.what-is-cloud.md │ ├── nebula-cloud-on-alibabacloud │ │ ├── 1.create-service-instance.md │ │ ├── 2.use-cloud-services.md │ │ ├── 3.delete-service-instance.md │ │ └── 4.scaling-services.md │ └── nebula-cloud-on-azure │ │ ├── 2.how-to-create-subsciption.md │ │ ├── 3.how-to-set-solution.md │ │ ├── 4.user-role-description.md │ │ ├── 5.solution │ │ ├── 5.0.introduce-solution.md │ │ ├── 5.1.supporting-application.md │ │ ├── 5.2.connection-configuration-and-use.md │ │ └── 5.3.role-and-authority-management.md │ │ ├── 6.pricing.md │ │ ├── 7.terms-and-conditions.md │ │ └── 8.privacy-policy.md ├── nebula-console.md ├── nebula-dashboard │ ├── 1.what-is-dashboard.md │ ├── 2.deploy-dashboard.md │ ├── 3.connect-dashboard.md │ ├── 4.use-dashboard.md │ └── 6.monitor-parameter.md ├── nebula-studio │ ├── about-studio │ │ ├── st-ug-limitations.md │ │ └── st-ug-what-is-graph-studio.md │ ├── deploy-connect │ │ ├── st-ug-connect.md │ │ └── st-ug-deploy.md │ ├── manage-schema │ │ ├── st-ug-crud-edge-type.md │ │ ├── st-ug-crud-index.md │ │ ├── st-ug-crud-space.md │ │ ├── st-ug-crud-tag.md │ │ └── st-ug-view-schema.md │ ├── quick-start │ │ ├── draft.md │ │ ├── st-ug-console.md │ │ ├── st-ug-create-schema.md │ │ ├── st-ug-import-data.md │ │ └── st-ug-plan-schema.md │ ├── system-settings.md │ └── troubleshooting │ │ ├── st-ug-config-server-errors.md │ │ ├── st-ug-connection-errors.md │ │ └── st-ug-faq.md ├── overrides │ ├── 404.html │ ├── content.html │ ├── main.html │ └── partials │ │ ├── algolia-search.html │ │ └── header.html ├── reuse │ ├── source-monitoring-metrics.md │ ├── source_connect-to-nebula-graph.md │ ├── source_create_instance_aliyun.md │ ├── source_install-nebula-graph-by-rpm-or-deb.md │ ├── source_manage-service.md │ └── source_ngql_for_quick_start.md ├── stylesheets │ ├── extra.css │ ├── logo.css │ ├── note.css │ └── pdf.css └── synchronization-and-migration │ └── 2.balance-syntax.md ├── mkdocs.yml ├── prepare.sh ├── requirements.txt ├── scripts copy ├── render_chinese_only.py └── render_english_only.py ├── scripts ├── render_chinese_only.py └── render_english_only.py └── third-party-lib-licenses ├── 1.third-party-licenses-for-the-core.md ├── 2.third-party-licenses-for-tools.md └── 3.third-party-licenses-for-docs.md /.github/ISSUE_TEMPLATE/BUG_REPORT.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 Bug Report 3 | about: If something isn't working as expected. 4 | 5 | --- 6 | 7 | # Error Report 8 | 9 | **This repository is ONLY used to solve issues related to DOCS.** 10 | 11 | Please answer the following questions before submitting your issue. Thanks! 12 | 13 | 1. What is the URL/path of the document related to this issue? 14 | 15 | 16 | 2. How would you like to improve it? 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ## Checklist 25 | 26 | 27 | - [ ] I searched for existing GitHub issues 28 | - [ ] I updated NebulaGraph to most recent version 29 | - [ ] I included all the necessary information above 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/CHANGE-REQUEST.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F680 Change Request" 3 | about: Any suggestion? Want to add something new? 4 | --- 5 | 6 | ## Change Request 7 | 8 | **This repository is ONLY used to solve issues related to DOCS.** 9 | 10 | Please answer the following questions before submitting your issue. Thanks! 11 | 12 | 1. Describe what you find is inappropriate or missing in the existing docs. 13 | 14 | 15 | 2. Describe your suggestion or addition. 16 | 17 | 18 | 3. Provide some reference materials (documents, websites, etc) if you could. 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/QUESTION.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F914 Question" 3 | about: Usage question that isn't answered in docs or discussion 4 | --- 5 | 6 | ## Question 7 | 8 | **This repository is ONLY used to solve issues related to DOCS.** 9 | 10 | Before submitting your question, make sure you have: 11 | 12 | - Searched existing Stack Overflow questions. 13 | - Googled your question. 14 | - Searched the open and closed [GitHub issues](https://github.com/vesoft-inc/nebula-docs/issues). 15 | - Searched our [Forum](https://github.com/vesoft-inc/nebula/discussions). 16 | - Read the documentation: 17 | - [docs](https://docs.nebula-graph.io/) 18 | 19 | Now, please describe your question here: 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### What is changed, added or deleted? (Required) 4 | 5 | 6 | 7 | 8 | 9 | ### What is the related PR or file link(s)? 10 | 11 | 12 | 13 | - This PR is translated from: 14 | - Other reference link(s): 15 | 16 | -------------------------------------------------------------------------------- /.github/auto_assign.yml: -------------------------------------------------------------------------------- 1 | # Set to true to add reviewers to pull requests 2 | addReviewers: true 3 | 4 | # Set to true to add assignees to pull requests 5 | addAssignees: true 6 | 7 | # A list of reviewers to be added to pull requests (GitHub user name) 8 | reviewers: 9 | - whitewum 10 | - randomJoe211 11 | 12 | # A list of keywords to be skipped the process that add reviewers if pull requests include it 13 | skipKeywords: 14 | - wip 15 | 16 | # A number of reviewers added to the pull request 17 | # Set 0 to add all the reviewers (default: 0) 18 | numberOfReviewers: 0 19 | -------------------------------------------------------------------------------- /.github/workflows/auto_cherry_pick.yml: -------------------------------------------------------------------------------- 1 | name: Auto Cherry Pick 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | branch_from: 6 | description: "which branch you want to cherry pick, eg: v3.1.0" 7 | required: true 8 | 9 | defaults: 10 | run: 11 | shell: bash 12 | 13 | jobs: 14 | auto-cherry-pick: 15 | #if: ${{ startsWith(github.event.pull_request.labels.*.name, 'cherry-pick-') && github.event.pull_request.merged == true }} 16 | runs-on: [self-hosted, nebula-fast] 17 | container: 18 | image: reg.vesoft-inc.com/dashboard/dashboard-dev:centos7 19 | credentials: 20 | username: ${{ secrets.HARBOR_USERNAME }} 21 | password: ${{ secrets.HARBOR_PASSWORD }} 22 | steps: 23 | - name: keep workspace empty 24 | run: | 25 | rm -rf * 26 | - name: git config set 27 | env: 28 | GH_BOT_PAT: ${{ secrets.GITHUB_TOKEN }} 29 | run: | 30 | git config --global url."https://${GH_BOT_PAT}:x-oauth-basic@github.com/".insteadOf "https://github.com/" 31 | export GOPRIVATE="github.com/vesoft-inc" 32 | - name: auto cherry pick 33 | uses: xigongdaEricyang/cherry-pick-robot@for-doc 34 | with: 35 | repo_token: ${{ secrets.GITHUB_TOKEN }} 36 | from_branch: ${{ github.event.inputs.branch_from }} 37 | #pr_num: ${{ github.event.pull_request.number }} 38 | auto_merge: false 39 | -------------------------------------------------------------------------------- /.github/workflows/deploy-all.yml: -------------------------------------------------------------------------------- 1 | name: deploy-all 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - 'docs-2.0-zh/**' 7 | - 'docs-2.0-en/**' 8 | branches: 9 | # Remember to add v before the following version number unless the version is master. 10 | - master 11 | 12 | 13 | jobs: 14 | deploy-zh: 15 | uses: ./.github/workflows/deploy-zh.yml 16 | secrets: 17 | ZHSITE_PASSWORD: ${{ secrets.ZHSITE_PASSWORD }} 18 | 19 | deploy-en: 20 | uses: ./.github/workflows/deploy-en.yml 21 | -------------------------------------------------------------------------------- /.github/workflows/deploy-en.yml: -------------------------------------------------------------------------------- 1 | name: Publish English docs via GitHub Pages 2 | env: 3 | 4 | ACTIONTEST: master # no need to add v before the version number 5 | 6 | on: 7 | workflow_call: 8 | push: 9 | branches: 10 | # Remember to add v before the following version number unless the version is master. 11 | 12 | - master 13 | 14 | paths: 15 | - 'docs-2.0-en/**' 16 | 17 | jobs: 18 | deploy: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v4 22 | with: 23 | fetch-depth: 0 # fetch all commits/branches for gitversion 24 | 25 | - name: Setup Python 26 | uses: actions/setup-python@v5 27 | with: 28 | python-version: '3.8' 29 | 30 | - name : prepare 31 | run: sh ./prepare.sh 32 | 33 | - name: Git Config 34 | run: git config user.name ChrisChen2023 && git config user.email chris.chen@vesoft.com 35 | 36 | - name: Mike Deploy 37 | run: | 38 | python ./scripts/render_english_only.py 39 | git fetch origin gh-pages --depth=1 # fix mike's CI update 40 | mike list 41 | mike deploy ${{ env.ACTIONTEST }} -p --rebase 42 | # mike set-default ${{ env.ACTIONTEST }} -p --rebase 43 | # mike list 44 | 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | site/ 2 | *.DS_Store 3 | *.diff 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribute to Documentation 2 | 3 | Contributing to the **NebulaGraph** documentation can be a rewarding experience. We welcome your participation to help make the documentation better! 4 | 5 | ## What to Contribute 6 | 7 | You can start from any of the documents in this repository: 8 | 9 | - Fix typos or format (punctuation, space, indentation, code block, etc.). 10 | - Fix or update inappropriate or outdated descriptions. 11 | - Add new document. 12 | - Raise or resolve [docs issues][_issues]. 13 | - Review Pull Requests created by others. 14 | 15 | ## How to Contribute 16 | 17 | There are many ways to contribute: 18 | 19 | - Raise a documentation [issue][_issues] on GitHub. 20 | - [Fork](https://github.com/vesoft-inc/nebula-docs/fork) the documentation, make changes or add new content on your local branch, and submit a pull request (PR) to the master branch for the docs. 21 | 22 | 23 | [_issues]: https://github.com/vesoft-inc/nebula-docs/issues 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph documentation 2 | 3 | - [English](https://docs.nebula-graph.io) 4 | - [中文](https://docs.nebula-graph.com.cn/) 5 | 6 | ## Contributing 7 | 8 | If you have any questions on our documentation, feel free to raise an [Issue](https://github.com/vesoft-inc/nebula-docs/issues) or directly create a [Pull Request](https://github.com/vesoft-inc/nebula-docs/pulls) to help fix or update it. See NebulaGraph [CONTRIBUTING](CONTRIBUTING.md) guide to get started. 9 | -------------------------------------------------------------------------------- /community_versions.json: -------------------------------------------------------------------------------- 1 | [{"version": "3.6.0", "title": "3.6.0", "aliases": []},{"version": "3.5.0", "title": "3.5.0", "aliases": []},{"version": "3.4.3", "title": "3.4.3", "aliases": []},{"version": "3.4.2", "title": "3.4.2", "aliases": []},{"version": "3.4.1", "title": "3.4.1", "aliases": []}, {"version": "3.4.0", "title": "3.4.0", "aliases": []}, {"version": "3.3.0", "title": "3.3.0", "aliases": []}, {"version": "3.2.1", "title": "3.2.1", "aliases": []}, {"version": "3.1.3", "title": "3.1.3", "aliases": []}, {"version": "3.0.2", "title": "3.0.2", "aliases": []}, {"version": "2.6.2", "title": "2.6.2", "aliases": []}, {"version": "master", "title": "master", "aliases": []}] 2 | -------------------------------------------------------------------------------- /docs-2.0-en/14.client/1.nebula-client.md: -------------------------------------------------------------------------------- 1 | # Clients overview 2 | 3 | NebulaGraph supports multiple types of clients for users to connect to and manage the NebulaGraph database. 4 | 5 | - [NebulaGraph Console](../nebula-console.md): the native CLI client 6 | 7 | - [NebulaGraph CPP](3.nebula-cpp-client.md): the NebulaGraph client for C++ 8 | 9 | - [NebulaGraph Java](4.nebula-java-client.md): the NebulaGraph client for Java 10 | 11 | - [NebulaGraph Python](5.nebula-python-client.md): the NebulaGraph client for Python 12 | 13 | - [NebulaGraph Go](6.nebula-go-client.md): the NebulaGraph client for Golang 14 | 15 | !!! note 16 | 17 | Only the following classes are thread-safe: 18 | 19 | - NebulaPool and SessionPool in NebulaGraph Java 20 | - ConnectionPool and SessionPool in NebulaGraph Go 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs-2.0-en/14.client/contributed-clients.md: -------------------------------------------------------------------------------- 1 | # Community contributed clients 2 | 3 | You can use the following clients developed by community users to connect to and manage NebulaGraph: 4 | 5 | - [NebulaGraph Rust](https://github.com/vesoft-inc/nebula-rust) 6 | - [NebulaGraph PHP](https://github.com/nebula-contrib/nebula-php) 7 | - [NebulaGraph Node](https://github.com/nebula-contrib/nebula-node) 8 | - [NebulaGraph .NET](https://github.com/nebula-contrib/nebula-net) 9 | -------------------------------------------------------------------------------- /docs-2.0-en/2.quick-start/2.install-nebula-graph.md: -------------------------------------------------------------------------------- 1 | # Step 1: Install NebulaGraph 2 | 3 | {% include "/source_install-nebula-graph-by-rpm-or-deb.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-en/2.quick-start/3.connect-to-nebula-graph.md: -------------------------------------------------------------------------------- 1 | # Step 3: Connect to NebulaGraph 2 | 3 | {% include "/source_connect-to-nebula-graph.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-en/2.quick-start/5.start-stop-service.md: -------------------------------------------------------------------------------- 1 | # Step 2: Manage NebulaGraph Service 2 | 3 | {% include "/source_manage-service.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-en/20.appendix/release-notes/dashboard-comm-release-note.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Dashboard Community Edition release notes 2 | 3 | ## Community Edition 3.4.0 4 | 5 | - Feature 6 | - Support the built-in [dashboard.service](../../nebula-dashboard/2.deploy-dashboard.md) script to manage the Dashboard services with one-click and view the Dashboard version. 7 | - Support viewing the configuration of Meta services. 8 | 9 | - Enhancement 10 | - Adjust the directory structure and simplify the [deployment steps](../../nebula-dashboard/2.deploy-dashboard.md). 11 | - Display the names of the monitoring metrics on the overview page of `machine`. 12 | - Optimize the calculation of monitoring metrics such as `num_queries`, and adjust the display to time series aggregation. 13 | -------------------------------------------------------------------------------- /docs-2.0-en/20.appendix/release-notes/studio-release-note.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Studio release notes 2 | 3 | ## v3.10.0 (2024.5) 4 | 5 | - Enhancements 6 | 7 | - Adjusted the default maximum length of the context for AI Assistant. 8 | - Adjusted some UI copywriting and styles. 9 | 10 | - Bug fixes 11 | - Fixed the error in the example file that was provided in the Import Template section. 12 | - Fixed the bug where the default value was non-null when creating tags or edge types. 13 | - Fixed the page crash when editing a large number of properties on the import task page. 14 | 15 | ## v3.9.1 (2024.2) 16 | 17 | - Bug fixes 18 | - Fixed the bug where the parameter `NOT NULL` was used as property values in schema drafting. Replaced it with the default parameter `NULL`. 19 | 20 | ## v3.9.0 (2024.1) 21 | 22 | - Features 23 | - Supported importing data using [AI](../../nebula-studio/quick-start/st-ug-import-data.md). 24 | - Supported the generation of nGQL statements using the [AI Assistant](../../nebula-studio/quick-start/st-ug-console.md). 25 | 26 | - Enhancements 27 | - Optimized the [console feature](../../nebula-studio/quick-start/st-ug-console.md), including automatic completion of a tag or edge type, quick selection of the historical statements, quick viewing of the schema, etc. 28 | - Optimized the presentation style of the [execution plan](../../nebula-studio/quick-start/st-ug-console.md). -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/1.nGQL-overview/comments.md: -------------------------------------------------------------------------------- 1 | # Comments 2 | 3 | This topic will describe the comments in nGQL. 4 | 5 | !!! compatibility "Legacy version compatibility" 6 | 7 | * In NebulaGraph 1.x, there are four comment styles: `#`, `--`, `//`, `/* */`. 8 | * Since NebulaGraph 2.x, `--` cannot be used as comments. 9 | 10 | ## Examples 11 | 12 | ```ngql 13 | nebula> RETURN 1+1; # This comment continues to the end of this line. 14 | nebula> RETURN 1+1; // This comment continues to the end of this line. 15 | nebula> RETURN 1 /* This is an in-line comment. */ + 1 == 2; 16 | nebula> RETURN 11 + \ 17 | /* Multi-line comment. \ 18 | Use a backslash as a line break. \ 19 | */ 12; 20 | ``` 21 | 22 | !!! note 23 | 24 | - In nGQL statements, the backslash `\` in a line indicates a line break. 25 | - If a statement starts with `#` or `//`, the statement is not executed and the error `StatementEmpty` is returned. 26 | 27 | ## OpenCypher compatibility 28 | 29 | * In nGQL, you must add a `\` at the end of every line, even in multi-line comments `/* */`. 30 | * In openCypher, there is no need to use a `\` as a line break. 31 | 32 | ```openCypher 33 | /* openCypher style: 34 | The following comment 35 | spans more than 36 | one line */ 37 | MATCH (n:label) 38 | RETURN n; 39 | ``` 40 | 41 | ```ngql 42 | /* nGQL style: \ 43 | The following comment \ 44 | spans more than \ 45 | one line */ \ 46 | MATCH (n:tag) \ 47 | RETURN n; 48 | ``` 49 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/1.nGQL-overview/identifier-case-sensitivity.md: -------------------------------------------------------------------------------- 1 | # Identifier case sensitivity 2 | 3 | ## Identifiers are Case-Sensitive 4 | 5 | The following statements will not work because they refer to two different spaces, i.e. `my_space` and `MY_SPACE`. 6 | 7 | ```ngql 8 | nebula> CREATE SPACE IF NOT EXISTS my_space (vid_type=FIXED_STRING(30)); 9 | nebula> use MY_SPACE; 10 | [ERROR (-1005)]: SpaceNotFound: 11 | ``` 12 | 13 | ## Keywords and Reserved Words are Case-Insensitive 14 | 15 | The following statements are equivalent since `show` and `spaces` are keywords. 16 | 17 | ```ngql 18 | nebula> show spaces; 19 | nebula> SHOW SPACES; 20 | nebula> SHOW spaces; 21 | nebula> show SPACES; 22 | ``` 23 | 24 | ## Functions are Case-Insensitive 25 | 26 | Functions are case-insensitive. For example, `count()`, `COUNT()`, and `couNT()` are equivalent. 27 | 28 | ```ngql 29 | nebula> WITH [NULL, 1, 1, 2, 2] As a \ 30 | UNWIND a AS b \ 31 | RETURN count(b), COUNT(*), couNT(DISTINCT b); 32 | +----------+----------+-------------------+ 33 | | count(b) | COUNT(*) | couNT(distinct b) | 34 | +----------+----------+-------------------+ 35 | | 4 | 5 | 2 | 36 | +----------+----------+-------------------+ 37 | ``` 38 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/10.tag-statements/4.show-tags.md: -------------------------------------------------------------------------------- 1 | # SHOW TAGS 2 | 3 | The `SHOW TAGS` statement shows the name of all tags in the current graph space. 4 | 5 | You do not need any privileges for the graph space to run the `SHOW TAGS` statement. But the returned results are different based on [role privileges](../../7.data-security/1.authentication/3.role-list.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW TAGS; 11 | ``` 12 | 13 | ## Examples 14 | 15 | ```ngql 16 | nebula> SHOW TAGS; 17 | +----------+ 18 | | Name | 19 | +----------+ 20 | | "player" | 21 | | "team" | 22 | +----------+ 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/10.tag-statements/5.describe-tag.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE TAG 2 | 3 | `DESCRIBE TAG` returns the information about a tag with the given name in a graph space, such as field names, data type, and so on. 4 | 5 | ## Prerequisite 6 | 7 | Running the `DESCRIBE TAG` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error. 8 | 9 | ## Syntax 10 | 11 | ```ngql 12 | DESC[RIBE] TAG ; 13 | ``` 14 | 15 | You can use `DESC` instead of `DESCRIBE` for short. 16 | 17 | ## Example 18 | 19 | ```ngql 20 | nebula> DESCRIBE TAG player; 21 | +--------+----------+-------+---------+---------+ 22 | | Field | Type | Null | Default | Comment | 23 | +--------+----------+-------+---------+---------+ 24 | | "name" | "string" | "YES" | | | 25 | | "age" | "int64" | "YES" | | | 26 | +--------+----------+-------+---------+---------+ 27 | ``` 28 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/11.edge-type-statements/2.drop-edge.md: -------------------------------------------------------------------------------- 1 | # DROP EDGE 2 | 3 | `DROP EDGE` drops an edge type with the given name in a graph space. 4 | 5 | An edge can have only one edge type. After you drop it, the edge **CANNOT** be accessed. The edge will be deleted in the next compaction. 6 | 7 | This operation only deletes the Schema data. All the files or directories in the disk will not be deleted directly until the next compaction. 8 | 9 | ## Prerequisites 10 | 11 | - Running the `DROP EDGE` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error. 12 | 13 | - Before you drop an edge type, make sure that the edge type does not have any indexes. Otherwise, the conflict error (`[ERROR (-1005)]: Conflict!`) will be returned. To drop an index, see [DROP INDEX](../14.native-index-statements/6.drop-native-index.md). 14 | 15 | ## Syntax 16 | 17 | ```ngql 18 | DROP EDGE [IF EXISTS] 19 | ``` 20 | 21 | - `IF NOT EXISTS`: Detects if the edge type that you want to drop exists. Only when it exists will it be dropped. 22 | 23 | - `edge_type_name`: Specifies the edge type name that you want to drop. You can drop only one edge type in one statement. 24 | 25 | ## Example 26 | 27 | ```ngql 28 | nebula> CREATE EDGE IF NOT EXISTS e1(p1 string, p2 int); 29 | nebula> DROP EDGE e1; 30 | ``` 31 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/11.edge-type-statements/4.show-edges.md: -------------------------------------------------------------------------------- 1 | # SHOW EDGES 2 | 3 | `SHOW EDGES` shows all edge types in the current graph space. 4 | 5 | You do not need any privileges for the graph space to run the `SHOW EDGES` statement. But the returned results are different based on [role privileges](../../7.data-security/1.authentication/3.role-list.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW EDGES; 11 | ``` 12 | 13 | ## Example 14 | 15 | ```ngql 16 | nebula> SHOW EDGES; 17 | +----------+ 18 | | Name | 19 | +----------+ 20 | | "follow" | 21 | | "serve" | 22 | +----------+ 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/11.edge-type-statements/5.describe-edge.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE EDGE 2 | 3 | `DESCRIBE EDGE` returns the information about an edge type with the given name in a graph space, such as field names, data type, and so on. 4 | 5 | ## Prerequisites 6 | 7 | Running the `DESCRIBE EDGE` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error. 8 | 9 | ## Syntax 10 | 11 | ```ngql 12 | DESC[RIBE] EDGE 13 | ``` 14 | 15 | You can use `DESC` instead of `DESCRIBE` for short. 16 | 17 | ## Example 18 | 19 | ```ngql 20 | nebula> DESCRIBE EDGE follow; 21 | +----------+---------+-------+---------+---------+ 22 | | Field | Type | Null | Default | Comment | 23 | +----------+---------+-------+---------+---------+ 24 | | "degree" | "int64" | "YES" | | | 25 | +----------+---------+-------+---------+---------+ 26 | ``` 27 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/13.edge-statements/4.delete-edge.md: -------------------------------------------------------------------------------- 1 | # DELETE EDGE 2 | 3 | The `DELETE EDGE` statement deletes one edge or multiple edges at a time. You can use `DELETE EDGE` together with pipe operators. For more information, see [PIPE OPERATORS](../5.operators/4.pipe.md). 4 | 5 | To delete all the outgoing edges for a vertex, please delete the vertex. For more information, see [DELETE VERTEX](../12.vertex-statements/4.delete-vertex.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | DELETE EDGE -> [@] [, -> [@] ...] 11 | ``` 12 | 13 | !!! caution 14 | 15 | If no rank is specified, NebulaGraph only deletes the edge with rank 0. Delete edges with all ranks, as shown in the following example. 16 | 17 | ## Examples 18 | 19 | ```ngql 20 | nebula> DELETE EDGE serve "player100" -> "team204"@0; 21 | ``` 22 | 23 | The following example shows that you can use `DELETE EDGE` together with pipe operators to delete edges that meet the conditions. 24 | 25 | ```ngql 26 | nebula> GO FROM "player100" OVER follow \ 27 | WHERE dst(edge) == "player101" \ 28 | YIELD src(edge) AS src, dst(edge) AS dst, rank(edge) AS rank \ 29 | | DELETE EDGE follow $-.src->$-.dst @ $-.rank; 30 | ``` 31 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/14.native-index-statements/2.show-native-indexes.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEXES 2 | 3 | `SHOW INDEXES` shows the defined tag or edge type indexes names in the current graph space. 4 | 5 | ## Syntax 6 | 7 | ```ngql 8 | SHOW {TAG | EDGE} INDEXES 9 | ``` 10 | 11 | ## Examples 12 | 13 | ```ngql 14 | nebula> SHOW TAG INDEXES; 15 | +------------------+--------------+-----------------+ 16 | | Index Name | By Tag | Columns | 17 | +------------------+--------------+-----------------+ 18 | | "fix" | "fix_string" | ["p1"] | 19 | | "player_index_0" | "player" | ["name"] | 20 | | "player_index_1" | "player" | ["name", "age"] | 21 | | "var" | "var_string" | ["p1"] | 22 | +------------------+--------------+-----------------+ 23 | 24 | nebula> SHOW EDGE INDEXES; 25 | +----------------+----------+---------+ 26 | | Index Name | By Edge | Columns | 27 | | "follow_index" | "follow" | [] | 28 | +----------------+----------+---------+ 29 | ``` 30 | 31 | !!! compatibility "Legacy version compatibility" 32 | 33 | In NebulaGraph 2.x, the `SHOW TAG/EDGE INDEXES` statement only returns `Names`. 34 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/14.native-index-statements/3.describe-native-index.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE INDEX 2 | 3 | `DESCRIBE INDEX` can get the information about the index with a given name, including the property name (Field) and the property type (Type) of the index. 4 | 5 | ## Syntax 6 | 7 | ```ngql 8 | DESCRIBE {TAG | EDGE} INDEX ; 9 | ``` 10 | 11 | ## Examples 12 | 13 | ```ngql 14 | nebula> DESCRIBE TAG INDEX player_index_0; 15 | +--------+--------------------+ 16 | | Field | Type | 17 | +--------+--------------------+ 18 | | "name" | "fixed_string(30)" | 19 | +--------+--------------------+ 20 | 21 | nebula> DESCRIBE TAG INDEX player_index_1; 22 | +--------+--------------------+ 23 | | Field | Type | 24 | +--------+--------------------+ 25 | | "name" | "fixed_string(10)" | 26 | | "age" | "int64" | 27 | +--------+--------------------+ 28 | ``` 29 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/14.native-index-statements/5.show-native-index-status.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEX STATUS 2 | 3 | `SHOW INDEX STATUS` returns the name of the created tag or edge type index and its status of job. 4 | 5 | The status of rebuilding indexes includes: 6 | 7 | - `QUEUE`: The job is in a queue. 8 | - `RUNNING`: The job is running. 9 | - `FINISHED`: The job is finished. 10 | - `FAILED`: The job has failed. 11 | - `STOPPED`: The job has stopped. 12 | - `INVALID`: The job is invalid. 13 | 14 | !!! note 15 | 16 | For details on how to create an index, see [CREATE INDEX](1.create-native-index.md). 17 | 18 | ## Syntax 19 | 20 | ```ngql 21 | SHOW {TAG | EDGE} INDEX STATUS; 22 | ``` 23 | 24 | ## Example 25 | 26 | ```ngql 27 | nebula> SHOW TAG INDEX STATUS; 28 | +----------------------+--------------+ 29 | | Name | Index Status | 30 | +----------------------+--------------+ 31 | | "player_index_0" | "FINISHED" | 32 | | "player_index_1" | "FINISHED" | 33 | +----------------------+--------------+ 34 | ``` 35 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/14.native-index-statements/6.drop-native-index.md: -------------------------------------------------------------------------------- 1 | # DROP INDEX 2 | 3 | `DROP INDEX` removes an existing index from the current graph space. 4 | 5 | ## Prerequisite 6 | 7 | Running the `DROP INDEX` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) of `DROP TAG INDEX` and `DROP EDGE INDEX` in the given graph space. Otherwise, NebulaGraph throws an error. 8 | 9 | ## Syntax 10 | 11 | ```ngql 12 | DROP {TAG | EDGE} INDEX [IF EXISTS] ; 13 | ``` 14 | 15 | `IF EXISTS`: Detects whether the index that you want to drop exists. If it exists, it will be dropped. 16 | 17 | ## Example 18 | 19 | ```ngql 20 | nebula> DROP TAG INDEX player_index_0; 21 | ``` 22 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/17.query-tuning-statements/6.kill-query.md: -------------------------------------------------------------------------------- 1 | # Kill queries 2 | 3 | `KILL QUERY` can terminate the query being executed, and is often used to terminate slow queries. 4 | 5 | !!! note 6 | 7 | Users with the God role can kill any query. Other roles can only kill their own queries. 8 | 9 | ## Syntax 10 | 11 | ```ngql 12 | KILL QUERY (session=, plan=); 13 | ``` 14 | 15 | - `session_id`: The ID of the session. 16 | - `plan_id`: The ID of the execution plan. 17 | 18 | The ID of the session and the ID of the execution plan can uniquely determine a query. Both can be obtained through the [SHOW QUERIES](../7.general-query-statements/6.show/18.show-queries.md) statement. 19 | 20 | ## Examples 21 | 22 | This example executes `KILL QUERY` in one session to terminate the query in another session. 23 | 24 | ```ngql 25 | nebula> KILL QUERY(SESSION=1625553545984255,PLAN=163); 26 | ``` 27 | 28 | The query will be terminated and the following information will be returned. 29 | 30 | ```ngql 31 | [ERROR (-1005)]: ExecutionPlanId[1001] does not exist in current Session. 32 | ``` 33 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/3.data-types/2.boolean.md: -------------------------------------------------------------------------------- 1 | # Boolean 2 | 3 | A boolean data type is declared with the `bool` keyword and can only take the values `true` or `false`. 4 | 5 | nGQL supports using boolean in the following ways: 6 | 7 | * Define the data type of the property value as a boolean. 8 | * Use boolean as judgment conditions in the `WHERE` clause. 9 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/3.data-types/9.type-conversion.md: -------------------------------------------------------------------------------- 1 | # Type Conversion/Type coercions 2 | 3 | Converting an expression of a given type to another type is known as type conversion. 4 | 5 | NebulaGraph supports converting expressions explicit to other types. For details, see [Type conversion functions](../6.functions-and-expressions/16.type-conversion.md). 6 | 7 | ## Examples 8 | 9 | ```ngql 10 | nebula> UNWIND [true, false, 'true', 'false', NULL] AS b \ 11 | RETURN toBoolean(b) AS b; 12 | +----------+ 13 | | b | 14 | +----------+ 15 | | true | 16 | | false | 17 | | true | 18 | | false | 19 | | __NULL__ | 20 | +----------+ 21 | 22 | nebula> RETURN toFloat(1), toFloat('1.3'), toFloat('1e3'), toFloat('not a number'); 23 | +------------+----------------+----------------+-------------------------+ 24 | | toFloat(1) | toFloat("1.3") | toFloat("1e3") | toFloat("not a number") | 25 | +------------+----------------+----------------+-------------------------+ 26 | | 1.0 | 1.3 | 1000.0 | __NULL__ | 27 | +------------+----------------+----------------+-------------------------+ 28 | ``` 29 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/5.operators/.3.bitwise.md: -------------------------------------------------------------------------------- 1 | # Bitwise operators 2 | 3 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/5.operators/10.arithmetic.md: -------------------------------------------------------------------------------- 1 | # Arithmetic operators 2 | 3 | NebulaGraph supports the following arithmetic operators. 4 | 5 | | Name | Description | 6 | | :---- | :----: | 7 | | `+` | Addition operator | 8 | | `-` | Minus operator | 9 | | `*` | Multiplication operator | 10 | | `/` | Division operator | 11 | | `%` | Modulo operator | 12 | | `-` | Changes the sign of the argument | 13 | 14 | ## Examples 15 | 16 | ```ngql 17 | nebula> RETURN 1+2 AS result; 18 | +--------+ 19 | | result | 20 | +--------+ 21 | | 3 | 22 | +--------+ 23 | 24 | nebula> RETURN -10+5 AS result; 25 | +--------+ 26 | | result | 27 | +--------+ 28 | | -5 | 29 | +--------+ 30 | 31 | nebula> RETURN (3*8)%5 AS result; 32 | +--------+ 33 | | result | 34 | +--------+ 35 | | 4 | 36 | +--------+ 37 | ``` -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/5.operators/2.boolean.md: -------------------------------------------------------------------------------- 1 | # Boolean operators 2 | 3 | NebulaGraph supports the following boolean operators. 4 | 5 | | Name | Description | 6 | | :------- | :-------------: | 7 | | AND | Logical AND | 8 | | NOT | Logical NOT | 9 | | OR | Logical OR | 10 | | XOR | Logical XOR | 11 | 12 | For the precedence of the operators, refer to [Operator Precedence](9.precedence.md). 13 | 14 | For the logical operations with `NULL`, refer to [NULL](../3.data-types/5.null.md). 15 | 16 | ## Legacy version compatibility 17 | 18 | * Non-zero numbers cannot be converted to boolean values. 19 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/5.operators/4.pipe.md: -------------------------------------------------------------------------------- 1 | # Pipe operators 2 | 3 | Multiple queries can be combined using pipe operators in nGQL. 4 | 5 | ## OpenCypher compatibility 6 | 7 | Pipe operators apply to native nGQL only. 8 | 9 | ## Syntax 10 | 11 | One major difference between nGQL and SQL is how sub-queries are composed. 12 | 13 | - In SQL, sub-queries are nested in the query statements. 14 | 15 | - In nGQL, the shell style `PIPE (|)` is introduced into the sub-queries. 16 | 17 | ## Examples 18 | 19 | ```ngql 20 | nebula> GO FROM "player100" OVER follow \ 21 | YIELD dst(edge) AS dstid, properties($$).name AS Name | \ 22 | GO FROM $-.dstid OVER follow YIELD dst(edge); 23 | 24 | +-------------+ 25 | | dst(EDGE) | 26 | +-------------+ 27 | | "player100" | 28 | | "player102" | 29 | | "player125" | 30 | | "player100" | 31 | +-------------+ 32 | ``` 33 | 34 | Users must define aliases in the `YIELD` clause for the reference operator `$-` to use, just like `$-.dstid` in the preceding example. 35 | 36 | ## Performance tips 37 | 38 | In NebulaGraph, pipes will affect the performance. Take `A | B` as an example, the effects are as follows: 39 | 40 | 1. Pipe operators operate synchronously. That is, the data can enter the pipe clause as a whole after the execution of clause `A` before the pipe operator is completed. 41 | 42 | 2. If `A` sends a large amount of data to `|`, the entire query request may be very slow. You can try to split this statement. 43 | 44 | 1. Send `A` from the application, 45 | 46 | 2. Split the return results on the application, 47 | 48 | 3. Send to multiple graphd processes concurrently, 49 | 50 | 4. Every graphd process executes part of B. 51 | 52 | This is usually much faster than executing a complete `A | B` with a single graphd process. 53 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/5.operators/8.list.md: -------------------------------------------------------------------------------- 1 | # List operators 2 | 3 | NebulaGraph supports the following list operators: 4 | 5 | | List operator | Description | 6 | | :----- | :------------------ | 7 | | + | Concatenates lists. | 8 | | IN | Checks if an element exists in a list. | 9 | | [] | Accesses an element(s) in a list using the index operator. | 10 | 11 | ## Examples 12 | 13 | ```ngql 14 | nebula> YIELD [1,2,3,4,5]+[6,7] AS myList; 15 | +-----------------------+ 16 | | myList | 17 | +-----------------------+ 18 | | [1, 2, 3, 4, 5, 6, 7] | 19 | +-----------------------+ 20 | 21 | nebula> RETURN size([NULL, 1, 2]); 22 | +------------------+ 23 | | size([NULL,1,2]) | 24 | +------------------+ 25 | | 3 | 26 | +------------------+ 27 | 28 | nebula> RETURN NULL IN [NULL, 1]; 29 | +--------------------+ 30 | | (NULL IN [NULL,1]) | 31 | +--------------------+ 32 | | __NULL__ | 33 | +--------------------+ 34 | 35 | nebula> WITH [2, 3, 4, 5] AS numberlist \ 36 | UNWIND numberlist AS number \ 37 | WITH number \ 38 | WHERE number IN [2, 3, 8] \ 39 | RETURN number; 40 | +--------+ 41 | | number | 42 | +--------+ 43 | | 2 | 44 | | 3 | 45 | +--------+ 46 | 47 | nebula> WITH ['Anne', 'John', 'Bill', 'Diane', 'Eve'] AS names RETURN names[1] AS result; 48 | +--------+ 49 | | result | 50 | +--------+ 51 | | "John" | 52 | +--------+ 53 | ``` 54 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/5.operators/9.precedence.md: -------------------------------------------------------------------------------- 1 | # Operator precedence 2 | 3 | The following list shows the precedence of nGQL operators in descending order. Operators that are shown together on a line have the same precedence. 4 | 5 | - `-` (negative number) 6 | - `!`, `NOT` 7 | - `*`, `/`, `%` 8 | - `-`, `+` 9 | - `==`, `>=`, `>`, `<=`, `<`, `<>`, `!=` 10 | - `AND` 11 | - `OR`, `XOR` 12 | - `=` (assignment) 13 | 14 | For operators that occur at the same precedence level within an expression, evaluation proceeds left to right, with the exception that assignments evaluate right to left. 15 | 16 | The precedence of operators determines the order of evaluation of terms in an expression. To modify this order and group terms explicitly, use parentheses. 17 | 18 | ## Examples 19 | 20 | ```ngql 21 | nebula> RETURN 2+3*5; 22 | +-----------+ 23 | | (2+(3*5)) | 24 | +-----------+ 25 | | 17 | 26 | +-----------+ 27 | 28 | nebula> RETURN (2+3)*5; 29 | +-----------+ 30 | | ((2+3)*5) | 31 | +-----------+ 32 | | 25 | 33 | +-----------+ 34 | ``` 35 | 36 | ## OpenCypher compatibility 37 | 38 | In openCypher, comparisons can be chained arbitrarily, e.g., `x < y <= z` is equivalent to `x < y AND y <= z` in openCypher. 39 | 40 | But in nGQL, `x < y <= z` is equivalent to `(x < y) <= z`. The result of `(x < y)` is a boolean. Compare it with an integer `z`, and you will get the final result `NULL`. 41 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/6.functions-and-expressions/3.date-and-time.md: -------------------------------------------------------------------------------- 1 | # Built-in date and time functions 2 | 3 | NebulaGraph supports the following built-in date and time functions: 4 | 5 | | Function | Description | 6 | |:-- |:-- | 7 | | int now() | Returns the current timestamp of the system. | 8 | | timestamp timestamp() | Returns the current timestamp of the system. | 9 | | date date() | Returns the current UTC date based on the current system. | 10 | | time time() | Returns the current UTC time based on the current system. | 11 | | datetime datetime() | Returns the current UTC date and time based on the current system. | 12 | | map duration() | Returns the period of time. It can be used to calculate the specified time. | 13 | 14 | For more information, see [Date and time types](../3.data-types/4.date-and-time.md). 15 | 16 | ## Examples 17 | 18 | ```ngql 19 | nebula> RETURN now(), timestamp(), date(), time(), datetime(); 20 | +------------+-------------+------------+-----------------+----------------------------+ 21 | | now() | timestamp() | date() | time() | datetime() | 22 | +------------+-------------+------------+-----------------+----------------------------+ 23 | | 1640057560 | 1640057560 | 2021-12-21 | 03:32:40.351000 | 2021-12-21T03:32:40.351000 | 24 | +------------+-------------+------------+-----------------+----------------------------+ 25 | ``` 26 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/6.functions-and-expressions/9.user-defined-functions.md: -------------------------------------------------------------------------------- 1 | # User-defined functions 2 | 3 | ## OpenCypher compatibility 4 | 5 | User-defined functions (UDF) and storage processes are not yet supported nor designed in NebulaGraph {{ nebula.release }}. 6 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md: -------------------------------------------------------------------------------- 1 | # SHOW CHARSET 2 | 3 | The `SHOW CHARSET` statement shows the available character sets. 4 | 5 | Currently available types are `utf8` and `utf8mb4`. The default charset type is `utf8`. NebulaGraph extends the `uft8` to support four-byte characters. Therefore `utf8` and `utf8mb4` are equivalent. 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW CHARSET; 11 | ``` 12 | 13 | ## Example 14 | 15 | ```ngql 16 | nebula> SHOW CHARSET; 17 | +---------+-----------------+-------------------+--------+ 18 | | Charset | Description | Default collation | Maxlen | 19 | +---------+-----------------+-------------------+--------+ 20 | | "utf8" | "UTF-8 Unicode" | "utf8_bin" | 4 | 21 | +---------+-----------------+-------------------+--------+ 22 | ``` 23 | 24 | | Parameter | Description | 25 | |---------------------|--------------------------------------------------------------| 26 | | `Charset` | The name of the character set. | 27 | | `Description` | The description of the character set. | 28 | | `Default collation` | The default collation of the character set. | 29 | | `Maxlen` | The maximum number of bytes required to store one character. | 30 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/10.show-roles.md: -------------------------------------------------------------------------------- 1 | # SHOW ROLES 2 | 3 | The `SHOW ROLES` statement shows the roles that are assigned to a user account. 4 | 5 | The return message differs according to the role of the user who is running this statement: 6 | 7 | * If the user is a `GOD` or `ADMIN` and is granted access to the specified graph space, NebulaGraph shows all roles in this graph space except for `GOD`. 8 | 9 | * If the user is a `DBA`, `USER`, or `GUEST` and is granted access to the specified graph space, NebulaGraph shows the user's own role in this graph space. 10 | 11 | * If the user does not have access to the specified graph space, NebulaGraph returns `PermissionError`. 12 | 13 | For more information about roles, see [Roles and privileges](../../../7.data-security/1.authentication/3.role-list.md). 14 | 15 | ## Syntax 16 | 17 | ```ngql 18 | SHOW ROLES IN ; 19 | ``` 20 | 21 | ## Example 22 | 23 | ```ngql 24 | nebula> SHOW ROLES in basketballplayer; 25 | +---------+-----------+ 26 | | Account | Role Type | 27 | +---------+-----------+ 28 | | "user1" | "ADMIN" | 29 | +---------+-----------+ 30 | ``` 31 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md: -------------------------------------------------------------------------------- 1 | # SHOW SNAPSHOTS 2 | 3 | The `SHOW SNAPSHOTS` statement shows the information of all the snapshots. 4 | 5 | For how to create a snapshot and backup data, see [Snapshot](../../../backup-and-restore/3.manage-snapshot.md). 6 | 7 | ## Role requirement 8 | 9 | Only the `root` user who has the `GOD` role can use the `SHOW SNAPSHOTS` statement. 10 | 11 | ## Syntax 12 | 13 | ```ngql 14 | SHOW SNAPSHOTS; 15 | ``` 16 | 17 | ## Example 18 | 19 | ```ngql 20 | nebula> SHOW SNAPSHOTS; 21 | +--------------------------------+---------+-----------------------------------------------------+ 22 | | Name | Status | Hosts | 23 | +--------------------------------+---------+-----------------------------------------------------+ 24 | | "SNAPSHOT_2020_12_16_11_13_55" | "VALID" | "storaged0:9779, storaged1:9779, storaged2:9779" | 25 | | "SNAPSHOT_2020_12_16_11_14_10" | "VALID" | "storaged0:9779, storaged1:9779, storaged2:9779" | 26 | +--------------------------------+---------+-----------------------------------------------------+ 27 | ``` 28 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md: -------------------------------------------------------------------------------- 1 | # SHOW SPACES 2 | 3 | The `SHOW SPACES` statement shows existing graph spaces in NebulaGraph. 4 | 5 | For how to create a graph space, see [CREATE SPACE](./../../9.space-statements/1.create-space.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW SPACES; 11 | ``` 12 | 13 | ## Example 14 | 15 | ```ngql 16 | nebula> SHOW SPACES; 17 | +---------------------+ 18 | | Name | 19 | +---------------------+ 20 | | "docs" | 21 | | "basketballplayer" | 22 | +---------------------+ 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md: -------------------------------------------------------------------------------- 1 | # SHOW TAGS/EDGES 2 | 3 | The `SHOW TAGS` statement shows all the tags in the current graph space. 4 | 5 | The `SHOW EDGES` statement shows all the edge types in the current graph space. 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW {TAGS | EDGES}; 11 | ``` 12 | 13 | ## Examples 14 | 15 | ```ngql 16 | nebula> SHOW TAGS; 17 | +----------+ 18 | | Name | 19 | +----------+ 20 | | "player" | 21 | | "star" | 22 | | "team" | 23 | +----------+ 24 | 25 | nebula> SHOW EDGES; 26 | +----------+ 27 | | Name | 28 | +----------+ 29 | | "follow" | 30 | | "serve" | 31 | +----------+ 32 | ``` 33 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/16.show-users.md: -------------------------------------------------------------------------------- 1 | # SHOW USERS 2 | 3 | The `SHOW USERS` statement shows the user information. 4 | 5 | ## Role requirement 6 | 7 | Only the `root` user who has the `GOD` role can use the `SHOW USERS` statement. 8 | 9 | ## Syntax 10 | 11 | ```ngql 12 | SHOW USERS; 13 | ``` 14 | 15 | ## Example 16 | 17 | ```ngql 18 | nebula> SHOW USERS; 19 | +---------+-----------------+ 20 | | Account | IP Whitelist | 21 | +---------+-----------------+ 22 | | "root" | "" | 23 | | "user1" | "" | 24 | | "user2" | "192.168.10.10" | 25 | +---------+-----------------+ 26 | ``` 27 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md: -------------------------------------------------------------------------------- 1 | # SHOW META LEADER 2 | 3 | The `SHOW META LEADER` statement shows the information of the leader in the current Meta cluster. 4 | 5 | For more information about the Meta service, see [Meta service](../../../1.introduction/3.nebula-graph-architecture/2.meta-service.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW META LEADER; 11 | ``` 12 | 13 | ## Example 14 | 15 | ```ngql 16 | nebula> SHOW META LEADER; 17 | +------------------+---------------------------+ 18 | | Meta Leader | secs from last heart beat | 19 | +------------------+---------------------------+ 20 | | "127.0.0.1:9559" | 3 | 21 | +------------------+---------------------------+ 22 | ``` 23 | 24 | | Parameter | Description | 25 | | :--- | :--- | 26 | | `Meta Leader` | Shows the information of the leader in the Meta cluster, including the IP (or hostname) and port of the server where the leader is located. | 27 | | `secs from last heart beat` | Indicates the time interval since the last heartbeat. This parameter is measured in seconds. | 28 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/2.show-collation.md: -------------------------------------------------------------------------------- 1 | # SHOW COLLATION 2 | 3 | The `SHOW COLLATION` statement shows the collations supported by NebulaGraph. 4 | 5 | Currently available types are: `utf8_bin` and `utf8mb4_bin`. 6 | 7 | - When the character set is `utf8`, the default collate is `utf8_bin`. 8 | 9 | - When the character set is `utf8mb4`, the default collate is `utf8mb4_bin`. 10 | 11 | ## Syntax 12 | 13 | ```ngql 14 | SHOW COLLATION; 15 | ``` 16 | 17 | ## Example 18 | 19 | ```ngql 20 | nebula> SHOW COLLATION; 21 | +------------+---------+ 22 | | Collation | Charset | 23 | +------------+---------+ 24 | | "utf8_bin" | "utf8" | 25 | +------------+---------+ 26 | ``` 27 | 28 | |Parameter|Description| 29 | |-|-| 30 | |`Collation`|The name of the collation.| 31 | |`Charset`|The name of the character set with which the collation is associated.| 32 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md: -------------------------------------------------------------------------------- 1 | # SHOW CREATE SPACE 2 | 3 | The `SHOW CREATE SPACE` statement shows the creating statement of the specified graph space. 4 | 5 | For details about the graph space information, see [CREATE SPACE](../../9.space-statements/1.create-space.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW CREATE SPACE ; 11 | ``` 12 | 13 | ## Example 14 | 15 | ```ngql 16 | nebula> SHOW CREATE SPACE basketballplayer; 17 | +--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ 18 | | Space | Create Space | 19 | +--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ 20 | | "basketballplayer" | "CREATE SPACE `basketballplayer` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32))" | 21 | +--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ 22 | ``` 23 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/5.show-create-tag-edge.md: -------------------------------------------------------------------------------- 1 | # SHOW CREATE TAG/EDGE 2 | 3 | The `SHOW CREATE TAG` statement shows the basic information of the specified tag. For details about the tag, see [CREATE TAG](../../10.tag-statements/1.create-tag.md). 4 | 5 | The `SHOW CREATE EDGE` statement shows the basic information of the specified edge type. For details about the edge type, see [CREATE EDGE](../../11.edge-type-statements/1.create-edge.md). 6 | 7 | ## Syntax 8 | 9 | ```ngql 10 | SHOW CREATE {TAG | EDGE }; 11 | ``` 12 | 13 | ## Examples 14 | 15 | ```ngql 16 | nebula> SHOW CREATE TAG player; 17 | +----------+-----------------------------------+ 18 | | Tag | Create Tag | 19 | +----------+-----------------------------------+ 20 | | "player" | "CREATE TAG `player` ( | 21 | | | `name` string NULL, | 22 | | | `age` int64 NULL | 23 | | | ) ttl_duration = 0, ttl_col = """ | 24 | +----------+-----------------------------------+ 25 | 26 | nebula> SHOW CREATE EDGE follow; 27 | +----------+-----------------------------------+ 28 | | Edge | Create Edge | 29 | +----------+-----------------------------------+ 30 | | "follow" | "CREATE EDGE `follow` ( | 31 | | | `degree` int64 NULL | 32 | | | ) ttl_duration = 0, ttl_col = """ | 33 | +----------+-----------------------------------+ 34 | ``` 35 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEX STATUS 2 | 3 | The `SHOW INDEX STATUS` statement shows the status of jobs that rebuild native indexes, which helps check whether a native index is successfully rebuilt or not. 4 | 5 | ## Syntax 6 | 7 | ```ngql 8 | SHOW {TAG | EDGE} INDEX STATUS; 9 | ``` 10 | 11 | ## Examples 12 | 13 | ```ngql 14 | nebula> SHOW TAG INDEX STATUS; 15 | +------------------------------------+--------------+ 16 | | Name | Index Status | 17 | +------------------------------------+--------------+ 18 | | "date1_index" | "FINISHED" | 19 | | "basketballplayer_all_tag_indexes" | "FINISHED" | 20 | | "any_shape_geo_index" | "FINISHED" | 21 | +------------------------------------+--------------+ 22 | 23 | nebula> SHOW EDGE INDEX STATUS; 24 | +----------------+--------------+ 25 | | Name | Index Status | 26 | +----------------+--------------+ 27 | | "follow_index" | "FINISHED" | 28 | +----------------+--------------+ 29 | ``` 30 | 31 | ## Related topics 32 | 33 | * [Job manager and the JOB statements](../../4.job-statements.md) 34 | * [REBUILD NATIVE INDEX](../../14.native-index-statements/4.rebuild-native-index.md) 35 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEXES 2 | 3 | The `SHOW INDEXES` statement shows the names of existing native indexes. 4 | 5 | ## Syntax 6 | 7 | ```ngql 8 | SHOW {TAG | EDGE} INDEXES; 9 | ``` 10 | 11 | ## Examples 12 | 13 | ```ngql 14 | nebula> SHOW TAG INDEXES; 15 | +------------------+----------+----------+ 16 | | Index Name | By Tag | Columns | 17 | +------------------+----------+----------+ 18 | | "player_index_0" | "player" | [] | 19 | | "player_index_1" | "player" | ["name"] | 20 | +------------------+----------+----------+ 21 | 22 | nebula> SHOW EDGE INDEXES; 23 | +----------------+----------+---------+ 24 | | Index Name | By Edge | Columns | 25 | +----------------+----------+---------+ 26 | | "follow_index" | "follow" | [] | 27 | +----------------+----------+---------+ 28 | ``` 29 | 30 | !!! compatibility "Legacy version compatibility" 31 | 32 | In NebulaGraph 2.x, `SHOW TAG/EDGE INDEXES` only returns `Names`. 33 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/9.space-statements/2.use-space.md: -------------------------------------------------------------------------------- 1 | # USE 2 | 3 | `USE` specifies a graph space as the current working graph space for subsequent queries. 4 | 5 | ## Prerequisites 6 | 7 | Running the `USE` statement requires some [privileges](../../7.data-security/1.authentication/3.role-list.md) for the graph space. Otherwise, NebulaGraph throws an error. 8 | 9 | ## Syntax 10 | 11 | ```ngql 12 | USE ; 13 | ``` 14 | 15 | ## Examples 16 | 17 | ```ngql 18 | # The following example creates two sample spaces. 19 | nebula> CREATE SPACE IF NOT EXISTS space1 (vid_type=FIXED_STRING(30)); 20 | nebula> CREATE SPACE IF NOT EXISTS space2 (vid_type=FIXED_STRING(30)); 21 | 22 | # The following example specifies space1 as the current working graph space. 23 | nebula> USE space1; 24 | 25 | # The following example specifies space2 as the current working graph space. Hereafter, you cannot read any data from space1, because these vertices and edges being traversed have no relevance with space1. 26 | nebula> USE space2; 27 | ``` 28 | 29 | !!! caution 30 | 31 | You cannot use two graph spaces in one statement. 32 | 33 | Different from Fabric Cypher, graph spaces in NebulaGraph are fully isolated from each other. Making a graph space as the working graph space prevents you from accessing other spaces. The only way to traverse in a new graph space is to switch by the `USE` statement. In Fabric Cypher, you can use two graph spaces in one statement (using the `USE + CALL` syntax). But in NebulaGraph, you can only use one graph space in one statement. 34 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/9.space-statements/3.show-spaces.md: -------------------------------------------------------------------------------- 1 | # SHOW SPACES 2 | 3 | `SHOW SPACES` lists all the graph spaces in the NebulaGraph examples. 4 | 5 | ## Syntax 6 | 7 | ```ngql 8 | SHOW SPACES; 9 | ``` 10 | 11 | ## Example 12 | 13 | ```ngql 14 | nebula> SHOW SPACES; 15 | +--------------------+ 16 | | Name | 17 | +--------------------+ 18 | | "cba" | 19 | | "basketballplayer" | 20 | +--------------------+ 21 | ``` 22 | 23 | To create graph spaces, see [CREATE SPACE](1.create-space.md). 24 | -------------------------------------------------------------------------------- /docs-2.0-en/3.ngql-guide/9.space-statements/4.describe-space.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE SPACE 2 | 3 | `DESCRIBE SPACE` returns the information about the specified graph space. 4 | 5 | ## Syntax 6 | 7 | You can use `DESC` instead of `DESCRIBE` for short. 8 | 9 | ```ngql 10 | DESC[RIBE] SPACE ; 11 | ``` 12 | 13 | The `DESCRIBE SPACE` statement is different from the `SHOW SPACES` statement. For details about `SHOW SPACES`, see [SHOW SPACES](3.show-spaces.md). 14 | 15 | ## Example 16 | 17 | ```ngql 18 | nebula> DESCRIBE SPACE basketballplayer; 19 | +----+--------------------+------------------+----------------+---------+------------+--------------------+---------+ 20 | | ID | Name | Partition Number | Replica Factor | Charset | Collate | Vid Type | Comment | 21 | +----+--------------------+------------------+----------------+---------+------------+--------------------+---------+ 22 | | 1 | "basketballplayer" | 10 | 1 | "utf8" | "utf8_bin" | "FIXED_STRING(32)" | | 23 | +----+--------------------+------------------+----------------+---------+------------+--------------------+---------+ 24 | ``` 25 | -------------------------------------------------------------------------------- /docs-2.0-en/4.deployment-and-installation/2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb.md: -------------------------------------------------------------------------------- 1 | # Install NebulaGraph with RPM or DEB package 2 | 3 | {% include "/source_install-nebula-graph-by-rpm-or-deb.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-en/4.deployment-and-installation/2.compile-and-install-nebula-graph/6.deploy-nebula-graph-with-peripherals.md: -------------------------------------------------------------------------------- 1 | # Install NebulaGraph with ecosystem tools 2 | 3 | You can install the NebulaGraph Community Edition with the following ecosystem tools: 4 | 5 | - NebulaGraph Operator 6 | 7 | ## Installation details 8 | 9 | - To install NebulaGraph with **NebulaGraph Operator**, see [Install NebulaGraph clusters](../../k8s-operator/4.cluster-administration/4.1.installation/4.1.1.cluster-install.md). 10 | -------------------------------------------------------------------------------- /docs-2.0-en/4.deployment-and-installation/connect-to-nebula-graph.md: -------------------------------------------------------------------------------- 1 | # Connect to NebulaGraph 2 | 3 | {% include "/source_connect-to-nebula-graph.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-en/4.deployment-and-installation/manage-service.md: -------------------------------------------------------------------------------- 1 | # Manage NebulaGraph Service 2 | 3 | {% include "/source_manage-service.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-en/8.service-tuning/4.plan.md: -------------------------------------------------------------------------------- 1 | # Execution plan 2 | 3 | NebulaGraph {{ nebula.release }} applies rule-based execution plans. Users cannot change execution plans, pre-compile queries (and corresponding plan cache), or accelerate queries by specifying indexes. 4 | 5 | To view the execution plan and executive summary, see [EXPLAIN and PROFILE](../3.ngql-guide/17.query-tuning-statements/1.explain-and-profile.md). 6 | -------------------------------------------------------------------------------- /docs-2.0-en/8.service-tuning/practice.md: -------------------------------------------------------------------------------- 1 | # Best practices 2 | 3 | NebulaGraph is used in a variety of industries. This topic presents a few best practices for using NebulaGraph. For more best practices, see [Blog](https://nebula-graph.io/posts/). 4 | 5 | ## Scenarios 6 | 7 | - [Use cases](https://nebula-graph.io/tags/use-cases/) 8 | 9 | - [User review](https://nebula-graph.io/tags/user-review/) 10 | 11 | - [Performance](https://nebula-graph.io/tags/performance/) 12 | 13 | ## Kernel 14 | 15 | - [What is a graph database and what are its use cases - Definition, examples & trends](https://nebula-graph.io/posts/what-is-a-graph-database) 16 | 17 | - [NebulaGraph Source Code Explained: Variable-Length Pattern Matching](https://nebula-graph.io/posts/nebula-graph-source-code-reading-06/) 18 | 19 | - [Adding a Test Case for NebulaGraph](https://nebula-graph.io/posts/add-test-case-nebula-graph/) 20 | 21 | - [BDD-Based Integration Testing Framework for NebulaGraph: Part Ⅰ](https://nebula-graph.io/posts/bdd-testing-practice/) 22 | 23 | - [BDD-Based Integration Testing Framework for NebulaGraph: Part II](https://nebula-graph.io/posts/bdd-testing-practice-volume-2/) 24 | 25 | - [Understanding Subgraph in NebulaGraph](https://nebula-graph.io/posts/nebula-graph-subgraph-introduction/) 26 | 27 | - [Full-Text Indexing in NebulaGraph](https://nebula-graph.io/posts/how-fulltext-index-works/) 28 | 29 | ## Ecosystem tool 30 | 31 | - [Validating Import Performance of NebulaGraph Importer](https://nebula-graph.io/posts/nebula-importer-practice/) 32 | 33 | - [Ecosystem Tools: NebulaGraph Dashboard for Monitoring](https://nebula-graph.io/posts/what-is-nebula-dashboard/) 34 | 35 | - [Visualizing Graph Data with NebulaGraph Explorer](https://nebula-graph.io/posts/what-is-nebula-explorer/) 36 | -------------------------------------------------------------------------------- /docs-2.0-en/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs-2.0-en/css/version-select.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width:76.1875em) { 2 | #version-selector { 3 | padding: .6rem .8rem; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /docs-2.0-en/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vesoft-inc/nebula-docs/4adcf3fa59bfcf3ab630794db6e1b6fd4ada3de5/docs-2.0-en/icon/favicon.ico -------------------------------------------------------------------------------- /docs-2.0-en/icon/兼容compatibility.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs-2.0-en/icon/放大镜note.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs-2.0-en/icon/炸弹danger.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs-2.0-en/import-export/nebula-exchange/about-exchange/ex-ug-limitations.md: -------------------------------------------------------------------------------- 1 | # Limitations 2 | 3 | This topic describes some of the limitations of using Exchange 3.x. 4 | 5 | ## Environment 6 | 7 | Exchange 3.x supports the following operating systems: 8 | 9 | - CentOS 7 10 | - macOS 11 | 12 | ## Software dependencies 13 | 14 | To ensure the healthy operation of Exchange, ensure that the following software has been installed on the machine: 15 | 16 | - Java version 1.8 17 | 18 | - Scala version 2.10.7, 2.11.12, or 2.12.10 19 | 20 | - Apache Spark. The requirements for Spark versions when using Exchange to export data from data sources are as follows. In the following table, Y means that the corresponding Spark version is supported, and N means not supported. 21 | 22 | !!! note 23 | Use the correct Exchange JAR file based on the Spark version. For example, for Spark version 2.4, use nebula-exchange_spark_2.4-{{exchange.release}}.jar. 24 | 25 | | Data source | Spark 2.2 | Spark 2.4 | Spark 3 | 26 | | - | - | - | - | 27 | | CSV file | Y | N | Y | 28 | | JSON file | Y | Y | Y | 29 | | ORC file | Y | Y | Y | 30 | | Parquet file | Y | Y | Y | 31 | | HBase | Y | Y | Y | 32 | | MySQL | Y | Y | Y | 33 | | PostgreSQL | Y | Y | Y | 34 | | Oracle | Y | Y | Y | 35 | | ClickHouse | Y | Y | Y | 36 | | Neo4j | N | Y | N | 37 | | Hive | Y | Y | Y | 38 | | MaxCompute | N | Y | N | 39 | | Pulsar | N | Y | Untested | 40 | | Kafka | N | Y | Untested | 41 | | NebulaGraph | N | Y | N | 42 | 43 | Hadoop Distributed File System (HDFS) needs to be deployed in the following scenarios: 44 | 45 | - Migrate HDFS data 46 | - Generate SST files 47 | -------------------------------------------------------------------------------- /docs-2.0-en/js/config.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | tex: { 3 | inlineMath: [["\\(", "\\)"]], 4 | displayMath: [["\\[", "\\]"]], 5 | processEscapes: true, 6 | processEnvironments: true 7 | }, 8 | options: { 9 | ignoreHtmlClass: ".*|", 10 | processHtmlClass: "arithmatex" 11 | } 12 | }; 13 | 14 | document$.subscribe(() => { 15 | MathJax.typesetPromise() 16 | }) -------------------------------------------------------------------------------- /docs-2.0-en/js/hotjar.js: -------------------------------------------------------------------------------- 1 | // Hotjar Tracking Code for https://docs.nebula-graph.io/ 2 | 3 | (function (h, o, t, j, a, r) { 4 | h.hj = h.hj || function () { (h.hj.q = h.hj.q || []).push(arguments) }; 5 | h._hjSettings = { hjid: 2875713, hjsv: 6 }; 6 | a = o.getElementsByTagName('head')[0]; 7 | r = o.createElement('script'); r.async = 1; 8 | r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv; 9 | a.appendChild(r); 10 | })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv='); 11 | -------------------------------------------------------------------------------- /docs-2.0-en/js/version-select.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("DOMContentLoaded", function() { 2 | // This is a bit hacky. Figure out the base URL from a known CSS file the 3 | // template refers to... 4 | var ex = new RegExp("/?css/version-select.css$"); 5 | var sheet = document.querySelector('link[href$="version-select.css"]'); 6 | 7 | var ABS_BASE_URL = sheet.href.replace(ex, ""); 8 | var CURRENT_VERSION = ABS_BASE_URL.split("/").pop(); 9 | 10 | function makeSelect(options, selected) { 11 | var select = document.createElement("select"); 12 | select.classList.add("form-control"); 13 | 14 | options.forEach(function(i) { 15 | var option = new Option(i.text, i.value, undefined, 16 | i.value === selected); 17 | select.add(option); 18 | }); 19 | 20 | return select; 21 | } 22 | 23 | var xhr = new XMLHttpRequest(); 24 | xhr.open("GET", ABS_BASE_URL + "/../versions.json"); 25 | xhr.onload = function() { 26 | var versions = JSON.parse(this.responseText); 27 | 28 | var realVersion = versions.find(function(i) { 29 | return i.version === CURRENT_VERSION || 30 | i.aliases.includes(CURRENT_VERSION); 31 | }).version; 32 | 33 | var select = makeSelect(versions.map(function(i) { 34 | return {text: i.title, value: i.version}; 35 | }), realVersion); 36 | select.addEventListener("change", function(event) { 37 | window.location.href = ABS_BASE_URL + "/../" + this.value; 38 | }); 39 | 40 | var container = document.createElement("div"); 41 | container.id = "version-selector"; 42 | container.className = "md-nav__item"; 43 | container.appendChild(select); 44 | 45 | var sidebar = document.querySelector(".md-nav--primary > .md-nav__list"); 46 | sidebar.parentNode.insertBefore(container, sidebar); 47 | }; 48 | xhr.send(); 49 | }); 50 | -------------------------------------------------------------------------------- /docs-2.0-en/k8s-operator/3.operator-management/3.2.update-operator.md: -------------------------------------------------------------------------------- 1 | # Update NebulaGraph Operator 2 | 3 | This topic introduces how to update the configuration of NebulaGraph Operator. 4 | 5 | ## Steps 6 | 7 | 1. Update the information of available charts locally from chart repositories. 8 | 9 | ```bash 10 | helm repo update 11 | ``` 12 | 13 | 2. View the default values of NebulaGraph Operator. 14 | 15 | ```bash 16 | helm show values nebula-operator/nebula-operator 17 | ``` 18 | 19 | 3. Update NebulaGraph Operator by passing configuration parameters via `--set`. 20 | 21 | - `--set`:Overrides values using the command line. For more configurable items, see [Customize installation defaults](3.1.customize-installation.md). 22 | 23 | For example, to enable the AdmissionWebhook, run the following command: 24 | 25 | ```bash 26 | helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=nebula-operator-system --version={{operator.release}} --set admissionWebhook.create=true 27 | ``` 28 | 29 | For more information, see [Helm upgrade](https://helm.sh/docs/helm/helm_upgrade/). 30 | 31 | 4. Check whether the configuration of NebulaGraph Operator is updated successfully. 32 | 33 | ```bash 34 | helm get values nebula-operator -n nebula-operator-system 35 | ``` 36 | 37 | Example output: 38 | 39 | ```yaml 40 | USER-SUPPLIED VALUES: 41 | admissionWebhook: 42 | create: true 43 | ``` 44 | -------------------------------------------------------------------------------- /docs-2.0-en/k8s-operator/3.operator-management/3.4.unistall-operator.md: -------------------------------------------------------------------------------- 1 | # Uninstall NebulaGraph Operator 2 | 3 | This topic introduces how to uninstall NebulaGraph Operator. 4 | 5 | ## Steps 6 | 7 | 1. Uninstall the NebulaGraph Operator chart. 8 | 9 | ```bash 10 | helm uninstall nebula-operator --namespace= 11 | ``` 12 | 13 | 2. View the information about the default-created CRD. 14 | 15 | ```bash 16 | kubectl get crd 17 | ``` 18 | 19 | Output: 20 | 21 | ```bash 22 | NAME CREATED AT 23 | nebulaautoscalers.autoscaling.nebula-graph.io 2023-11-01T04:16:51Z 24 | nebulaclusters.apps.nebula-graph.io 2023-10-12T07:55:32Z 25 | nebularestores.apps.nebula-graph.io 2023-02-04T23:01:00Z 26 | ``` 27 | 28 | 3. Delete CRD. 29 | 30 | ```bash 31 | kubectl delete crd nebulaclusters.apps.nebula-graph.io nebularestores.apps.nebula-graph.io nebulaautoscalers.autoscaling.nebula-graph.io 32 | ``` -------------------------------------------------------------------------------- /docs-2.0-en/k8s-operator/4.cluster-administration/4.8.ha-and-balancing/4.8.1.self-healing.md: -------------------------------------------------------------------------------- 1 | # Self-healing 2 | 3 | NebulaGraph Operator calls the interface provided by NebulaGraph clusters to dynamically sense cluster service status. Once an exception is detected (for example, a component in a NebulaGraph cluster stops running), NebulaGraph Operator automatically performs fault tolerance. This topic shows how Nebular Operator performs self-healing by simulating cluster failure of deleting one Storage service Pod in a NebulaGraph cluster. 4 | 5 | ## Prerequisites 6 | 7 | [Install NebulaGraph Operator](../../2.get-started/2.1.install-operator.md) 8 | 9 | ## Steps 10 | 11 | 1. Create a NebulaGraph cluster. For more information, see [Create a NebulaGraph clusters](../4.1.installation/4.1.1.cluster-install.md). 12 | 13 | 2. Delete the Pod named `-storaged-2` after all pods are in the `Running` status. 14 | 15 | ```bash 16 | kubectl delete pod -storaged-2 --now 17 | ``` 18 | `` is the name of your NebulaGraph cluster. 19 | 20 | 3. NebulaGraph Operator automates the creation of the Pod named `-storaged-2` to perform self-healing. 21 | 22 | Run the `kubectl get pods` command to check the status of the Pod `-storaged-2`. 23 | 24 | ```bash 25 | ... 26 | nebula-cluster-storaged-1 1/1 Running 0 5d23h 27 | nebula-cluster-storaged-2 0/1 ContainerCreating 0 1s 28 | ... 29 | ``` 30 | 31 | ```bash 32 | ... 33 | nebula-cluster-storaged-1 1/1 Running 0 5d23h 34 | nebula-cluster-storaged-2 1/1 Running 0 4m2s 35 | ... 36 | ``` 37 | When the status of `-storaged-2` is changed from `ContainerCreating` to `Running`, the self-healing is performed successfully. 38 | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-bench.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Bench 2 | 3 | NebulaGraph Bench is a performance test tool for NebulaGraph using the LDBC data set. 4 | 5 | ## Scenario 6 | 7 | - Generate test data and import NebulaGraph. 8 | 9 | - Performance testing in the NebulaGraph cluster. 10 | 11 | ## Release note 12 | 13 | [Release](https://github.com/vesoft-inc/nebula-bench/releases/tag/{{bench.tag}}) 14 | 15 | ## Test process 16 | 17 | For detailed usage instructions, see [NebulaGraph Bench](https://github.com/vesoft-inc/nebula-bench/blob/{{bench.branch}}/README.md). 18 | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-cloud.md: -------------------------------------------------------------------------------- 1 | # What is NebulaGraph Cloud 2 | 3 | NebulaGraph Cloud (Cloud for short) is an on-cloud service that integrates the NebulaGraph database and data services. Cloud supports one-click deployment and visualization tools of NebulaGraph. Users can create a graph database within minutes and quickly scale computing, storage, and other resources. 4 | 5 | 11 | 12 | !!! note 13 | 14 | For now, Cloud does not support NebulaGraph core of version {{nebula.release}}. For the latest version of Cloud docs, see [What is NebulaGraph Cloud](https://docs.nebula-graph.io/{{cloud.azureLatestRelease}}/what-is-cloud/). 15 | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-cloud/2.how-to-create-subsciption.md: -------------------------------------------------------------------------------- 1 | # Create a subscription 2 | 3 | Before using NebulaGraph Cloud, you need to create a subscription on Azure. This topic describes how to create a subscription on Azure Marketplace. 4 | 5 | ## Subscription workflow 6 | 7 | 1. Enter the [Azure Marketplace](https://portal.azure.com/?l=en.en-us#blade/Microsoft_Azure_Marketplace/GalleryMenuBlade/selectedMenuItemId/home), and search for NebulaGraph Cloud in the search bar in Marketplace, or directly click [NebulaGraph Cloud]() to enter the subscription page. [TODO] 8 | 9 | 2. Select a plan according to your own needs and click **Set up + subscribe**. 10 | 11 | 1. On the **Basics** page of **Subscribe NebulaGraph Cloud**, fill in the following plan details: 12 | 13 | - Project details 14 | 15 | |Field|Description| 16 | |:---|:---| 17 | |Subscription|Select a subscription.| 18 | |Resource group|Select an existing resource group or create a new one.| 19 | 20 | - SaaS details 21 | 22 | |Field|Description| 23 | |:---|:---| 24 | |Name|Create a name for this SaaS subscription to easily identify it later.| 25 | |Recurring billing|`On` or `Off`.| 26 | 27 | 2. At the bottom of the **Basics** page, click **Next: Tags**. 28 | 3. (Optional) On the **Tags** page, enter **Name: Value**. 29 | 4. At the bottom of **Review + subscribe** page, click **Subscribe** and wait for about 2 minutes. 30 | 31 | 3. After the subscription is completed, you need to click `Open the SaaS account on the publisher's website` to create and configure your Solution. For details, see [How to configure a Solution](3.how-to-set-solution.md). 32 | 33 | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-cloud/5.solution/5.1.supporting-application.md: -------------------------------------------------------------------------------- 1 | # Accessory applications(Dashboard/Studio/Explorer) 2 | 3 | NebulaGraph Cloud integrates with NebulaGraph Studio, NebulaGraph Dashboard, and NebulaGraph Explorer. 4 | 5 | On the **Applications** page, ecosystem tools are different based on roles and privileges. The correspondence between different roles and privileges is as follows. The first column means the tools that the role can use, **Y** means the role has the corresponding privileges, and **N** means the role has no privileges. 6 | 7 | |Tools|OWNER|ROOT|USER| 8 | |:---|:---|:---|:---| 9 | |Dashboard|Y|Y|N| 10 | |Studio|N|Y|Y| 11 | |Explorer|N|Y|Y| 12 | 13 | ## Dashboard 14 | 15 | NebulaGraph Dashboard (Dashboard for short) is a visualization tool that monitors and manages the status of machines and services in NebulaGraph clusters. 16 | 17 | ## Studio 18 | 19 | NebulaGraph Studio (Studio in short) is a browser-based visualization tool to manage NebulaGraph. It provides you with a graphical user interface to manipulate graph schemas, import data, explore graph data, and run nGQL statements to retrieve data. With Studio, you can quickly become a graph exploration expert from scratch. For more information, see [What is NebulaGraph Studio](../../nebula-studio/about-studio/st-ug-what-is-graph-studio.md). 20 | 21 | ## Explorer 22 | 23 | NebulaGraph Explorer (Explorer in short) is a browser-based visualization tool. It is used with the NebulaGraph core to visualize interaction with graph data. Even without any experience in a graph database, you can quickly become a graph exploration expert. 24 | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-cloud/5.solution/5.3.role-and-authority-management.md: -------------------------------------------------------------------------------- 1 | # Roles and authority management 2 | 3 | NebulaGraph Cloud roles are different from roles in NebulaGraph. For more information, see [Roles in Cloud Solution](../4.user-role-description.md). 4 | 5 | |Roles in Cloud|Roles in NebulaGraph| 6 | |:---|:---| 7 | |OWNER|-| 8 | |ROOT|ROOT| 9 | |USER|ADMIN/DBA/GUEST/USER| 10 | 11 | ## Root Management 12 | 13 | Only users with **OWNER** authority can manage **ROOT** users. 14 | 15 | On the **Root Management** page, **OWNER** can reset **ROOT** users. 16 | 17 | 1. Click **Reset**, enter the email address of the ROOT user to be updated, and click **Send Email** to send the email. 18 | 19 | 2. After the **ROOT** user receives the confirmation email, click **Confirm**. 20 | 21 | ## User Management 22 | 23 | Only users with **ROOT** authority can manage **USER** users. 24 | 25 | On the **User Management** page, the **ROOT** user can grant roles in graph spaces to other users. Available roles are **ADMIN**, **DBA**, **GUEST**, and **USER**. 26 | 27 | 1. Select the graph space, click **Add User**, enter the specified user email and select the management authority of the user. 28 | 2. Click **Send Email** to send the email. 29 | 3. After the **USER** user receives the confirmation email, click **Confirm**. -------------------------------------------------------------------------------- /docs-2.0-en/nebula-cloud/6.pricing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vesoft-inc/nebula-docs/4adcf3fa59bfcf3ab630794db6e1b6fd4ada3de5/docs-2.0-en/nebula-cloud/6.pricing.md -------------------------------------------------------------------------------- /docs-2.0-en/nebula-dashboard/3.connect-dashboard.md: -------------------------------------------------------------------------------- 1 | # Connect Dashboard 2 | 3 | After Dashboard is deployed, you can log in and use Dashboard on the browser. 4 | 5 | ## Prerequisites 6 | 7 | - The Dashboard services are started. For more information, see [Deploy Dashboard](2.deploy-dashboard.md). 8 | 9 | - We recommend you to use the Chrome browser of the version above 89. Otherwise, there may be compatibility issues. 10 | 11 | ## Procedures 12 | 13 | 1. Confirm the IP address of the machine where the Dashboard service is installed. Enter `:7003` in the browser to open the login page. 14 | 15 | 2. Enter the username and the passwords of the NebulaGraph database. 16 | 17 | - If authentication is enabled, you can log in with the created accounts. 18 | 19 | - If authentication is not enabled, you can only log in using `root` as the username and random characters as the password. 20 | 21 | To enable authentication, see [Authentication](../7.data-security/1.authentication/1.authentication.md). 22 | 23 | 3. Select the NebulaGraph version to be used. 24 | 25 | 4. Click **Login**. -------------------------------------------------------------------------------- /docs-2.0-en/nebula-studio/manage-schema/st-ug-view-schema.md: -------------------------------------------------------------------------------- 1 | # View Schema 2 | 3 | Users can visually view schemas in NebulaGraph Studio. 4 | 5 | ## Steps 6 | 7 | 1. In the toolbar, click the **Schema** tab. 8 | 9 | 2. In the **Graph Space List** page, find a graph space and then click its name or click **Schema** in the **Operations** column. 10 | 11 | 3. Click **View Schema** tab and click the **Get Schema** button. 12 | 13 | ## Other operations 14 | 15 | In the **Graph Space List** page, find a graph space and then perform the following operations in the **Operations** column: 16 | 17 | - View Schema DDL: Displays schema creation statements for the graph space, including graph spaces, tags, edge types, and indexes. 18 | - Clone Graph Space: Clones the schema of the graph space to a new graph space. 19 | - Delete Graph pace: Deletes the graph space, including the schema and all vertices and edges. -------------------------------------------------------------------------------- /docs-2.0-en/nebula-studio/quick-start/st-ug-plan-schema.md: -------------------------------------------------------------------------------- 1 | # Design a schema 2 | 3 | To manipulate graph data in NebulaGraph with Studio, you must have a graph schema. This article introduces how to design a graph schema for NebulaGraph. 4 | 5 | A graph schema for NebulaGraph must have these essential elements: 6 | 7 | - Tags (namely vertex types) and their properties. 8 | 9 | - Edge types and their properties. 10 | 11 | In this article, you can install the sample data set [basketballplayer](https://docs-cdn.nebula-graph.com.cn/dataset/dataset.zip) and use it to explore a pre-designed schema. 12 | 13 | This table gives all the essential elements of the schema. 14 | 15 | | Element | Name | Property name (Data type) | Description | 16 | | :--- | :--- | :--- | :--- | 17 | | Tag | **player** | - `name` (`string`)
- `age` (`int`) | Represents the player. | 18 | | Tag | **team** | - `name` (`string`) | Represents the team. | 19 | | Edge type | **serve** | - `start_year` (`int`)
- `end_year` (`int`) | Represent the players behavior.
This behavior connects the player to the team, and the direction is from player to team. | 20 | | Edge type | **follow** | - `degree` (`int`) | Represent the players behavior.
This behavior connects the player to the player, and the direction is from a player to a player. | 21 | 22 | This figure shows the relationship (**serve**/**follow**) between a **player** and a **team**. 23 | 24 | ![The relationship between players and between players and teams](https://docs-cdn.nebula-graph.com.cn/figures/st-ug-013-cn.png "Relationship between players and teams in the example dataset") 25 | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-studio/system-settings.md: -------------------------------------------------------------------------------- 1 | # Global settings 2 | 3 | This topic introduces the global settings of NebulaGraph Studio, including language switching and beta functions. 4 | 5 | - Language: Switch between Chinese and English. 6 | 7 | - Beta functions: Switch on/off beta features, which include [view schema](manage-schema/st-ug-view-schema.md), [text to query](quick-start/st-ug-console.md) and [AI import](quick-start/st-ug-import-data.md). 8 | 9 | The text to query and AI import features need to be configured with AI-related configurations. See below for detailed configurations. 10 | 11 | ## Text to query and AI import 12 | 13 | The text to query and AI import are artificial intelligence features developed based on the large language model (LLM) and require the following parameters to be configured. 14 | 15 | |Parameter|Description| 16 | |:---------|:--| 17 | |**API type** | The API type for AI. Valid values are `OpenAI` and `Aliyun`. | 18 | |**URL** | The API URL. Fill in the correct URL format according to the corresponding API type. For example, `https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}`。 | 19 | |**Key** | The key used to validate the API. The key is required when using an online large language model, and is optional depending on the actual settings when using an offline large language model. | 20 | |**Model** | The version of the large language model. The model is required when using an online large language model, and is optional depending on the actual settings when using an offline large language model. | 21 | |**Max text length**| The maximum length for receiving or generating a single piece of text. Unit: byte. | -------------------------------------------------------------------------------- /docs-2.0-en/nebula-studio/troubleshooting/st-ug-faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | !!! faq "Why can't I use a function?" 4 | 5 | If you find that a function cannot be used, it is recommended to troubleshoot the problem according to the following steps: 6 | 7 | 1. Confirm that NebulaGraph is the latest version. If you use Docker Compose to deploy the NebulaGraph database, it is recommended to run `docker-compose pull && docker-compose up -d` to pull the latest Docker image and start the container. 8 | 9 | 2. Confirm that Studio is the latest version. For more information, refer to [check updates](../../20.appendix/release-notes/studio-release-note.md). 10 | 11 | 3. Search the [nebula forum](https://github.com/vesoft-inc/nebula/discussions), [nebula](https://github.com/vesoft-inc/nebula) and [nebula-studio](https://github.com/vesoft-inc/nebula-studio) projects on the GitHub to confirm if there are already similar problems. 12 | 13 | 4. If none of the above steps solve the problem, you can submit a problem on the forum. 14 | -------------------------------------------------------------------------------- /docs-2.0-en/overrides/404.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | {% block content %} 4 |

Sorry, the page is invalid...

5 | 6 |

Click the edit button in the upper right corner of the original document to fix the invalid link and become a contributor.

7 |

You can also:

8 |

Submit an issue about the invalid link.

9 |

Return to the previous page.

10 |

Return to the home page.

11 | {% endblock %} 12 | {% block disqus %}{% endblock %} 13 | -------------------------------------------------------------------------------- /docs-2.0-en/overrides/content.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | {% if page.meta.source %} 5 | 10 | {% endif %} 11 | 12 | {{ page.content }} 13 | 14 | {% if page.meta.git_revision_date_localized %} 15 | Last update: {{ page.meta.git_revision_date_localized }} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /docs-2.0-en/overrides/main.html: -------------------------------------------------------------------------------- 1 | 3 | {% extends "base.html" %} 4 | 5 | {% block announce %} 6 | Document versions starting from 3.6.0 contain Community Edition features only. For Enterprise documentation, please contact us. 7 | {% endblock %} -------------------------------------------------------------------------------- /docs-2.0-en/overrides/partials/algolia-search.html: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /docs-2.0-en/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | .md-grid { 2 | max-width: initial; 3 | } 4 | 5 | /*隐藏mike默认的version selector 6 | div.md-version { 7 | display: none !important; 8 | } */ 9 | 10 | /*自定义announce banner的字体和背景颜色*/ 11 | aside.md-banner { 12 | color: rgba(0, 0, 0, 0.714); 13 | background-color: rgba(169, 241, 62, 0.541); 14 | } 15 | 16 | /* nebula dark */ 17 | :root{ 18 | --md-primary-fg-color:#A6A5C4; /* Tar bar color*/ 19 | --md-accent-fg-color: #FA8072; /* Selected color */ 20 | } 21 | 22 | /* nebula light */ 23 | [data-md-color-scheme="nebula"]{ 24 | --md-primary-fg-color: #55295B; /* Tar bar color */ 25 | --md-accent-fg-color: #49BDF0; /* Selected color */ 26 | 27 | --md-code-fg-color: rgb(12, 21, 26); 28 | --md-code-bg-color: #eaebec; 29 | --md-typeset-color: #000000; 30 | } 31 | 32 | 33 | /* uncover the upper edge of the version selection box by box-shadow */ 34 | div>nav>label.md-nav__title { 35 | box-shadow: none!important; 36 | } -------------------------------------------------------------------------------- /docs-2.0-en/stylesheets/logo.css: -------------------------------------------------------------------------------- 1 | .md-header .md-logo { 2 | display: block; 3 | width: 187px; 4 | height: 40px; 5 | padding: 0; 6 | } 7 | 8 | .md-header .md-logo img { 9 | width: 187px !important; 10 | height: 40px !important; 11 | } -------------------------------------------------------------------------------- /docs-2.0-en/stylesheets/pdf.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Zh Font'; 3 | src: url('../fonts/NotoSansSC-Regular.ttf') format('truetype'); 4 | } 5 | -------------------------------------------------------------------------------- /docs-2.0-en/synchronization-and-migration/2.balance-syntax.md: -------------------------------------------------------------------------------- 1 | # BALANCE syntax 2 | 3 | We can submit tasks to load balance Storage services in NebulaGraph. For more information about storage load balancing and examples, see [Storage load balance](../8.service-tuning/load-balance.md). 4 | 5 | !!! note 6 | 7 | For other job management commands, see [Job manager and the JOB statements](../3.ngql-guide/4.job-statements.md). 8 | 9 | The syntax for load balance is described as follows. 10 | 11 | |Syntax|Description| 12 | |:---|:---| 13 | |`SUBMIT JOB BALANCE LEADER`| Starts a job to balance the distribution of all the storage leaders in all graph spaces. It returns the job ID. | 14 | 15 | For details about how to view, stop, and restart a job, see [Job manager and the JOB statements](../3.ngql-guide/4.job-statements.md). 16 | -------------------------------------------------------------------------------- /docs-2.0-zh/1.introduction/2.1.path.md: -------------------------------------------------------------------------------- 1 | # 路径 2 | 3 | 图论中一个非常重要的概念是路径,路径是指一个有限或无限的边序列,这些边连接着一系列的点。 4 | 5 | 路径的类型分为三种:`walk`、`trail`、`path`。关于路径的详细说明,请参见[维基百科](https://en.wikipedia.org/wiki/Path_(graph_theory)#Walk,_trail,_path)。 6 | 7 | 本文以下图为例进行简单介绍。 8 | 9 | ![路径示例](https://docs-cdn.nebula-graph.com.cn/figures/path1.png) 10 | 11 | ## walk 12 | 13 | `walk`类型的路径由有限或无限的边序列构成。遍历时点和边可以重复。 14 | 15 | 查看示例图,由于 C、D、E 构成了一个环,因此该图包含无限个路径,例如`A->B->C->D->E`、`A->B->C->D->E->C`、`A->B->C->D->E->C->D`。 16 | 17 | !!! note 18 | 19 | `GO`语句采用的是`walk`类型路径。 20 | 21 | ## trail 22 | 23 | `trail`类型的路径由有限的边序列构成。遍历时只有点可以重复,边不可以重复。柯尼斯堡七桥问题的路径类型就是`trail`。 24 | 25 | 查看示例图,由于边不可以重复,所以该图包含有限个路径,最长路径由 5 条边组成:`A->B->C->D->E->C`。 26 | 27 | !!! note 28 | 29 | `MATCH`、`FIND PATH`和`GET SUBGRAPH`语句采用的是`trail`类型路径。 30 | 31 | 在 trail 类型中,还有`cycle`和`circuit`两种特殊的路径类型,以下图为例对这两种特殊的路径类型进行介绍。 32 | 33 | ![trail 示例](https://docs-cdn.nebula-graph.com.cn/figures/Circuits1.png) 34 | 35 | - cycle 36 | 37 | `cycle` 是封闭的 `trail` 类型的路径,遍历时边不可以重复,起点和终点重复,并且没有其他点重复。在此示例图中,最长路径由三条边组成:`A->B->C->A`或`C->D->E->C`. 38 | 39 | - circuit 40 | 41 | `circuit` 也是封闭的 `trail` 类型的路径,遍历时边不可以重复,除起点和终点重复外,可能存在其他点重复。在此示例图中,最长路径为:`A->B->C->D->E->C->A`。 42 | 43 | ## path 44 | 45 | `path`类型的路径由有限的边序列构成。遍历时点和边都不可以重复。 46 | 47 | 查看示例图,由于点和边都不可以重复,所以该图包含有限个路径,最长路径由 4 条边组成:`A->B->C->D->E`。 48 | 49 | ## 视频 50 | 51 | 用户也可以观看视频了解路径的相关概念。 52 | 53 | [Path](https://www.bilibili.com/video/BV1Uf4y1t72L)(03 分 09 秒) 54 | 55 | 56 | -------------------------------------------------------------------------------- /docs-2.0-zh/1.introduction/3.nebula-graph-architecture/1.architecture-overview.md: -------------------------------------------------------------------------------- 1 | # {{nebula.name}} 架构总览 2 | 3 | {{nebula.name}} 由三种服务构成:Graph 服务、Meta 服务和 Storage 服务,是一种存储与计算分离的架构。 4 | 5 | 每个服务都有可执行的二进制文件和对应进程,用户可以使用这些二进制文件在一个或多个计算机上部署 {{nebula.name}} 集群。 6 | 7 | 下图展示了 {{nebula.name}} 集群的经典架构。 8 | 9 | ![{{nebula.name}} architecture](https://docs-cdn.nebula-graph.com.cn/figures/nebula-graph-architecture_3.png " {{nebula.name}} architecture") 10 | 11 | ## Meta 服务 12 | 13 | 在 {{nebula.name}} 架构中,Meta 服务是由 nebula-metad 进程提供的,负责数据管理,例如 Schema 操作、集群管理和用户权限管理等。 14 | 15 | Meta 服务的详细说明,请参见 [Meta 服务](2.meta-service.md)。 16 | 17 | ## Graph 服务和 Storage 服务 18 | 19 | {{nebula.name}} 采用计算存储分离架构。Graph 服务负责处理计算请求,Storage 服务负责存储数据。它们由不同的进程提供,Graph 服务是由 nebula-graphd 进程提供,Storage 服务是由 nebula-storaged 进程提供。计算存储分离架构的优势如下: 20 | 21 | - 易扩展 22 | 23 | 分布式架构保证了 Graph 服务和 Storage 服务的灵活性,方便扩容和缩容。 24 | 25 | - 高可用 26 | 27 | 如果提供 Graph 服务的服务器有一部分出现故障,其余服务器可以继续为客户端提供服务,而且 Storage 服务存储的数据不会丢失。服务恢复速度较快,甚至能做到用户无感知。 28 | 29 | - 节约成本 30 | 31 | 计算存储分离架构能够提高资源利用率,而且可根据业务需求灵活控制成本。 32 | 33 | 34 | 35 | - 更多可能性 36 | 37 | 基于分离架构的特性,Graph 服务将可以在更多类型的存储引擎上单独运行,Storage 服务也可以为多种目的计算引擎提供服务。 38 | 39 | Graph 服务和 Storage 服务的详细说明,请参见 [Graph 服务](3.graph-service.md)和 [Storage 服务](4.storage-service.md)。 40 | -------------------------------------------------------------------------------- /docs-2.0-zh/1.introduction/3.nebula-graph-architecture/2.meta-service.md: -------------------------------------------------------------------------------- 1 | # Meta 服务 2 | 3 | 本文介绍 Meta 服务的架构和功能。 4 | 5 | ## Meta 服务架构 6 | 7 | ![The architecture of the Meta Service](https://docs-cdn.nebula-graph.com.cn/docs-2.0/1.introduction/2.nebula-graph-architecture/meta-architecture1.png) 8 | 9 | Meta 服务是由 nebula-metad 进程提供的,用户可以根据场景配置 nebula-metad 进程数量: 10 | 11 | - 测试环境中,用户可以在 {{nebula.name}} 集群中部署 1 个或 3 个 nebula-metad 进程。如果要部署 3 个,用户可以将它们部署在 1 台机器上,或者分别部署在不同的机器上。 12 | - 生产环境中,建议在 {{nebula.name}} 集群中部署 3 个 nebula-metad 进程。请将这些进程部署在不同的机器上以保证高可用。 13 | 14 | 所有 nebula-metad 进程构成了基于 Raft 协议的集群,其中一个进程是 leader,其他进程都是 follower。 15 | 16 | leader 是由多数派选举出来,只有 leader 能够对客户端或其他组件提供服务,其他 follower 作为候补,如果 leader 出现故障,会在所有 follower 中选举出新的 leader。 17 | 18 | !!! note 19 | 20 | leader 和 follower 的数据通过 Raft 协议保持一致,因此 leader 故障和选举新 leader 不会导致数据不一致。更多关于 Raft 的介绍见 [Storage 服务](4.storage-service.md)。 21 | 22 | ## Meta 服务功能 23 | 24 | ### 管理用户账号 25 | 26 | Meta 服务中存储了用户的账号和权限信息,当客户端通过账号发送请求给 Meta 服务,Meta 服务会检查账号信息,以及该账号是否有对应的请求权限。 27 | 28 | 更多 {{nebula.name}} 的访问控制说明,请参见[身份验证](../../7.data-security/1.authentication/1.authentication.md)。 29 | 30 | ### 管理分片 31 | 32 | Meta 服务负责存储和管理分片的位置信息,并且保证分片的负载均衡。 33 | 34 | ### 管理图空间 35 | 36 | {{nebula.name}} 支持多个图空间,不同图空间内的数据是安全隔离的。Meta 服务存储所有图空间的元数据(非完整数据),并跟踪数据的变更,例如增加或删除图空间。 37 | 38 | ### 管理 Schema 信息 39 | 40 | {{nebula.name}} 是强类型图数据库,它的 Schema 包括 Tag、Edge type、Tag 属性和 Edge type 属性。 41 | 42 | Meta 服务中存储了 Schema 信息,同时还负责 Schema 的添加、修改和删除,并记录它们的版本。 43 | 44 | 更多 {{nebula.name}} 的 Schema 信息,请参见[数据模型](../2.data-model.md)。 45 | 46 | ### 管理 TTL 信息 47 | 48 | Meta 服务存储 TTL(Time To Live)定义信息,可以用于设置数据生命周期。数据过期后,会由 Storage 服务进行处理,具体过程参见 [TTL](../../3.ngql-guide/8.clauses-and-options/ttl-options.md)。 49 | 50 | ### 管理作业 51 | 52 | Meta 服务中的作业管理模块负责作业的创建、排队、查询和删除。 53 | -------------------------------------------------------------------------------- /docs-2.0-zh/14.client/1.nebula-client.md: -------------------------------------------------------------------------------- 1 | # 客户端介绍 2 | 3 | {{nebula.name}} 提供多种类型客户端,便于用户连接、管理 {{nebula.name}} 图数据库。 4 | 5 | - [NebulaGraph Console](../nebula-console.md):原生 CLI 客户端 6 | 7 | - [NebulaGraph CPP](3.nebula-cpp-client.md):C++ 客户端 8 | 9 | - [NebulaGraph Java](4.nebula-java-client.md):Java 客户端 10 | 11 | - [NebulaGraph Python](5.nebula-python-client.md):Python 客户端 12 | 13 | - [NebulaGraph Go](6.nebula-go-client.md):Go 客户端 14 | 15 | !!! note 16 | 17 | 仅以下类支持线程安全(thread-safe): 18 | 19 | - NebulaGraph Java 客户端提供的 NebulaPool 和 SessionPool 20 | - NebulaGraph Go 客户端提供的 ConnectionPool 和 SessionPool 21 | -------------------------------------------------------------------------------- /docs-2.0-zh/14.client/5.nebula-python-client.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Python 2 | 3 | [NebulaGraph Python](https://github.com/vesoft-inc/nebula-python/tree/{{python.branch}}) 是一款 Python 语言的客户端,可以连接、管理 {{nebula.name}} 图数据库。 4 | 5 | ## 前提条件 6 | 7 | 已安装 Python,版本为 3.6 及以上。 8 | 9 | ## 版本对照表 10 | 11 | 参见[Github](https://github.com/vesoft-inc/nebula-python/tree/{{python.branch}})。 12 | 13 | ## 安装 NebulaGraph Python 14 | 15 | ### pip 安装 16 | 17 | ```bash 18 | $ pip install nebula3-python== 19 | ``` 20 | 21 | ### 克隆源码安装 22 | 23 | 1. 克隆 NebulaGraph Python 源码到机器。 24 | 25 | - (推荐)如果需要安装指定版本的 NebulaGraph Python,请使用选项`--branch`指定分支。例如安装 v{{ python.release }}发布版本,请执行如下命令: 26 | 27 | ```bash 28 | $ git clone --branch {{python.branch}} https://github.com/vesoft-inc/nebula-python.git 29 | ``` 30 | 31 | - 如果需要安装日常开发版本,请执行如下命令下载`master`分支的源码: 32 | 33 | ```bash 34 | $ git clone https://github.com/vesoft-inc/nebula-python.git 35 | ``` 36 | 37 | 2. 进入目录 nebula-python。 38 | 39 | ```bash 40 | $ cd nebula-python 41 | ``` 42 | 43 | 3. 执行如下命令安装。 44 | 45 | ```bash 46 | $ pip install . 47 | ``` 48 | 49 | ## API 文档 50 | 51 | 点击[此处](https://vesoft-inc.github.io/nebula-python/{{python.branch}}/annotated.html)查看 Python 客户端提供的各种类和方法。 52 | 53 | ## 核心代码 54 | 55 | 56 | NebulaGraph Python 客户端提供 Connection Pool 和 Session Pool 两种使用方式,使用 Connection Pool 需要用户自行管理 Session 实例。 57 | 58 | - Session Pool 59 | 60 | 详细示例请参见 [SessinPoolExample.py](https://github.com/vesoft-inc/nebula-python/blob/{{python.branch}}/example/SessinPoolExample.py)。 61 | 62 | 使用限制请参见 [Example of using session pool](https://github.com/vesoft-inc/nebula-python/blob/{{python.branch}}/README.md#example-of-using-session-pool)。 63 | 64 | - Connection Pool 65 | 66 | 详细示例请参见 [Example](https://github.com/vesoft-inc/nebula-python/tree/{{python.branch}}/example)。 67 | 68 | -------------------------------------------------------------------------------- /docs-2.0-zh/14.client/6.nebula-go-client.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Go 2 | 3 | [NebulaGraph Go](https://github.com/vesoft-inc/nebula-go/tree/{{go.branch}}) 是一款 Go 语言的客户端,可以连接、管理 {{nebula.name}} 图数据库。 4 | 5 | ## 前提条件 6 | 7 | 已安装 Go,版本为 1.13 及以上。 8 | 9 | ## 版本对照表 10 | 11 | 参见[Github](https://github.com/vesoft-inc/nebula-go/tree/{{go.branch}})。 12 | 13 | ## 下载 NebulaGraph Go 14 | 15 | - (推荐)如果需要下载指定版本的 NebulaGraph Go,请使用选项`--branch`指定分支。例如安装 v{{ go.release }}发布版本,请执行如下命令: 16 | 17 | ```bash 18 | $ git clone --branch {{go.branch}} https://github.com/vesoft-inc/nebula-go.git 19 | ``` 20 | 21 | - 如果需要安装日常开发版本,请执行如下命令下载`master`分支的源码: 22 | 23 | ```bash 24 | $ git clone https://github.com/vesoft-inc/nebula-go.git 25 | ``` 26 | 27 | ## 安装或更新 28 | 29 | 安装或更新的命令如下: 30 | 31 | ```bash 32 | $ go get -u -v github.com/vesoft-inc/nebula-go@ 33 | ``` 34 | 35 | `tag`:指定分支。例如`master`或`{{go.branch}}`。 36 | 37 | ## API 文档 38 | 39 | 点击[此处](https://pkg.go.dev/github.com/vesoft-inc/nebula-go/v3@{{go.tag}}#section-documentation)查看 Go 客户端提供的各种方法和类型。 40 | 41 | ## 核心代码 42 | 43 | NebulaGraph Go 客户端提供 Connection Pool 和 Session Pool 两种使用方式,使用 Connection Pool 需要用户自行管理 Session 实例。 44 | 45 | - Session Pool 46 | 47 | 详细示例请参见 [session_pool_example.go](https://github.com/vesoft-inc/nebula-go/blob/{{go.branch}}/examples/session_pool_example/session_pool_example.go)。 48 | 49 | 使用限制请参见 [Usage example](https://github.com/vesoft-inc/nebula-go/blob/{{go.branch}}/README.md#usage-example)。 50 | 51 | - Connection Pool 52 | 53 | 详细示例请参见 [graph_client_basic_example](https://github.com/vesoft-inc/nebula-go/blob/{{go.branch}}/examples/basic_example/graph_client_basic_example.go) 和 [graph_client_goroutines_example](https://github.com/vesoft-inc/nebula-go/blob/{{go.branch}}/examples/gorountines_example/graph_client_goroutines_example.go)。 54 | 55 | -------------------------------------------------------------------------------- /docs-2.0-zh/14.client/contributed-clients.md: -------------------------------------------------------------------------------- 1 | # 社区贡献的客户端 2 | 3 | 你可以使用社区用户开发的以下客户端连接和管理 {{nebula.name}} 图数据库: 4 | 5 | - [NebulaGraph Rust](https://github.com/vesoft-inc/nebula-rust) 6 | - [NebulaGraph PHP](https://github.com/nebula-contrib/nebula-php) 7 | - [NebulaGraph Node](https://github.com/nebula-contrib/nebula-node) 8 | - [NebulaGraph .NET](https://github.com/nebula-contrib/nebula-net) 9 | -------------------------------------------------------------------------------- /docs-2.0-zh/2.quick-start/2.start-free-trial-on-cloud.md: -------------------------------------------------------------------------------- 1 | # 从云开始(免费试用) 2 | 3 | 用户可以在阿里云云市场上免费试用 {{nebula.name}} 。无需下载和安装任何软件,只需简单的点击操作,即可在云端体验到 {{nebula.name}} 的强大功能。立即单击[免费试用](https://computenest.console.aliyun.com/user/cn-hangzhou/serviceInstanceCreate?ServiceId=service-39f4f251e9484369a778&ServiceVersion=20&isTrial=true),探索 {{nebula.name}} 的魅力。 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/2.quick-start/3.quick-start-on-premise/2.install-nebula-graph.md: -------------------------------------------------------------------------------- 1 | # 安装 {{nebula.name}} 2 | 3 | {% include "/source_install-nebula-graph-by-rpm-or-deb.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/2.quick-start/3.quick-start-on-premise/3.connect-to-nebula-graph.md: -------------------------------------------------------------------------------- 1 | # 连接 {{nebula.name}} 2 | 3 | {% include "/source_connect-to-nebula-graph.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/2.quick-start/3.quick-start-on-premise/4.nebula-graph-crud.md: -------------------------------------------------------------------------------- 1 | # 使用常用 nGQL(CRUD 命令) 2 | 3 | 本文介绍 {{nebula.name}} 查询语言的基础语法,包括用于 Schema 创建和常用增删改查操作的语句。 4 | 5 | 如需了解更多语句的用法,参见 [nGQL 指南](../../3.ngql-guide/1.nGQL-overview/1.overview.md)。 6 | 7 | {% include "/source_ngql_for_quick_start.md" %} 8 | -------------------------------------------------------------------------------- /docs-2.0-zh/2.quick-start/3.quick-start-on-premise/5.start-stop-service.md: -------------------------------------------------------------------------------- 1 | # 启动 {{nebula.name}} 服务 2 | 3 | {% include "/source_manage-service.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/20.appendix/history.md: -------------------------------------------------------------------------------- 1 | # {{nebula.name}} 年表 2 | 3 | 4 | 1. 2018.9.5 由 @[dutor](https://github.com/dutor) 提交了第一行代码。 5 | 6 | ![image](https://docs-cdn.nebula-graph.com.cn/books/images/dutor.png) 7 | 8 | 2. 2019.5 发布了 v0.1.0 alpha 版本, 并开源。 9 | 10 | ![image](https://docs-cdn.nebula-graph.com.cn/books/images/alpha-bj.png) 11 | ![image](https://docs-cdn.nebula-graph.com.cn/books/images/alpha-hz.jpg) 12 | 13 | 此后一年内陆续发布 v1.0.0-beta, v1.0.0-rc1, v1.0.0-rc2, v1.0.0-rc3, v1.0.0-rc4 14 | 15 | ![image](https://docs-cdn.nebula-graph.com.cn/books/images/v010.png) 16 | 17 | 3. 2019.7 在 HBaseCon 第一次公开亮相[^Hbasecon]@[dangleptr](https://github.com/dangleptr) 18 | 19 | ![image](https://www-cdn.nebula-graph.com.cn/nebula-blog/HBase01.png) 20 | 21 | [^Hbasecon]: {{nebula.name}} 1.x 版本支持 RocksDB 和 HBase 两种主要的后端,但在 {{nebula.name}} 2.x 版本取消了默认对 HBase 的支持。 22 | 23 | 4. 2020.3 在 v1.0 开发的收尾阶段,启动了 v2.0 项目的研发 24 | 25 | 5. 2020.6 发布了第一个正式大版本 v1.0.0 GA 26 | 27 | ![image](https://docs-cdn.nebula-graph.com.cn/books/images/v100GA.png) 28 | 29 | 6. 2021.3 发布了第二个大版本 v2.0 GA 30 | 31 | ![image](https://docs-cdn.nebula-graph.com.cn/books/images/v200.png) 32 | 33 | 7. 2021.8 发布 v2.5.0 34 | 35 | 8. 2021.10 发布 v2.6.0 36 | 37 | 9. 2022.2 发布 v3.0.0 38 | 39 | 10. 2022.4 发布 v3.1.0 40 | 41 | 11. 2022.7 发布 v3.2.0 42 | 43 | 12. 2022.10 发布 v3.3.0 44 | 45 | 13. 2023.2 发布 v3.4.0 46 | 47 | 14. 2023.5 发布 v3.5.0 48 | 49 | 15. 2023.8 发布 v3.6.0 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /docs-2.0-zh/20.appendix/mind-map.md: -------------------------------------------------------------------------------- 1 | # 思维导图 2 | 3 | 以下给出 {{nebula.name}} 结构框架的思维导图,用户可以[点击](https://www.mubucm.com/doc/34QEdbrFRwZ) 并查看大图。 4 | 5 | ![{{nebula.name}} ](https://docs-cdn.nebula-graph.com.cn/figures/Unknown-2.png) 6 | 7 | 以下给出 nGQL 的思维导图,用户可以[点击](https://www.mubucm.com/doc/3heEUeLwbMZ) 并查看大图。 8 | 9 | ![nGQL](https://docs-cdn.nebula-graph.com.cn/figures/Unknown-3.png) 10 | -------------------------------------------------------------------------------- /docs-2.0-zh/20.appendix/release-notes/dashboard-comm-release-note.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Dashboard 社区版更新说明 2 | 3 | ## 社区版 v3.4.0 4 | 5 | - 功能 6 | - 内置 [dashboard.service](../../nebula-dashboard/2.deploy-dashboard.md) 脚本,支持一键管理 Dashboard 服务和查看 Dashboard 版本。 7 | - 支持查看 Meta 服务的配置。 8 | 9 | - 优化 10 | - 调整目录结构,简化[部署步骤](../../nebula-dashboard/2.deploy-dashboard.md)。 11 | - 机器的概览页面显示监控指标名称。 12 | - 优化`num_queries`等监控指标的计算方式,调整为时序聚合显示。 -------------------------------------------------------------------------------- /docs-2.0-zh/20.appendix/release-notes/studio-release-note.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Studio 更新说明 2 | 3 | ## v3.10.0(2024.5) 4 | 5 | - 增强 6 | - 调整 AI Assistant 默认最大上下文长度。 7 | - 调整部分文案与样式。 8 | 9 | - 缺陷修复 10 | - 修复导入模板的示例文件中的错误。 11 | - 修复创建 Tag 或 Edge type 时默认值为非 NULL 的问题。 12 | - 修复在导入任务页面编辑大量属性时页面崩溃的问题。 13 | 14 | ## v3.9.1(2024.2) 15 | 16 | - 缺陷修复 17 | - 修复 Schema 草图中属性值使用参数`NOT NULL`的问题,替换为默认参数`NULL`。 18 | 19 | ## v3.9.0(2024.1) 20 | 21 | - 功能 22 | - 支持[使用 AI 导入数据](../../nebula-studio/quick-start/st-ug-import-data.md)。 23 | - 支持[使用 AI 查询语句助手](../../nebula-studio/quick-start/st-ug-console.md)生成 nGQL 语句。 24 | 25 | - 增强 26 | - 优化[控制台功能](../../nebula-studio/quick-start/st-ug-console.md),包括自动补全 Tag/Edge type、快速选择历史语句、快速查看 Schema 等。 27 | - 优化[执行计划](../../nebula-studio/quick-start/st-ug-console.md)展示样式。 -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/1.nGQL-overview/comments.md: -------------------------------------------------------------------------------- 1 | # 注释 2 | 3 | 本文介绍 nGQL 中的注释方式。 4 | 5 | ## Examples 6 | 7 | ```ngql 8 | nebula> RETURN 1+1; # 这条注释延续到行尾。 9 | nebula> RETURN 1+1; // 这条注释延续到行尾。 10 | nebula> RETURN 1 /* 这是一条行内注释 */ + 1 == 2; 11 | nebula> RETURN 11 + \ 12 | /* 多行注释 \ 13 | 用反斜线来换行。 \ 14 | */ 12; 15 | ``` 16 | 17 | !!! note 18 | 19 | - nGQL 语句中的反斜线(\)代表换行。 20 | - 如果 nGQL 语句以`#`或者`//`开头,不会执行该行命令并且会返回提示`StatementEmpty`。 21 | 22 | ## openCypher 兼容性 23 | 24 | * 在 nGQL 中,用户必须在行末使用反斜线(\)来换行,即使是在使用`/* */`符号的多行注释内。 25 | * 在 openCypher 中不需要使用反斜线换行。 26 | 27 | ```openCypher 28 | /* openCypher 风格: 29 | 这条注释 30 | 延续了不止 31 | 一行 */ 32 | MATCH (n:label) 33 | RETURN n; 34 | ``` 35 | 36 | ```ngql 37 | /* 原生 nGQL 风格: \ 38 | 这条注释 \ 39 | 延续了不止 \ 40 | 一行 */ \ 41 | MATCH (n:tag) \ 42 | RETURN n; 43 | ``` 44 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/1.nGQL-overview/identifier-case-sensitivity.md: -------------------------------------------------------------------------------- 1 | # 大小写区分 2 | 3 | ## 标识符区分大小写 4 | 5 | 以下语句会出现错误,因为`my_space`和`MY_SPACE`是两个不同的图空间。 6 | 7 | ```ngql 8 | nebula> CREATE SPACE IF NOT EXISTS my_space (vid_type=FIXED_STRING(30)); 9 | nebula> use MY_SPACE; 10 | [ERROR (-1005)]: SpaceNotFound: 11 | ``` 12 | 13 | ## 关键字不区分大小写 14 | 15 | 以下语句是等价的,因为`show`和`spaces`是关键字。 16 | 17 | ```ngql 18 | nebula> show spaces; 19 | nebula> SHOW SPACES; 20 | nebula> SHOW spaces; 21 | nebula> show SPACES; 22 | ``` 23 | 24 | ## 函数不区分大小写 25 | 26 | 函数名称不区分大小写,例如`count()`、`COUNT()`、`couNT()`是等价的。 27 | 28 | ```ngql 29 | nebula> WITH [NULL, 1, 1, 2, 2] As a \ 30 | UNWIND a AS b \ 31 | RETURN count(b), COUNT(*), couNT(DISTINCT b); 32 | +----------+----------+-------------------+ 33 | | count(b) | COUNT(*) | couNT(distinct b) | 34 | +----------+----------+-------------------+ 35 | | 4 | 5 | 2 | 36 | +----------+----------+-------------------+ 37 | ``` 38 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/10.tag-statements/2.drop-tag.md: -------------------------------------------------------------------------------- 1 | # DROP TAG 2 | 3 | `DROP TAG`语句可以删除当前工作空间内所有点上的指定 Tag。 4 | 5 | 点可以有一个或多个 Tag。 6 | 7 | - 如果某个点只有一个 Tag,删除这个 Tag 后,用户就**无法访问**这个点,下次 Compaction 操作时会删除该点,但与该点相邻的**边仍然存在**——这会造成悬挂边。 8 | 9 | - 如果某个点有多个 Tag,删除其中一个 Tag,仍然可以访问这个点,但是**无法访问**已删除 Tag 所定义的所有属性。 10 | 11 | 删除 Tag 操作仅删除 Schema 数据,硬盘上的文件或目录不会立刻删除,而是在下一次 Compaction 操作时删除。 12 | 13 | !!! compatibility 14 | 15 | {{nebula.name}} {{nebula.release}} 中默认不支持插入无 Tag 的点。如需使用无 Tag 的点,在集群内所有 Graph 服务的配置文件(`nebula-graphd.conf`)中新增`--graph_use_vertex_key=true`;在所有 Storage 服务的配置文件(`nebula-storaged.conf`)中新增`--use_vertex_key=true`。 16 | 17 | ## 前提条件 18 | 19 | - 登录的用户必须拥有对应权限才能执行`DROP TAG`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。 20 | 21 | - 确保 Tag 不包含任何索引,否则`DROP TAG`时会报冲突错误`[ERROR (-1005)]: Conflict!`。删除索引请参见 [drop index](../14.native-index-statements/6.drop-native-index.md)。 22 | 23 | ## 语法 24 | 25 | ```ngql 26 | DROP TAG [IF EXISTS] ; 27 | ``` 28 | 29 | - `IF EXISTS`:检测待删除的 Tag 是否存在,只有存在时,才会删除 Tag。 30 | 31 | - `tag_name`:指定要删除的 Tag 名称。一次只能删除一个 Tag。 32 | 33 | ## 示例 34 | 35 | ```ngql 36 | nebula> CREATE TAG IF NOT EXISTS test(p1 string, p2 int); 37 | nebula> DROP TAG test; 38 | ``` 39 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/10.tag-statements/4.show-tags.md: -------------------------------------------------------------------------------- 1 | # SHOW TAGS 2 | 3 | `SHOW TAGS`语句显示当前图空间内的所有 Tag 名称。 4 | 5 | 执行`SHOW TAGS`语句不需要任何权限,但是返回结果由登录的用户[权限](../../7.data-security/1.authentication/3.role-list.md)决定。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW TAGS; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW TAGS; 17 | +----------+ 18 | | Name | 19 | +----------+ 20 | | "player" | 21 | | "team" | 22 | +----------+ 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/10.tag-statements/5.describe-tag.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE TAG 2 | 3 | `DESCRIBE TAG`显示指定 Tag 的详细信息,例如字段名称、数据类型等。 4 | 5 | ## 前提条件 6 | 7 | 登录的用户必须拥有对应权限才能执行`DESCRIBE TAG`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | DESC[RIBE] TAG ; 13 | ``` 14 | 15 | `DESCRIBE`可以缩写为`DESC`。 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> DESCRIBE TAG player; 21 | +--------+----------+-------+---------+---------+ 22 | | Field | Type | Null | Default | Comment | 23 | +--------+----------+-------+---------+---------+ 24 | | "name" | "string" | "YES" | | | 25 | | "age" | "int64" | "YES" | | | 26 | +--------+----------+-------+---------+---------+ 27 | ``` 28 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/10.tag-statements/6.delete-tag.md: -------------------------------------------------------------------------------- 1 | # DELETE TAG 2 | 3 | `DELETE TAG`语句可以删除指定点上的指定 Tag。 4 | 5 | ## 前提条件 6 | 7 | 登录的用户必须拥有对应权限才能执行`DELETE TAG`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | DELETE TAG FROM ; 13 | ``` 14 | 15 | - `tag_name_list`:指定 Tag 名称。多个 Tag 用英文逗号(,)分隔,也可以用`*`表示所有 Tag。 16 | 17 | - `VID_list`:指定要删除 Tag 的点 ID。可以指定多个 VID,用英文逗号(,)分隔。 18 | 19 | ## 示例 20 | 21 | ```ngql 22 | nebula> CREATE TAG IF NOT EXISTS test1(p1 string, p2 int); 23 | nebula> CREATE TAG IF NOT EXISTS test2(p3 string, p4 int); 24 | nebula> INSERT VERTEX test1(p1, p2),test2(p3, p4) VALUES "test":("123", 1, "456", 2); 25 | nebula> FETCH PROP ON * "test" YIELD vertex AS v; 26 | +------------------------------------------------------------+ 27 | | v | 28 | +------------------------------------------------------------+ 29 | | ("test" :test1{p1: "123", p2: 1} :test2{p3: "456", p4: 2}) | 30 | +------------------------------------------------------------+ 31 | 32 | nebula> DELETE TAG test1 FROM "test"; 33 | nebula> FETCH PROP ON * "test" YIELD vertex AS v; 34 | +-----------------------------------+ 35 | | v | 36 | +-----------------------------------+ 37 | | ("test" :test2{p3: "456", p4: 2}) | 38 | +-----------------------------------+ 39 | 40 | nebula> DELETE TAG * FROM "test"; 41 | nebula> FETCH PROP ON * "test" YIELD vertex AS v; 42 | +---+ 43 | | v | 44 | +---+ 45 | +---+ 46 | ``` 47 | 48 | !!! compatibility 49 | 50 | * 在 openCypher 中,可以使用 `REMOVE v:LABEL` 语句来移除该点 `v` 的 `LABEL`。 51 | * 相同语意,但不同语法。在 nGQL 中使用 `DELETE TAG`。 52 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/10.tag-statements/improve-query-by-tag-index.md: -------------------------------------------------------------------------------- 1 | # 增加和删除标签 2 | 3 | 在 openCypher 中,有增加标签(`SET label`)和移除标签(`REMOVE label`)的功能,可以用于加速查询或者标记过程。 4 | 5 | 在 {{nebula.name}} 中,可以通过 Tag 变相实现相同操作,创建 Tag 并将 Tag 插入到已有的点上,就可以根据 Tag 名称快速查找点,也可以通过`DELETE TAG`删除某些点上不再需要的 Tag。 6 | 7 | ## 示例 8 | 9 | 例如在 basketballplayer 数据集中,部分篮球运动员同时也是球队股东,可以为股东 Tag`shareholder`创建索引,方便快速查找。如果不再是股东,可以通过`DELETE TAG`语句删除相应运动员的股东 Tag。 10 | 11 | ```ngql 12 | //创建股东 Tag 和索引 13 | nebula> CREATE TAG IF NOT EXISTS shareholder(); 14 | nebula> CREATE TAG INDEX IF NOT EXISTS shareholder_tag on shareholder(); 15 | 16 | //为点添加 Tag 17 | nebula> INSERT VERTEX shareholder() VALUES "player100":(); 18 | nebula> INSERT VERTEX shareholder() VALUES "player101":(); 19 | 20 | //快速查询所有股东 21 | nebula> MATCH (v:shareholder) RETURN v; 22 | +---------------------------------------------------------------------+ 23 | | v | 24 | +---------------------------------------------------------------------+ 25 | | ("player100" :player{age: 42, name: "Tim Duncan"} :shareholder{}) | 26 | | ("player101" :player{age: 36, name: "Tony Parker"} :shareholder{}) | 27 | +---------------------------------------------------------------------+ 28 | nebula> LOOKUP ON shareholder YIELD id(vertex); 29 | +-------------+ 30 | | id(VERTEX) | 31 | +-------------+ 32 | | "player100" | 33 | | "player101" | 34 | +-------------+ 35 | 36 | //如果 player100 不再是股东 37 | nebula> DELETE TAG shareholder FROM "player100"; 38 | nebula> LOOKUP ON shareholder YIELD id(vertex); 39 | +-------------+ 40 | | id(VERTEX) | 41 | +-------------+ 42 | | "player101" | 43 | +-------------+ 44 | ``` 45 | 46 | !!! note 47 | 48 | 如果插入测试数据后才创建索引,请用`REBUILD TAG INDEX ;`语句重建索引。 49 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/11.edge-type-statements/2.drop-edge.md: -------------------------------------------------------------------------------- 1 | # DROP EDGE 2 | 3 | `DROP EDGE`语句可以删除当前工作空间内的指定 Edge type。 4 | 5 | 一个边只能有一个 Edge type,删除这个 Edge type 后,用户就**无法访问**这个边,下次 Compaction 操作时会删除该边。 6 | 7 | 删除 Edge type 操作仅删除 Schema 数据,硬盘上的文件或目录不会立刻删除,而是在下一次 Compaction 操作时删除。 8 | 9 | ## 前提条件 10 | 11 | - 登录的用户必须拥有对应权限才能执行`DROP EDGE`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。 12 | 13 | - 确保 Edge type 不包含任何索引,否则`DROP EDGE`时会报冲突错误`[ERROR (-1005)]: Conflict!`。删除索引请参见 [drop index](../14.native-index-statements/6.drop-native-index.md)。 14 | 15 | ## 语法 16 | 17 | ```ngql 18 | DROP EDGE [IF EXISTS] 19 | ``` 20 | 21 | - `IF EXISTS`:检测待删除的 Edge type 是否存在,只有存在时,才会删除 Edge type。 22 | 23 | - `edge_type_name`:指定要删除的 Edge type 名称。一次只能删除一个 Edge type。 24 | 25 | ## 示例 26 | 27 | ```ngql 28 | nebula> CREATE EDGE IF NOT EXISTS e1(p1 string, p2 int); 29 | nebula> DROP EDGE e1; 30 | ``` 31 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/11.edge-type-statements/3.alter-edge.md: -------------------------------------------------------------------------------- 1 | # ALTER EDGE 2 | 3 | `ALTER EDGE`语句可以修改 Edge type 的结构。例如增删属性、修改数据类型,也可以为属性设置、修改 [TTL](../8.clauses-and-options/ttl-options.md)(Time-To-Live)。 4 | 5 | ## 注意事项 6 | 7 | - 登录的用户必须拥有对应权限才能执行`ALTER EDGE`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。 8 | 9 | - 确保要修改的属性不包含索引,否则`ALTER EDGE`时会报冲突错误`[ERROR (-1005)]: Conflict!`。删除索引请参见 [drop index](../14.native-index-statements/6.drop-native-index.md)。 10 | 11 | - 确保新增的属性名不与已存在或被删除的属性名同名,否则新增属性会失败。 12 | 13 | - 允许增加`FIXED_STRING`和`INT`类型的长度。 14 | - 允许`FIXED_STRING`类型转换为`STRING`类型、`FLOAT`类型转换为`DOUBLE`类型。 15 | 16 | ## 语法 17 | 18 | ```ngql 19 | ALTER EDGE 20 | [, alter_definition] ...] 21 | [ttl_definition [, ttl_definition] ... ] 22 | [COMMENT = '']; 23 | 24 | alter_definition: 25 | | ADD (prop_name data_type) 26 | | DROP (prop_name) 27 | | CHANGE (prop_name data_type) 28 | 29 | ttl_definition: 30 | TTL_DURATION = ttl_duration, TTL_COL = prop_name 31 | ``` 32 | 33 | - `edge_type_name`:指定要修改的 Edge type 名称。一次只能修改一个 Edge type。请确保要修改的 Edge type 在当前工作空间中存在,否则会报错。 34 | 35 | - 可以在一个`ALTER EDGE`语句中使用多个`ADD`、`DROP`和`CHANGE`子句,子句之间用英文逗号(,)分隔。 36 | 37 | - 当使用`ADD`或`CHANGE`指定属性值为`NOT NULL`时,必需为该属性指定默认值,即定义`DEFAULT`的值。 38 | 39 | ## 示例 40 | 41 | ```ngql 42 | nebula> CREATE EDGE IF NOT EXISTS e1(p1 string, p2 int); 43 | nebula> ALTER EDGE e1 ADD (p3 int, p4 string); 44 | nebula> ALTER EDGE e1 TTL_DURATION = 2, TTL_COL = "p2"; 45 | nebula> ALTER EDGE e1 COMMENT = 'edge1'; 46 | ``` 47 | 48 | ## 修改 Edge type 说明 49 | 50 | 尝试使用刚修改的 Edge type 可能会失败,因为修改是异步实现的。为确保数据同步,后续操作能顺利进行,请等待 2 个心跳周期(20 秒)。 51 | 52 | 如果需要修改心跳间隔,请为[所有配置文件](../../5.configurations-and-logs/1.configurations/1.configurations.md)修改参数`heartbeat_interval_secs`。 -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/11.edge-type-statements/4.show-edges.md: -------------------------------------------------------------------------------- 1 | # SHOW EDGES 2 | 3 | `SHOW EDGES`语句显示当前图空间内的所有 Edge type 名称。 4 | 5 | 执行`SHOW EDGES`语句不需要任何权限,但是返回结果由登录的用户[权限](../../7.data-security/1.authentication/3.role-list.md) 决定。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW EDGES; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW EDGES; 17 | +----------+ 18 | | Name | 19 | +----------+ 20 | | "follow" | 21 | | "serve" | 22 | +----------+ 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/11.edge-type-statements/5.describe-edge.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE EDGE 2 | 3 | `DESCRIBE EDGE`显示指定 Edge type 的详细信息,例如字段名称、数据类型等。 4 | 5 | ## 前提条件 6 | 7 | 登录的用户必须拥有对应权限才能执行`DESCRIBE EDGE`语句。详情请参见[内置角色权限](../../7.data-security/1.authentication/3.role-list.md)。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | DESC[RIBE] EDGE 13 | ``` 14 | 15 | `DESCRIBE`可以缩写为`DESC`。 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> DESCRIBE EDGE follow; 21 | +----------+---------+-------+---------+---------+ 22 | | Field | Type | Null | Default | Comment | 23 | +----------+---------+-------+---------+---------+ 24 | | "degree" | "int64" | "YES" | | | 25 | +----------+---------+-------+---------+---------+ 26 | ``` -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/12.vertex-statements/2.update-vertex.md: -------------------------------------------------------------------------------- 1 | # UPDATE VERTEX 2 | 3 | `UPDATE VERTEX`语句可以修改点上 Tag 的属性值。 4 | 5 | {{nebula.name}} 支持 CAS(compare and set)操作。 6 | 7 | !!! note 8 | 9 | 一次只能修改一个 Tag。 10 | 11 | ## 语法 12 | 13 | ```ngql 14 | UPDATE VERTEX ON 15 | SET 16 | [WHEN ] 17 | [YIELD ] 18 | ``` 19 | 20 | | 参数 | 是否必须 | 说明 | 示例 | 21 | |-|-|-|-| 22 | | `ON ` | 是 | 指定点的 Tag。要修改的属性必须在这个 Tag 内。 | `ON player` | 23 | | `` | 是 | 指定要修改的点 ID。 | `"player100"` | 24 | | `SET ` | 是 | 指定如何修改属性值。 | `SET age = age +1` | 25 | | `WHEN ` | 否 | 指定过滤条件。如果``结果为`false`,`SET`子句不会生效。| `WHEN name == "Tim"` | 26 | |`YIELD `| 否 | 指定语句的输出格式。 | `YIELD name AS Name` | 27 | 28 | ## 示例 29 | 30 | ```ngql 31 | // 查看点”player101“的属性。 32 | nebula> FETCH PROP ON player "player101" YIELD properties(vertex); 33 | +--------------------------------+ 34 | | properties(VERTEX) | 35 | +--------------------------------+ 36 | | {age: 36, name: "Tony Parker"} | 37 | +--------------------------------+ 38 | 39 | // 修改属性 age 的值,并返回 name 和新的 age。 40 | nebula> UPDATE VERTEX ON player "player101" \ 41 | SET age = age + 2 \ 42 | WHEN name == "Tony Parker" \ 43 | YIELD name AS Name, age AS Age; 44 | +---------------+-----+ 45 | | Name | Age | 46 | +---------------+-----+ 47 | | "Tony Parker" | 38 | 48 | +---------------+-----+ 49 | ``` -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/12.vertex-statements/4.delete-vertex.md: -------------------------------------------------------------------------------- 1 | # DELETE VERTEX 2 | 3 | `DELETE VERTEX`语句可以删除点,但是默认不删除该点关联的出边和入边。 4 | 5 | !!! compatibility 6 | 7 | {{nebula.name}} 2.x 默认删除点及关联该点的出边和入边,{{nebula.name}} {{nebula.release}} 默认只删除点,不删除该点关联的出边和入边,此时将默认存在悬挂边。 8 | 9 | `DELETE VERTEX`语句一次可以删除一个或多个点。用户可以结合管道符一起使用,详情请参见[管道符](../5.operators/4.pipe.md)。 10 | 11 | !!! note 12 | 13 | - `DELETE VERTEX`是直接删除点,不删除关联的边。 14 | 15 | - `DELETE TAG`是删除指定点上的指定 Tag。 16 | 17 | ## 语法 18 | 19 | ```ngql 20 | DELETE VERTEX [ , ... ] [WITH EDGE]; 21 | ``` 22 | 23 | - `WITH EDGE`: 删除该点关联的出边和入边。 24 | 25 | 26 | ## 示例 27 | 28 | ```ngql 29 | # 删除 VID 为 `team1` 的点,不删除该点关联的出边和入边。 30 | nebula> DELETE VERTEX "team1"; 31 | 32 | # 删除 VID 为 `team1` 的点,并删除该点关联的出边和入边。 33 | nebula> DELETE VERTEX "team1" WITH EDGE; 34 | 35 | ``` 36 | 37 | ```ngql 38 | # 结合管道符,删除符合条件的点。 39 | nebula> GO FROM "player100" OVER serve WHERE properties(edge).start_year == "2021" YIELD dst(edge) AS id | DELETE VERTEX $-.id; 40 | ``` 41 | 42 | ## 删除过程 43 | 44 | {{nebula.name}} 找到目标点并删除,该目标点的所有邻边(出边和入边)将成为悬挂边。 45 | 46 | !!! caution 47 | 48 | * 不支持原子性删除,如果发生错误请重试,避免出现部分删除的情况。否则会导致悬挂边。 49 | * 删除超级节点耗时较多,为避免删除完成前连接超时,可以调整`nebula-graphd.conf`中的参数`--storage_client_timeout_ms`延长超时时间。 50 | 51 | ## 悬挂边视频 52 | 53 | * [{{nebula.name}} 的悬挂边小科普](https://www.bilibili.com/video/BV1GR4y1F7ko)(2 分 28 秒) 54 | 55 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/13.edge-statements/2.update-edge.md: -------------------------------------------------------------------------------- 1 | # UPDATE EDGE 2 | 3 | `UPDATE EDGE`语句可以修改边上 Edge type 的属性。 4 | 5 | {{nebula.name}} 支持 CAS(compare and swap)操作。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | UPDATE EDGE ON 11 | -> [@] 12 | SET 13 | [WHEN ] 14 | [YIELD ] 15 | ``` 16 | 17 | | 参数 | 是否必须 | 说明 | 示例 | 18 | |-|-|-|-| 19 | | `ON ` | 是 | 指定 Edge type。要修改的属性必须在这个 Edge type 内。 | `ON serve` | 20 | | `` | 是 | 指定边的起始点 ID。 | `"player100"` | 21 | | `` | 是 | 指定边的目的点 ID。 | `"team204"` | 22 | | `` | 否 | 指定边的 rank 值。 | `10` | 23 | | `SET ` | 是 | 指定如何修改属性值。 | `SET start_year = start_year +1` | 24 | | `WHEN ` | 否 | 指定过滤条件。如果``结果为`false`,`SET`子句不会生效。 | `WHEN end_year < 2010` | 25 | |`YIELD `| 否 | 指定语句的输出格式。 | `YIELD start_year AS Start_Year` | 26 | 27 | ## 示例 28 | 29 | ```ngql 30 | // 用 GO 语句查看边的属性值。 31 | nebula> GO FROM "player100" \ 32 | OVER serve \ 33 | YIELD properties(edge).start_year, properties(edge).end_year; 34 | +-----------------------------+---------------------------+ 35 | | properties(EDGE).start_year | properties(EDGE).end_year | 36 | +-----------------------------+---------------------------+ 37 | | 1997 | 2016 | 38 | +-----------------------------+---------------------------+ 39 | 40 | // 修改属性 start_year 的值,并返回 end_year 和新的 start_year。 41 | 42 | nebula> UPDATE EDGE ON serve "player100" -> "team204"@0 \ 43 | SET start_year = start_year + 1 \ 44 | WHEN end_year > 2010 \ 45 | YIELD start_year, end_year; 46 | +------------+----------+ 47 | | start_year | end_year | 48 | +------------+----------+ 49 | | 1998 | 2016 | 50 | +------------+----------+ 51 | ``` 52 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/13.edge-statements/4.delete-edge.md: -------------------------------------------------------------------------------- 1 | # DELETE EDGE 2 | 3 | `DELETE EDGE`语句可以删除边。一次可以删除一条或多条边。用户可以结合管道符一起使用,详情请参见[管道符](../5.operators/4.pipe.md)。 4 | 5 | 如果需要删除一个点的所有出边,请删除这个点。详情请参见 [DELETE VERTEX](../12.vertex-statements/4.delete-vertex.md)。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | DELETE EDGE -> [@] [, -> [@] ...] 11 | ``` 12 | 13 | !!! caution 14 | 15 | 如果不指定 rank,则仅仅删除 rank 为 0 的边。需要删除所有的 rank,见如下示例。 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> DELETE EDGE serve "player100" -> "team204"@0; 21 | ``` 22 | 23 | ```ngql 24 | # 结合管道符,删除两点之间同类型的所有rank的边。 25 | nebula> GO FROM "player100" OVER follow \ 26 | WHERE dst(edge) == "player101" \ 27 | YIELD src(edge) AS src, dst(edge) AS dst, rank(edge) AS rank \ 28 | | DELETE EDGE follow $-.src -> $-.dst @ $-.rank; 29 | ``` 30 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/14.native-index-statements/2.show-native-indexes.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEXES 2 | 3 | `SHOW INDEXES`语句可以列出当前图空间内的所有 Tag 和 Edge type(包括属性)的索引。 4 | 5 | ## 语法 6 | 7 | ```ngql 8 | SHOW {TAG | EDGE} INDEXES; 9 | ``` 10 | 11 | ## 示例 12 | 13 | ```ngql 14 | nebula> SHOW TAG INDEXES; 15 | +------------------+--------------+-----------------+ 16 | | Index Name | By Tag | Columns | 17 | +------------------+--------------+-----------------+ 18 | | "fix" | "fix_string" | ["p1"] | 19 | | "player_index_0" | "player" | ["name"] | 20 | | "player_index_1" | "player" | ["name", "age"] | 21 | | "var" | "var_string" | ["p1"] | 22 | +------------------+--------------+-----------------+ 23 | 24 | nebula> SHOW EDGE INDEXES; 25 | +----------------+----------+---------+ 26 | | Index Name | By Edge | Columns | 27 | +----------------+----------+---------+ 28 | | "follow_index" | "follow" | [] | 29 | +----------------+----------+---------+ 30 | ``` 31 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/14.native-index-statements/3.describe-native-index.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE INDEX 2 | 3 | `DESCRIBE INDEX`语句可以查看指定索引的信息,包括索引的属性名称(Field)和数据类型(Type)。 4 | 5 | ## 语法 6 | 7 | ```ngql 8 | DESCRIBE {TAG | EDGE} INDEX ; 9 | ``` 10 | 11 | ## 示例 12 | 13 | ```ngql 14 | nebula> DESCRIBE TAG INDEX player_index_0; 15 | +--------+--------------------+ 16 | | Field | Type | 17 | +--------+--------------------+ 18 | | "name" | "fixed_string(30)" | 19 | +--------+--------------------+ 20 | 21 | nebula> DESCRIBE TAG INDEX player_index_1; 22 | +--------+--------------------+ 23 | | Field | Type | 24 | +--------+--------------------+ 25 | | "name" | "fixed_string(10)" | 26 | | "age" | "int64" | 27 | +--------+--------------------+ 28 | ``` 29 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/14.native-index-statements/5.show-native-index-status.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEX STATUS 2 | 3 | `SHOW INDEX STATUS`语句可以查看索引名称和对应作业的状态。 4 | 5 | 重建索引时的作业状态包括: 6 | 7 | - `QUEUE`:队列中 8 | - `RUNNING`:执行中 9 | - `FINISHED`:已完成 10 | - `FAILED`:失败 11 | - `STOPPED`:停止 12 | - `INVALID`:失效 13 | 14 | !!! note 15 | 16 | 如何创建索引请参见 [CREATE INDEX](1.create-native-index.md)。 17 | 18 | ## 语法 19 | 20 | ```ngql 21 | SHOW {TAG | EDGE} INDEX STATUS; 22 | ``` 23 | 24 | ## 示例 25 | 26 | ```ngql 27 | nebula> SHOW TAG INDEX STATUS; 28 | +----------------------+--------------+ 29 | | Name | Index Status | 30 | +----------------------+--------------+ 31 | | "player_index_0" | "FINISHED" | 32 | | "player_index_1" | "FINISHED" | 33 | +----------------------+--------------+ 34 | ``` 35 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/14.native-index-statements/6.drop-native-index.md: -------------------------------------------------------------------------------- 1 | # DROP INDEX 2 | 3 | `DROP INDEX`语句可以删除当前图空间中已存在的索引。 4 | 5 | ## 前提条件 6 | 7 | 执行`DROP INDEX`语句需要当前登录的用户拥有指定图空间的`DROP TAG INDEX`和`DROP EDGE INDEX`[权限](../../7.data-security/1.authentication/3.role-list.md),否则会报错。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | DROP {TAG | EDGE} INDEX [IF EXISTS] ; 13 | ``` 14 | 15 | `IF EXISTS`:检测待删除的索引是否存在,只有存在时,才会删除索引。 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> DROP TAG INDEX player_index_0; 21 | ``` 22 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/14.native-index-statements/README.md: -------------------------------------------------------------------------------- 1 | # 索引介绍 2 | 3 | 为了提高查询性能,{{nebula.name}} 支持为点的 Tag 或 Tag 的某个属性,边的 Edge type 或 Edge type 的某个属性创建索引。索引可以基于指定的 Tag、Edge type、属性查询数据,但是索引本身不存储数据,而是存储数据的位置。 4 | 5 | {{nebula.name}} 支持两种类型索引:原生索引和全文索引。 6 | 7 | ## 使用说明 8 | 9 | - 索引可以提高查询性能,但是会降低写入性能。 10 | - 索引是执行`LOOKUP`语句时用于定位到数据的前置条件,如果没有索引,执行`LOOKUP`语句会报错。 11 | - 使用索引时,{{nebula.name}} 会自动选择最优的索引。 12 | - 具有高选择度的索引,即索引列中不同值的记录数与总记录数的比值较高(例如身份证号的比值为 1)可显著提升查询性能;而对于低选择度的索引(例如国家),查询性能可能不会带来显著提升。 13 | 14 | ## 原生索引 15 | 16 | 原生索引可以基于指定的属性查询数据,有如下特点: 17 | 18 | - 包括 Tag 索引和 Edge type 索引。 19 | 20 | - 必须手动重建索引(`REBUILD INDEX`)。 21 | 22 | - 支持创建同一个 Tag 或 Edge type 的多个属性的索引(复合索引),但是不能跨 Tag 或 Edge type。 23 | 24 | ### 原生索引操作 25 | 26 | - [CREATE INDEX](1.create-native-index.md) 27 | 28 | - [SHOW CREATE INDEX](2.1.show-create-index.md) 29 | 30 | - [SHOW INDEXES](2.show-native-indexes.md) 31 | 32 | - [DESCRIBE INDEX](3.describe-native-index.md) 33 | 34 | - [REBUILD INDEX](4.rebuild-native-index.md) 35 | 36 | - [SHOW INDEX STATUS](5.show-native-index-status.md) 37 | 38 | - [DROP INDEX](6.drop-native-index.md) 39 | 40 | - [LOOKUP](../7.general-query-statements/5.lookup.md) 41 | 42 | - [MATCH](../7.general-query-statements/2.match.md) 43 | 44 | - [地理空间索引](../3.data-types/10.geography.md) 45 | 46 | ## 全文索引 47 | 48 | 全文索引是基于 Elasticsearch 来实现的,用于对字符串属性进行前缀搜索、通配符搜索、正则表达式搜索和模糊搜索,有如下特点: 49 | 50 | - 只允许创建一个属性的索引。 51 | 52 | - 不支持逻辑操作,例如`AND`、`OR`、`NOT`。 53 | 54 | !!! note 55 | 56 | 如果需要进行整个字符串的匹配,请使用原生索引。 57 | 58 | ## 没有 NULL 值索引 59 | 60 | 不支持对值为 NULL 的属性创建索引。 61 | 62 | ## 没有唯一索引 63 | 64 | 在 Cypher 中,可以通过 Constrains 实现属性值的唯一性限制。在 MySQL 中,可以建立唯一索引来限制某字段只有唯一值。在 nGQL 中没有属性的唯一索引(用户自行保证属性值的唯一性)。 65 | 66 | ## 数字、日期和时间类型的范围查询 67 | 68 | 原生索引还支持对数字、日期和时间类型的属性进行范围查询,不支持其他属性类型的范围查询。 69 | 70 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/17.query-tuning-statements/6.kill-query.md: -------------------------------------------------------------------------------- 1 | # 终止查询 2 | 3 | `KILL QUERY`命令可以终止正在执行的查询,常用于终止慢查询。 4 | 5 | !!! note 6 | 7 | 仅 God 角色权限可以终止任意查询,其他角色只能终止自己的查询。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | KILL QUERY (session=, plan=); 13 | ``` 14 | 15 | - `session_id`:会话 ID。 16 | - `plan_id`:执行计划 ID。 17 | 18 | 会话 ID 和执行计划 ID 可以唯一确定一个查询。二者可以通过 [SHOW QUERIES](../7.general-query-statements/6.show/18.show-queries.md) 语句获取。 19 | 20 | ## 示例 21 | 22 | 在一个会话中执行命令终止另一个会话中的查询: 23 | 24 | ```ngql 25 | nebula> KILL QUERY(SESSION=1625553545984255,PLAN=163); 26 | ``` 27 | 28 | 另一个会话中的查询会终止,并返回如下信息: 29 | 30 | ```ngql 31 | [ERROR (-1005)]: ExecutionPlanId[1001] does not exist in current Session. 32 | ``` 33 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/3.data-types/1.numeric.md: -------------------------------------------------------------------------------- 1 | # 数值 2 | 3 | nGQL 支持整数和浮点数。 4 | 5 | ## 整数 6 | 7 | nGQL 支持带符号的 64 位整数(INT64)、32 位整数(INT32)、16 位整数(INT16)和 8 位整数(INT8)。 8 | 9 | | 类型 | 声明关键字 | 范围 | 10 | |-|-|-| 11 | | INT64 | `INT64`或`INT` | -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807 | 12 | | INT32 | `INT32` | -2,147,483,648 ~ 2,147,483,647 | 13 | | INT16 | `INT16` | -32,768 ~ 32,767 | 14 | | INT8 | `INT8` | -128 ~ 127 | 15 | 16 | ## 浮点数 17 | 18 | nGQL 支持单精度浮点(FLOAT)和双精度浮点(DOUBLE)。 19 | 20 | | 类型 | 声明关键字 | 范围 | 精度 | 21 | |-|-|-|-| 22 | | FLOAT | `FLOAT` | 3.4E +/- 38 | 6~7 位 | 23 | | DOUBLE | `DOUBLE` | 1.7E +/- 308 | 15~16 位 | 24 | 25 | nGQL 支持科学计数法,例如`1e2`、`1.1e2`、`.3e4`、`1.e4`、`-1234E-10`。 26 | 27 | !!! note 28 | 29 | 不支持 MySQL 中的 DECIMAL 数据类型。 30 | 31 | ## 数值的读写 32 | 33 | 在写入和读取不同类型的数据时,nGQL 的行为遵守以下规则: 34 | 35 | | 数值类型 | 设置为 VID | 设置为属性类型 | 读取该类型的属性值得到的类型 | 36 | |-|-|-|-| 37 | | INT64 | 支持 | 支持 | INT64 | 38 | | INT32 | 不支持 | 支持 | INT64 | 39 | | INT16 | 不支持 | 支持 | INT64 | 40 | | INT8 | 不支持 | 支持 | INT64 | 41 | | FLOAT | 不支持 | 支持 | DOUBLE | 42 | | DOUBLE | 不支持 | 支持 | DOUBLE | 43 | 44 | 例如,nGQL 不支持设置 INT8 类型的 [VID](../../1.introduction/3.vid.md),但支持将 [TAG](../10.tag-statements/1.create-tag.md) 或 [Edge type](../11.edge-type-statements/1.create-edge.md) 的某个属性类型设置为 INT8。当使用 nGQL 语句读取 INT8 类型的属性时,获取到的值的类型为 INT64。 45 | 46 | - {{nebula.name}} 支持写入多种进制的数值: 47 | 48 | - 十进制,例如`123456`。 49 | - 十六进制,例如`0x1e240`。 50 | - 八进制,例如`0361100`。 51 | 52 | 但 {{nebula.name}} 会将写入的非十进制数值解析为十进制的值保存。读取到的值为十进制。 53 | 54 | 例如,属性`score`的类型为`INT`,通过 INSERT 语句为其赋值`0xb`,使用 FETCH 等语句查询该属性值获取到的结果是`11`,即将十六进制的`0xb`转换为十进制后的值。 55 | 56 | - 将 FLOAT/DOUBLE 类型的数值插入 INT 类型的列,会将数值四舍五入取整。 57 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/3.data-types/2.boolean.md: -------------------------------------------------------------------------------- 1 | # 布尔 2 | 3 | {{nebula.name}} 使用关键字`BOOL`声明布尔数据类型,可选值为`true`或`false`。 4 | 5 | nGQL 支持以如下方式使用布尔值: 6 | 7 | * 将属性值的数据类型定义为布尔。 8 | * 在`WHERE`子句中用布尔值作为判断条件。 9 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/3.data-types/7.set.md: -------------------------------------------------------------------------------- 1 | # 集合 2 | 3 | 集合(Set)是复合数据类型,集合中是一组元素,与列表(List)不同的是,集合中的元素是无序的,且不允许重复。 4 | 5 | 集合用左花括号({)和右花括号(})包裹多个元素,各个元素之间用英文逗号(,)隔开。元素前后的空格在集合中被忽略,因此可以使用换行符、制表符和空格调整格式。 6 | 7 | ## OpenCypher 兼容性 8 | 9 | - 复合数据类型(例如 List、Set、Map)**不能**存储为点或边的属性。 10 | 11 | - 在 OpenCypher 中,集合不是一个数据类型,而在 nGQL 中,用户可以使用集合。 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | # 返回集合 {1,2,3}。 17 | nebula> RETURN set{1, 2, 3} AS a; 18 | +-----------+ 19 | | a | 20 | +-----------+ 21 | | {3, 2, 1} | 22 | +-----------+ 23 | 24 | # 返回集合 {1,2,1},因为集合不允许重复元素,会返回 {1,2},且顺序是无序的。 25 | nebula> RETURN set{1, 2, 1} AS a; 26 | +--------+ 27 | | a | 28 | +--------+ 29 | | {2, 1} | 30 | +--------+ 31 | 32 | # 判断集合中是否有指定元素 1。 33 | nebula> RETURN 1 IN set{1, 2} AS a; 34 | +------+ 35 | | a | 36 | +------+ 37 | | true | 38 | +------+ 39 | 40 | # 计算集合中的元素数量。 41 | nebula> YIELD size(set{1, 2, 1}) AS a; 42 | +---+ 43 | | a | 44 | +---+ 45 | | 2 | 46 | +---+ 47 | 48 | # 返回目标点属性值组成的集合。 49 | nebula> GO FROM "player100" OVER follow \ 50 | YIELD set{properties($$).name,properties($$).age} as a; 51 | +-----------------------+ 52 | | a | 53 | +-----------------------+ 54 | | {36, "Tony Parker"} | 55 | | {41, "Manu Ginobili"} | 56 | +-----------------------+ 57 | ``` 58 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/3.data-types/8.map.md: -------------------------------------------------------------------------------- 1 | # 映射 2 | 3 | 映射(Map)是复合数据类型。一个映射是一组键值对(Key-Value)的无序集合。在映射中,Key 是字符串类型,Value 可以是任何数据类型。用户可以通过`map['']`的方法获取映射中的元素。 4 | 5 | 映射用左花括号({)和右花括号(})包裹多个键值对,各个键值对之间用英文逗号(,)隔开。键值对前后的空格在映射中被忽略,因此可以使用换行符、制表符和空格调整格式。 6 | 7 | ## OpenCypher 兼容性 8 | 9 | - 复合数据类型(例如 List、Set、Map)**不能**存储为点或边的属性。 10 | 11 | - 不支持映射投影(map projection)。 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | # 返回简单的映射。 17 | nebula> YIELD map{key1: 'Value1', Key2: 'Value2'} as a; 18 | +----------------------------------+ 19 | | a | 20 | +----------------------------------+ 21 | | {Key2: "Value2", key1: "Value1"} | 22 | +----------------------------------+ 23 | 24 | # 返回列表类型的映射。 25 | nebula> YIELD map{listKey: [{inner: 'Map1'}, {inner: 'Map2'}]} as a; 26 | +-----------------------------------------------+ 27 | | a | 28 | +-----------------------------------------------+ 29 | | {listKey: [{inner: "Map1"}, {inner: "Map2"}]} | 30 | +-----------------------------------------------+ 31 | 32 | # 返回混合类型的映射。 33 | nebula> RETURN map{a: LIST[1,2], b: SET{1,2,1}, c: "hee"} as a; 34 | +----------------------------------+ 35 | | a | 36 | +----------------------------------+ 37 | | {a: [1, 2], b: {2, 1}, c: "hee"} | 38 | +----------------------------------+ 39 | 40 | # 返回映射中的指定元素。 41 | nebula> RETURN map{a: LIST[1,2], b: SET{1,2,1}, c: "hee"}["b"] AS b; 42 | +--------+ 43 | | b | 44 | +--------+ 45 | | {2, 1} | 46 | +--------+ 47 | 48 | # 判断映射中是否有指定key,暂不支持判断value。 49 | nebula> RETURN "a" IN MAP{a:1, b:2} AS a; 50 | +------+ 51 | | a | 52 | +------+ 53 | | true | 54 | +------+ 55 | ``` 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/3.data-types/9.type-conversion.md: -------------------------------------------------------------------------------- 1 | # 类型转换 2 | 3 | 类型转换是指将表达式的类型转换为另一个类型。 4 | 5 | {{nebula.name}} 支持显式地转换类型。详情参见[类型转换函数](../6.functions-and-expressions/16.type-conversion.md)。 6 | 7 | ## 示例 8 | 9 | ```ngql 10 | # 将列表拆分,并各自转换为布尔值显示。 11 | nebula> UNWIND [true, false, 'true', 'false', NULL] AS b \ 12 | RETURN toBoolean(b) AS b; 13 | +----------+ 14 | | b | 15 | +----------+ 16 | | true | 17 | +----------+ 18 | | false | 19 | +----------+ 20 | | true | 21 | +----------+ 22 | | false | 23 | +----------+ 24 | | __NULL__ | 25 | +----------+ 26 | 27 | # 将整数或字符串转换为浮点数。 28 | nebula> RETURN toFloat(1), toFloat('1.3'), toFloat('1e3'), toFloat('not a number'); 29 | +------------+----------------+----------------+-------------------------+ 30 | | toFloat(1) | toFloat("1.3") | toFloat("1e3") | toFloat("not a number") | 31 | +------------+----------------+----------------+-------------------------+ 32 | | 1.0 | 1.3 | 1000.0 | __NULL__ | 33 | +------------+----------------+----------------+-------------------------+ 34 | ``` 35 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/5.operators/10.arithmetic.md: -------------------------------------------------------------------------------- 1 | # 算术运算符 2 | 3 | {{nebula.name}} 支持的算术运算符如下。 4 | 5 | | 符号 | 说明 | 6 | |:----|:----:| 7 | | `+` | 加法 | 8 | | `-` | 减法 | 9 | | `*` | 乘法 | 10 | | `/` | 除法 | 11 | | `%` | 取模 | 12 | | `-` | 负数符号 | 13 | 14 | ## 示例 15 | 16 | ```ngql 17 | # 返回 1+2 的结果。 18 | nebula> RETURN 1+2 AS result; 19 | +--------+ 20 | | result | 21 | +--------+ 22 | | 3 | 23 | +--------+ 24 | 25 | # 返回 -10+5 的结果。 26 | nebula> RETURN -10+5 AS result; 27 | +--------+ 28 | | result | 29 | +--------+ 30 | | -5 | 31 | +--------+ 32 | 33 | # 返回 (3*8)%5 的结果。 34 | nebula> RETURN (3*8)%5 AS result; 35 | +--------+ 36 | | result | 37 | +--------+ 38 | | 4 | 39 | +--------+ 40 | 41 | ``` 42 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/5.operators/2.boolean.md: -------------------------------------------------------------------------------- 1 | # 布尔符 2 | 3 | {{nebula.name}} 支持的布尔符如下。 4 | 5 | | 符号 | 说明 | 6 | | :------- | :-------------: | 7 | | AND | 逻辑与 | 8 | | OR | 逻辑或 | 9 | | NOT | 逻辑非 | 10 | | XOR | 逻辑异或 | 11 | 12 | 对于以上运算的优先级,请参见[运算优先级](9.precedence.md)。 13 | 14 | 对于带有`NULL`的逻辑运算,请参见 [NULL](../3.data-types/5.null.md)。 15 | 16 | !!! note 17 | 18 | 非 0 数字不能转换为布尔值。 19 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/5.operators/4.pipe.md: -------------------------------------------------------------------------------- 1 | # 管道符 2 | 3 | nGQL 支持使用管道符(|)将多个查询组合起来。 4 | 5 | ## openCypher 兼容性 6 | 7 | 管道符仅适用于原生 nGQL。 8 | 9 | ## 语法 10 | 11 | nGQL 和 SQL 之间的一个主要区别是子查询的组成方式。 12 | 13 | - 在 SQL 中,子查询是嵌套在查询语句中的。 14 | 15 | - 在 nGQL 中,子查询是通过类似 shell 中的管道符(`|`)实现的。 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> GO FROM "player100" OVER follow \ 21 | YIELD dst(edge) AS dstid, properties($$).name AS Name | \ 22 | GO FROM $-.dstid OVER follow YIELD dst(edge); 23 | 24 | +-------------+ 25 | | dst(EDGE) | 26 | +-------------+ 27 | | "player100" | 28 | | "player102" | 29 | | "player125" | 30 | | "player100" | 31 | +-------------+ 32 | ``` 33 | 34 | 必须在`YIELD`子句中为需要的返回结果设置别名,才能在管道符右侧使用引用符`$-`,例如示例中的`$-.dstid`。 35 | 36 | ## 性能提示 37 | 38 | {{nebula.name}} 中的管道对性能有影响,以`A | B`为例,体现在以下几个方面: 39 | 40 | 1. 管道是同步操作。也即需要管道之前的子句`A`执行完毕后,数据才能整体进入管道子句。 41 | 42 | 2. 如果`A`发大量数据给 `|`,整个查询请求的总体时延可能会非常大。此时可以尝试拆分这个语句: 43 | 44 | 1. 应用程序发送`A`, 45 | 46 | 2. 将收到的返回结果在应用程序拆分, 47 | 48 | 3. 并发发送给多个 graphd, 49 | 50 | 4. 每个 graphd 执行部分 B。 51 | 52 | 这样通常比单个 graphd 执行完整地`A | B`要快很多。 53 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/5.operators/8.list.md: -------------------------------------------------------------------------------- 1 | # 列表运算符 2 | 3 | {{nebula.name}} 支持使用列表(List)运算符进行运算。支持的运算符如下。 4 | 5 | | 名称 | 说明 | 6 | |:----- |:------------------| 7 | | + | 连接列表。 | 8 | | IN | 元素是否存在于列表中。 | 9 | |[] | 使用下标操作符访问列表中的元素。| 10 | 11 | ## 示例 12 | 13 | ```ngql 14 | # 返回连接后的列表。 15 | nebula> YIELD [1,2,3,4,5]+[6,7] AS myList; 16 | +-----------------------+ 17 | | myList | 18 | +-----------------------+ 19 | | [1, 2, 3, 4, 5, 6, 7] | 20 | +-----------------------+ 21 | 22 | # 返回列表中的元素数量。 23 | nebula> RETURN size([NULL, 1, 2]); 24 | +------------------+ 25 | | size([NULL,1,2]) | 26 | +------------------+ 27 | | 3 | 28 | +------------------+ 29 | 30 | # 返回 NULL 是否存在列表中。 31 | nebula> RETURN NULL IN [NULL, 1]; 32 | +--------------------+ 33 | | (NULL IN [NULL,1]) | 34 | +--------------------+ 35 | | __NULL__ | 36 | +--------------------+ 37 | 38 | # 返回在列表[2, 3, 4, 5]中存在,且也在列表[2, 3, 8]中存在的元素,并拆分显示。 39 | nebula> WITH [2, 3, 4, 5] AS numberlist \ 40 | UNWIND numberlist AS number \ 41 | WITH number \ 42 | WHERE number IN [2, 3, 8] \ 43 | RETURN number; 44 | +--------+ 45 | | number | 46 | +--------+ 47 | | 2 | 48 | | 3 | 49 | +--------+ 50 | 51 | # 返回列表中下标为 1 的元素。 52 | nebula> WITH ['Anne', 'John', 'Bill', 'Diane', 'Eve'] AS names RETURN names[1] AS result; 53 | +--------+ 54 | | result | 55 | +--------+ 56 | | "John" | 57 | +--------+ 58 | ``` 59 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/5.operators/9.precedence.md: -------------------------------------------------------------------------------- 1 | # 运算符优先级 2 | 3 | nGQL 运算符的优先级从高到低排列如下(同一行的运算符优先级相同): 4 | 5 | - `-`(负数) 6 | - `!`、`NOT` 7 | - `*`、`/`、`%` 8 | - `-`、`+` 9 | - `==`、`>=`、`>`、`<=`、`<`、`<>`、`!=` 10 | - `AND` 11 | - `OR`、`XOR` 12 | - `=`(赋值) 13 | 14 | 如果表达式中有相同优先级的运算符,运算是从左到右进行,只有赋值操作是例外(从右到左运算)。 15 | 16 | 运算符的优先级决定运算的顺序,要显式修改运算顺序,可以使用圆括号。 17 | 18 | ## 示例 19 | 20 | ```ngql 21 | nebula> RETURN 2+3*5; 22 | +-----------+ 23 | | (2+(3*5)) | 24 | +-----------+ 25 | | 17 | 26 | +-----------+ 27 | 28 | nebula> RETURN (2+3)*5; 29 | +-----------+ 30 | | ((2+3)*5) | 31 | +-----------+ 32 | | 25 | 33 | +-----------+ 34 | ``` 35 | 36 | ## openCypher 兼容性 37 | 38 | 在 openCypher 中,比较操作可以任意连接,例如`x < y <= z`等价于`x < y AND y <= z`。 39 | 40 | 在 nGQL 中,`x < y <= z`等价于`(x < y) <= z`,`(x < y)`的结果是一个布尔值,再将布尔值和`z`比较,最终结果是`NULL`。 41 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/6.functions-and-expressions/3.date-and-time.md: -------------------------------------------------------------------------------- 1 | # 内置日期时间函数 2 | 3 | {{nebula.name}} 支持以下内置日期时间函数。 4 | 5 | |函数| 说明 | 6 | |:---- | :----| 7 | |int now() | 根据当前系统返回当前时间戳。 | 8 | |timestamp timestamp() | 根据当前系统返回当前时间戳。 | 9 | |date date() | 根据当前系统返回当前日期(UTC 时间)。 | 10 | |time time() | 根据当前系统返回当前时间(UTC 时间)。 | 11 | |datetime datetime() | 根据当前系统返回当前日期和时间(UTC 时间)。 | 12 | |map duration() | 持续时间。可以用于对指定时间进行计算。 | 13 | 14 | 详细信息参见[日期和时间类型](../3.data-types/4.date-and-time.md)。 15 | 16 | ## 示例 17 | 18 | ```ngql 19 | nebula> RETURN now(), timestamp(), date(), time(), datetime(); 20 | +------------+-------------+------------+-----------------+----------------------------+ 21 | | now() | timestamp() | date() | time() | datetime() | 22 | +------------+-------------+------------+-----------------+----------------------------+ 23 | | 1640057560 | 1640057560 | 2021-12-21 | 03:32:40.351000 | 2021-12-21T03:32:40.351000 | 24 | +------------+-------------+------------+-----------------+----------------------------+ 25 | ``` 26 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/6.functions-and-expressions/9.user-defined-functions.md: -------------------------------------------------------------------------------- 1 | # 自定义函数 2 | 3 | ## openCypher 兼容性 4 | 5 | {{nebula.name}} {{ nebula.release }} 不支持自定义函数(UDF)和存储过程。 6 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md: -------------------------------------------------------------------------------- 1 | # SHOW CHARSET 2 | 3 | `SHOW CHARSET`语句显示当前的字符集。 4 | 5 | 目前可用的字符集为`utf8`和`utf8mb4`。默认字符集为`utf8`。 {{nebula.name}} 扩展`uft8`支持四字节字符,因此`utf8`和`utf8mb4`是等价的。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW CHARSET; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW CHARSET; 17 | +---------+-----------------+-------------------+--------+ 18 | | Charset | Description | Default collation | Maxlen | 19 | +---------+-----------------+-------------------+--------+ 20 | | "utf8" | "UTF-8 Unicode" | "utf8_bin" | 4 | 21 | +---------+-----------------+-------------------+--------+ 22 | ``` 23 | 24 | |参数|说明| 25 | |:---|:---| 26 | |`Charset`|字符集名称。| 27 | |`Description`|字符集说明。| 28 | |`Default collation`|默认排序规则。| 29 | |`Maxlen`|存储一个字符所需的最大字节数。| 30 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/10.show-roles.md: -------------------------------------------------------------------------------- 1 | # SHOW ROLES 2 | 3 | `SHOW ROLES`语句显示分配给用户的角色信息。 4 | 5 | 根据登录的用户角色,返回的结果也有所不同: 6 | 7 | - 如果登录的用户角色是`GOD`,或者有权访问该图空间的`ADMIN`,则返回该图空间内除`GOD`之外的所有用户角色信息。 8 | 9 | - 如果登录的用户角色是有权访问该图空间`DBA`、`USER`或`GUEST`,则返回自身的角色信息。 10 | 11 | - 如果登录的用户角色没有权限访问该图空间,则返回权限错误。 12 | 13 | 关于角色的详情请参见[内置角色权限](../../../7.data-security/1.authentication/3.role-list.md)。 14 | 15 | ## 语法 16 | 17 | ```ngql 18 | SHOW ROLES IN ; 19 | ``` 20 | 21 | ## 示例 22 | 23 | ```ngql 24 | nebula> SHOW ROLES in basketballplayer; 25 | +---------+-----------+ 26 | | Account | Role Type | 27 | +---------+-----------+ 28 | | "user1" | "ADMIN" | 29 | +---------+-----------+ 30 | ``` -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md: -------------------------------------------------------------------------------- 1 | # SHOW SNAPSHOTS 2 | 3 | `SHOW SNAPSHOTS`语句显示所有快照信息。 4 | 5 | 快照的使用方式请参见[管理快照](../../../backup-and-restore/3.manage-snapshot.md)。 6 | 7 | ## 角色要求 8 | 9 | 只有`GOD`角色的用户(即`root`)才能执行`SHOW SNAPSHOTS`语句。 10 | 11 | ## 语法 12 | 13 | ```ngql 14 | SHOW SNAPSHOTS; 15 | ``` 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> SHOW SNAPSHOTS; 21 | +--------------------------------+---------+-----------------------------------------------------+ 22 | | Name | Status | Hosts | 23 | +--------------------------------+---------+-----------------------------------------------------+ 24 | | "SNAPSHOT_2020_12_16_11_13_55" | "VALID" | "storaged0:9779, storaged1:9779, storaged2:9779" | 25 | | "SNAPSHOT_2020_12_16_11_14_10" | "VALID" | "storaged0:9779, storaged1:9779, storaged2:9779" | 26 | +--------------------------------+---------+-----------------------------------------------------+ 27 | ``` 28 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md: -------------------------------------------------------------------------------- 1 | # SHOW SPACES 2 | 3 | `SHOW SPACES`语句显示现存的图空间。 4 | 5 | 如何创建图空间,请参见 [CREATE SPACE](./../../9.space-statements/1.create-space.md)。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW SPACES; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW SPACES; 17 | +---------------------+ 18 | | Name | 19 | +---------------------+ 20 | | "docs" | 21 | | "basketballplayer" | 22 | +---------------------+ 23 | ``` 24 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md: -------------------------------------------------------------------------------- 1 | # SHOW TAGS/EDGES 2 | 3 | `SHOW TAGS`语句显示当前图空间内的所有 Tag。 4 | 5 | `SHOW EDGES`语句显示当前图空间内的所有 Edge type。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW {TAGS | EDGES}; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW TAGS; 17 | +----------+ 18 | | Name | 19 | +----------+ 20 | | "player" | 21 | | "star" | 22 | | "team" | 23 | +----------+ 24 | 25 | nebula> SHOW EDGES; 26 | +----------+ 27 | | Name | 28 | +----------+ 29 | | "follow" | 30 | | "serve" | 31 | +----------+ 32 | ``` 33 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/16.show-users.md: -------------------------------------------------------------------------------- 1 | # SHOW USERS 2 | 3 | `SHOW USERS`语句显示用户信息。 4 | 5 | ## 角色要求 6 | 7 | 只有`GOD`角色的用户(即`root`)才能执行`SHOW USERS`语句。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | SHOW USERS; 13 | ``` 14 | 15 | ## 示例 16 | 17 | ```ngql 18 | nebula> SHOW USERS; 19 | +---------+-----------------+ 20 | | Account | IP Whitelist | 21 | +---------+-----------------+ 22 | | "root" | "" | 23 | | "user1" | "" | 24 | | "user2" | "192.168.10.10" | 25 | +---------+-----------------+ 26 | ``` 27 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md: -------------------------------------------------------------------------------- 1 | # SHOW META LEADER 2 | 3 | `SHOW META LEADER`语句显示当前 Meta 集群的 leader 信息。 4 | 5 | 关于 Meta 服务的详细说明请参见 [Meta 服务](../../../1.introduction/3.nebula-graph-architecture/2.meta-service.md)。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW META LEADER; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW META LEADER; 17 | +------------------+---------------------------+ 18 | | Meta Leader | secs from last heart beat | 19 | +------------------+---------------------------+ 20 | | "127.0.0.1:9559" | 3 | 21 | +------------------+---------------------------+ 22 | ``` 23 | 24 | |参数|说明| 25 | |:---|:---| 26 | |`Meta Leader`|Meta 集群的 leader 信息,包括 leader 所在服务器的 IP(或主机名)和端口。| 27 | |`secs from last heart beat`|距离上次心跳的时间间隔。单位:秒。| 28 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/2.show-collation.md: -------------------------------------------------------------------------------- 1 | # SHOW COLLATION 2 | 3 | `SHOW COLLATION`语句显示当前的排序规则。 4 | 5 | 目前可用的排序规则为`utf8_bin`和`utf8mb4_bin`。 6 | 7 | - 当字符集为`utf8`,默认排序规则为`utf8_bin`。 8 | 9 | - 当字符集为`utf8mb4`,默认排序规则为`utf8mb4_bin`。 10 | 11 | ## 语法 12 | 13 | ```ngql 14 | SHOW COLLATION; 15 | ``` 16 | 17 | ## 示例 18 | 19 | ```ngql 20 | nebula> SHOW COLLATION; 21 | +------------+---------+ 22 | | Collation | Charset | 23 | +------------+---------+ 24 | | "utf8_bin" | "utf8" | 25 | +------------+---------+ 26 | ``` 27 | 28 | |参数|说明| 29 | |:---|:---| 30 | |`Collation`|排序规则名称。| 31 | |`Charset`|与排序规则关联的字符集名称。| 32 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/4.show-create-space.md: -------------------------------------------------------------------------------- 1 | # SHOW CREATE SPACE 2 | 3 | `SHOW CREATE SPACE`语句显示指定图空间的创建语句。 4 | 5 | 图空间的更多详细信息,请参见 [CREATE SPACE](../../9.space-statements/1.create-space.md)。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW CREATE SPACE ; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW CREATE SPACE basketballplayer; 17 | +--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ 18 | | Space | Create Space | 19 | +--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ 20 | | "basketballplayer" | "CREATE SPACE `basketballplayer` (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32))" | 21 | +--------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ 22 | ``` 23 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/5.show-create-tag-edge.md: -------------------------------------------------------------------------------- 1 | # SHOW CREATE TAG/EDGE 2 | 3 | `SHOW CREATE TAG`语句显示指定 Tag 的基本信息。Tag 的更多详细信息,请参见 [CREATE TAG](../../10.tag-statements/1.create-tag.md)。 4 | 5 | `SHOW CREATE EDGE`语句显示指定 Edge type 的基本信息。Edge type 的更多详细信息,请参见 [CREATE EDGE](../../11.edge-type-statements/1.create-edge.md)。 6 | 7 | ## 语法 8 | 9 | ```ngql 10 | SHOW CREATE {TAG | EDGE }; 11 | ``` 12 | 13 | ## 示例 14 | 15 | ```ngql 16 | nebula> SHOW CREATE TAG player; 17 | +----------+-----------------------------------+ 18 | | Tag | Create Tag | 19 | +----------+-----------------------------------+ 20 | | "player" | "CREATE TAG `player` ( | 21 | | | `name` string NULL, | 22 | | | `age` int64 NULL | 23 | | | ) ttl_duration = 0, ttl_col = """ | 24 | +----------+-----------------------------------+ 25 | 26 | nebula> SHOW CREATE EDGE follow; 27 | +----------+-----------------------------------+ 28 | | Edge | Create Edge | 29 | +----------+-----------------------------------+ 30 | | "follow" | "CREATE EDGE `follow` ( | 31 | | | `degree` int64 NULL | 32 | | | ) ttl_duration = 0, ttl_col = """ | 33 | +----------+-----------------------------------+ 34 | ``` 35 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEX STATUS 2 | 3 | `SHOW INDEX STATUS`语句显示重建原生索引的作业状态,以便确定重建索引是否成功。 4 | 5 | ## 语法 6 | 7 | ```ngql 8 | SHOW {TAG | EDGE} INDEX STATUS; 9 | ``` 10 | 11 | ## 示例 12 | 13 | ```ngql 14 | nebula> SHOW TAG INDEX STATUS; 15 | +------------------------------------+--------------+ 16 | | Name | Index Status | 17 | +------------------------------------+--------------+ 18 | | "date1_index" | "FINISHED" | 19 | | "basketballplayer_all_tag_indexes" | "FINISHED" | 20 | | "any_shape_geo_index" | "FINISHED" | 21 | +------------------------------------+--------------+ 22 | 23 | nebula> SHOW EDGE INDEX STATUS; 24 | +----------------+--------------+ 25 | | Name | Index Status | 26 | +----------------+--------------+ 27 | | "follow_index" | "FINISHED" | 28 | +----------------+--------------+ 29 | ``` 30 | 31 | ## 相关文档 32 | 33 | - [管理作业](../../4.job-statements.md) 34 | 35 | - [REBUILD NATIVE INDEX](../../14.native-index-statements/4.rebuild-native-index.md) 36 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md: -------------------------------------------------------------------------------- 1 | # SHOW INDEXES 2 | 3 | `SHOW INDEXES`语句可以列出当前图空间内的所有 Tag 和 Edge type(包括属性)的索引。 4 | 5 | ## 语法 6 | 7 | ```ngql 8 | SHOW {TAG | EDGE} INDEXES; 9 | ``` 10 | 11 | ## 示例 12 | 13 | ```ngql 14 | nebula> SHOW TAG INDEXES; 15 | +------------------+----------+----------+ 16 | | Index Name | By Tag | Columns | 17 | +------------------+----------+----------+ 18 | | "player_index_0" | "player" | [] | 19 | | "player_index_1" | "player" | ["name"] | 20 | +------------------+----------+----------+ 21 | 22 | nebula> SHOW EDGE INDEXES; 23 | +----------------+----------+---------+ 24 | | Index Name | By Edge | Columns | 25 | +----------------+----------+---------+ 26 | | "follow_index" | "follow" | [] | 27 | +----------------+----------+---------+ 28 | ``` 29 | 30 | !!! compatibility "历史版本兼容性" 31 | 32 | {{nebula.name}} 2.0.1 中, `SHOW TAG/EDGE INDEXES` 语句仅返回 `Names`。 33 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/8.clauses-and-options/sample.md: -------------------------------------------------------------------------------- 1 | # SAMPLE 2 | 3 | `SAMPLE`子句用于在结果集中均匀取样并返回指定数量的数据。 4 | 5 | `SAMPLE`仅能在`GO`语句中使用,语法如下: 6 | 7 | ```ngql 8 | SAMPLE ; 9 | ``` 10 | 11 | `sample_list`是一个列表,列表中的元素必须为自然数,且元素数量必须与`GO`语句中的`STEPS`的最大数相同。下文以`GO 1 TO 3 STEPS FROM "A" OVER * SAMPLE `为例详细介绍`SAMPLE`的用法。 12 | 13 | * 列表`sample_list`必须包含 3 个自然数元素,例如`GO 1 TO 3 STEPS FROM "A" OVER * SAMPLE [1,2,4]`。 14 | * `SAMPLE [1,2,4]`中的`1`表示系统在第一步时自动选择 1 条边继续遍历,`2`表示在第二步时选择 2 条边继续遍历,`4`表示在第三步时选择 4 条边继续遍历。如果某一步没有匹配的边或者匹配到的边数量小于指定数量,则按实际数量返回。 15 | * 因为`GO 1 TO 3 STEPS`表示返回第一到第三步的所有遍历结果,因此下图中所有红色边和它们的原点与目的点都会被这条`GO`语句匹配上,而黄色边表示`GO`语句遍历时没有选择的路径。如果不是`GO 1 TO 3 STEPS`而是`GO 3 STEPS`,则只会匹配上第三步的红色边和它们两端的点。 16 | 17 | ![SAMPLE in GO](https://docs-cdn.nebula-graph.com.cn/figures/sample_in_go.png) 18 | 19 | 在 basketballplayer 数据集中的执行示例如下: 20 | 21 | ```ngql 22 | nebula> GO 3 STEPS FROM "player100" \ 23 | OVER * \ 24 | YIELD properties($$).name AS NAME, properties($$).age AS Age \ 25 | SAMPLE [1,2,3]; 26 | +-----------------+----------+ 27 | | NAME | Age | 28 | +-----------------+----------+ 29 | | "Tony Parker" | 36 | 30 | | "Manu Ginobili" | 41 | 31 | | "Spurs" | __NULL__ | 32 | +-----------------+----------+ 33 | 34 | nebula> GO 1 TO 3 STEPS FROM "player100" \ 35 | OVER * \ 36 | YIELD properties($$).name AS NAME, properties($$).age AS Age \ 37 | SAMPLE [2,2,2]; 38 | +-----------------+----------+ 39 | | NAME | Age | 40 | +-----------------+----------+ 41 | | "Manu Ginobili" | 41 | 42 | | "Spurs" | __NULL__ | 43 | | "Tim Duncan" | 42 | 44 | | "Spurs" | __NULL__ | 45 | | "Manu Ginobili" | 41 | 46 | | "Spurs" | __NULL__ | 47 | +-----------------+----------+ 48 | ``` 49 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/9.space-statements/2.use-space.md: -------------------------------------------------------------------------------- 1 | # USE 2 | 3 | `USE`语句可以指定一个图空间,或切换到另一个图空间,将其作为后续查询的工作空间。 4 | 5 | ## 前提条件 6 | 7 | 执行`USE`语句指定图空间时,需要当前登录的用户拥有指定图空间的[权限](../../7.data-security/1.authentication/1.authentication.md),否则会报错。 8 | 9 | ## 语法 10 | 11 | ```ngql 12 | USE ; 13 | ``` 14 | 15 | ## 示例 16 | 17 | ```ngql 18 | # 创建示例空间。 19 | nebula> CREATE SPACE IF NOT EXISTS space1 (vid_type=FIXED_STRING(30)); 20 | nebula> CREATE SPACE IF NOT EXISTS space2 (vid_type=FIXED_STRING(30)); 21 | 22 | # 指定图空间 space1 作为工作空间。 23 | nebula> USE space1; 24 | 25 | # 切换到图空间 space2。检索 space2 时,无法从 space1 读取任何数据,检索的点和边与 space1 无关。 26 | nebula> USE space2; 27 | ``` 28 | 29 | !!! caution 30 | 31 | 不能在一条语句中同时操作两个图空间。 32 | 33 | 与 Fabric Cypher 不同,{{nebula.name}} 的图空间彼此之间是完全隔离的,将一个图空间作为工作空间后,用户无法访问其他空间。使用新图空间的唯一方法是通过`USE`语句切换。而在 Fabric Cypher 中可以在一条语句中 (`USE + CALL`语法)使用两个图空间。 34 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/9.space-statements/3.show-spaces.md: -------------------------------------------------------------------------------- 1 | # SHOW SPACES 2 | 3 | `SHOW SPACES`语句可以列出 {{nebula.name}} 示例中的所有图空间。 4 | 5 | ## 语法 6 | 7 | ```ngql 8 | SHOW SPACES; 9 | ``` 10 | 11 | ## 示例 12 | 13 | ```ngql 14 | nebula> SHOW SPACES; 15 | +--------------------+ 16 | | Name | 17 | +--------------------+ 18 | | "cba" | 19 | | "basketballplayer" | 20 | +--------------------+ 21 | ``` 22 | 23 | 创建图空间请参见 [CREATE SPACE](1.create-space.md)。 24 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/9.space-statements/4.describe-space.md: -------------------------------------------------------------------------------- 1 | # DESCRIBE SPACE 2 | 3 | `DESCRIBE SPACE`语句可以显示指定图空间的信息。 4 | 5 | ## 语法 6 | 7 | 你可以用`DESC`作为`DESCRIBE`的缩写。 8 | 9 | ```ngql 10 | DESC[RIBE] SPACE ; 11 | ``` 12 | 13 | ## 示例 14 | 15 | 16 | ```ngql 17 | nebula> DESCRIBE SPACE basketballplayer; 18 | +----+--------------------+------------------+----------------+---------+------------+--------------------+---------+ 19 | | ID | Name | Partition Number | Replica Factor | Charset | Collate | Vid Type | Comment | 20 | +----+--------------------+------------------+----------------+---------+------------+--------------------+---------+ 21 | | 1 | "basketballplayer" | 10 | 1 | "utf8" | "utf8_bin" | "FIXED_STRING(32)" | | 22 | +----+--------------------+------------------+----------------+---------+------------+--------------------+---------+ 23 | ``` 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs-2.0-zh/3.ngql-guide/9.space-statements/5.drop-space.md: -------------------------------------------------------------------------------- 1 | # DROP SPACE 2 | 3 | `DROP SPACE`语句用于删除指定图空间以及其中的所有信息。 4 | 5 | !!! note 6 | 7 | `DROP SPACE`是否删除图空间对应的硬盘数据由 Storage 配置参数`auto_remove_invalid_space`决定。`auto_remove_invalid_space`的默认值为`true`,表示会删除数据。如需在删除逻辑图空间时保留硬盘数据,将`auto_remove_invalid_space`的值修改为`false`。详情参见 [Storage 服务配置](../../5.configurations-and-logs/1.configurations/4.storage-config.md)。 8 | 9 | !!! warning 10 | 11 | 执行`DROP SPACE`后,即使快照中存在该图空间的数据,该图空间的数据也无法恢复。 12 | 13 | ## 前提条件 14 | 15 | 只有 God 角色的用户可以执行`DROP SPACE`语句。详情请参见[身份验证](../../7.data-security/1.authentication/1.authentication.md)。 16 | 17 | ## 语法 18 | 19 | ```ngql 20 | DROP SPACE [IF EXISTS] ; 21 | ``` 22 | 23 | `IF EXISTS`关键字可以检测待删除的图空间是否存在,只有存在时,才会删除图空间。 24 | 25 | !!! compatibility "历史版本兼容性" 26 | 27 | 在 {{nebula.name}} 3.1.0 版本前,`DROP SPACE`语句不会删除硬盘上对应图空间的目录和文件。 28 | 29 | 30 | !!! danger 31 | 32 | 请**谨慎**执行删除图空间操作。 33 | 34 | 35 | ## FAQ 36 | 37 | 问:执行`DROP SPACE`语句删除图空间后,为什么磁盘的大小没变化? 38 | 39 | 答:如果使用 3.1.0 之前版本的 {{nebula.name}} , `DROP SPACE`语句仅删除指定的逻辑图空间,不会删除硬盘上对应图空间的目录和文件。如需删除硬盘上的数据,需手动删除相应文件的路径,文件路径为`/data/storage/nebula/`。其中``可以通过`DESCRIBE SPACE {space_name}`查看。 40 | -------------------------------------------------------------------------------- /docs-2.0-zh/4.deployment-and-installation/2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb.md: -------------------------------------------------------------------------------- 1 | # 使用 RPM 或 DEB 包安装 {{nebula.name}} 2 | 3 | {% include "/source_install-nebula-graph-by-rpm-or-deb.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/4.deployment-and-installation/2.compile-and-install-nebula-graph/6.deploy-nebula-graph-with-peripherals.md: -------------------------------------------------------------------------------- 1 | # 使用生态工具安装 {{nebula.name}} 2 | 3 | 用户可以使用以下生态工具安装 {{nebula.name}} : 4 | 5 | - NebulaGraph Operator 6 | 7 | ## 安装详情 8 | 9 | 使用 **NebulaGraph Operator** 安装 {{nebula.name}} 的详情,参见[创建 {{nebula.name}} 集群](../../k8s-operator/4.cluster-administration/4.1.installation/4.1.1.cluster-install.md)。 10 | 11 | -------------------------------------------------------------------------------- /docs-2.0-zh/4.deployment-and-installation/2.compile-and-install-nebula-graph/8.deploy-nebula-graph-with-lite.md: -------------------------------------------------------------------------------- 1 | # 使用 NebulaGraph Lite 部署 {{nebula.name}} 2 | 3 | 使用 [NebulaGraph Lite](https://github.com/nebula-contrib/nebulagraph-lite) 可以快速安装部署 {{nebula.name}},仅需五分钟即可开始体验 {{nebula.name}} 图数据库,适用于临时开发、学习 {{nebula.name}}。 4 | 5 | ## 优势 6 | 7 | - 通过 Python 包管理工具快速安装 NebulaGraph Lite。 8 | - 支持非 Root 权限部署 {{nebula.name}}。 9 | - 支持在容器或基于 Linux 系统的 Jupyter Notebook 平台上部署 {{nebula.name}}。 10 | 11 | ## 操作步骤 12 | 13 | 1. 执行如下命令安装 NebulaGraph Lite。 14 | 15 | ```bash 16 | pip3 install nebulagraph-lite 17 | ``` 18 | 19 | 2. 启动 NebulaGraph Lite。NebulaGraph Lite 会自动部署并启动单节点 {{nebula.name}} 服务,以及导入测试数据集。 20 | 21 | - 从 Jupyter Notebook 启动 22 | 23 | ```bash 24 | from nebulagraph_lite import nebulagraph_let as ng_let 25 | n = ng_let() 26 | n.start() 27 | ``` 28 | 29 | - 从命令行启动 30 | 31 | ```bash 32 | nebulagraph start 33 | ``` 34 | 35 | 返回如下结果表示启动并导入测试数据集成功。 36 | 37 | ```bash 38 | Info: loading basketballplayer dataset... 39 | 40 | _ _ _ _ ____ _ 41 | | \ | | ___| |__ _ _| | __ _ / ___|_ __ __ _ _ __ | |__ 42 | | \| |/ _ | '_ \| | | | |/ _` | | _| '__/ _` | '_ \| '_ \ 43 | | |\ | __| |_) | |_| | | (_| | |_| | | | (_| | |_) | | | | 44 | |_| \_|\___|_.__/ \__,_|_|\__,_|\____|_| \__,_| .__/|_| |_| 45 | |_| 46 | lite version 47 | 48 | [ OK ] nebulagraph_lite started successfully! 49 | ``` 50 | 51 | ## 下一步 52 | 53 | - 使用[NebulaGraph Jupyter Extension](https://jupyter-nebulagraph.readthedocs.io/en/latest/)连接 {{nebula.name}}。 54 | - 使用[NebulaGraph Console](../connect-to-nebula-graph.md)连接 {{nebula.name}}。 -------------------------------------------------------------------------------- /docs-2.0-zh/4.deployment-and-installation/6.deploy-text-based-index/1.text-based-index-restrictions.md: -------------------------------------------------------------------------------- 1 | # 全文索引限制 2 | 3 | 本文介绍全文索引的限制,请在使用全文索引前仔细阅读。 4 | 5 | !!! caution 6 | 7 | 3.6.0 版本重做了全文索引功能,不兼容之前版本的全文索引。如果你想继续使用通配符、正则、模糊匹配等方式,有如下 3 种方式: 8 | 9 | - 删除原有全文索引,使用新的方式重建全文索引,使用新的[查询语法](../../3.ngql-guide/15.full-text-index-statements/1.search-with-text-based-index.md)。 10 | - 删除原有全文索引,直接用 {{nebula.name}} 的[原生索引](../../3.ngql-guide/14.native-index-statements/README.md)和[字符串运算符](../../3.ngql-guide/5.operators/7.string.md)。 11 | - 继续使用之前版本的 {{nebula.name}} 及其全文索引功能。 12 | 13 | 全文索引有如下限制: 14 | 15 | - 全文索引当前仅支持`LOOKUP`语句。 16 | 17 | - 全文索引名称只能包含数字、小写字母、下划线。 18 | 19 | - 不同图空间内的全文索引名称不能重复。 20 | 21 | - 查询默认返回 10 条数据。可以使用`LIMIT`子句返回更多数据,最多可以返回 10000 条。可以修改 Elasticsearch 的参数调整最大返回条数。 22 | 23 | - 如果 Tag/Edge type 上存在全文索引,无法删除或修改 Tag/Edge type。 24 | 25 | - 属性的类型必须为`STRING`或`FIXED_STRING`。 26 | 27 | - 全文索引不支持多个 Tag/Edge type 的搜索。 28 | 29 | - 全文索引不支持搜索属性值为`NULL`的属性。 30 | 31 | - 不支持修改 Elasticsearch 中的索引,只能删除重建。 32 | 33 | - 不支持修改分词器,需要删除索引数据后重建索引时指定。 34 | 35 | - 确保同时启动了 Elasticsearch 集群和 {{nebula.name}},否则可能导致 Elasticsearch 集群写入的数据不完整。 36 | 37 | - 从写入 {{nebula.name}},到写入 listener,再到写入 Elasticsearch 并创建索引可能需要一段时间。如果访问全文索引时返回未找到索引,可检查索引任务的状态。 38 | 39 | - 使用 K8s 方式部署的 {{nebula.name}} 集群不支持自动部署全文索引,但支持手动部署。 40 | -------------------------------------------------------------------------------- /docs-2.0-zh/4.deployment-and-installation/connect-to-nebula-graph.md: -------------------------------------------------------------------------------- 1 | # 连接 {{nebula.name}} 服务 2 | 3 | {% include "/source_connect-to-nebula-graph.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/4.deployment-and-installation/manage-service.md: -------------------------------------------------------------------------------- 1 | # 管理 {{nebula.name}} 服务 2 | 3 | {% include "/source_manage-service.md" %} 4 | 5 | -------------------------------------------------------------------------------- /docs-2.0-zh/6.monitor-and-metrics/2.rocksdb-statistics.md: -------------------------------------------------------------------------------- 1 | # RocksDB 统计数据 2 | 3 | {{nebula.name}} 使用 RocksDB 作为底层存储,本文介绍如何收集和展示 {{nebula.name}} 的 RocksDB 统计信息。 4 | 5 | ## 启用 RocksDB 6 | 7 | RocksDB 统计功能默认关闭,启动 RocksDB 统计功能,你需要: 8 | 9 | 1. 修改 `nebula-storaged.conf` 文件中 `--enable_rocksdb_statistics` 参数为 `true`。配置默认文件目录为 `/use/local/nebula/etc`。 10 | 11 | 2. 重启服务使修改生效。 12 | 13 | ## 获取 RocksDB 统计信息 14 | 15 | 用户可以使用存储服务中的内置 HTTP 服务来获取以下类型的统计信息,且支持返回 JSON 格式的结果: 16 | 17 | - 所有统计信息。 18 | - 指定条目的信息。 19 | 20 | ## 示例 21 | 22 | 使用以下命令获取所有 RocksDB 统计信息: 23 | ```bash 24 | curl -L "http://${storage_ip}:${port}/rocksdb_stats" 25 | ``` 26 | 27 | 例如: 28 | ``` 29 | curl -L "http://172.28.2.1:19779/rocksdb_stats" 30 | 31 | rocksdb.blobdb.blob.file.bytes.read=0 32 | rocksdb.blobdb.blob.file.bytes.written=0 33 | rocksdb.blobdb.blob.file.bytes.synced=0 34 | ... 35 | ``` 36 | 37 | 使用以下命令获取部分 RocksDB 统计信息: 38 | ```bash 39 | curl -L "http://${storage_ip}:${port}/rocksdb_stats?stats=${stats_name}" 40 | ``` 41 | 42 | 例如使用以下语句获取 `rocksdb.bytes.read` 和 `rocksdb.block.cache.add`的信息。 43 | ```bash 44 | curl -L "http://172.28.2.1:19779/rocksdb_stats?stats=rocksdb.bytes.read,rocksdb.block.cache.add" 45 | 46 | rocksdb.block.cache.add=14 47 | rocksdb.bytes.read=1632 48 | ``` 49 | 50 | 使用以下命令获取部分 JSON 格式的 RocksDB 统计信息: 51 | ```bash 52 | curl -L "http://${storage_ip}:${port}/rocksdb_stats?stats=${stats_name}&format=json" 53 | ``` 54 | 55 | 例如使用以下语句获取 `rocksdb.bytes.read` 和 `rocksdb.block.cache.add`的统计信息并返回 JSON 的格式数据。 56 | ```bash 57 | curl -L "http://172.28.2.1:19779/rocksdb_stats?stats=rocksdb.bytes.read,rocksdb.block.cache.add&format=json" 58 | 59 | [ 60 | { 61 | "rocksdb.block.cache.add": 1 62 | }, 63 | { 64 | "rocksdb.bytes.read": 160 65 | } 66 | ] 67 | ``` 68 | -------------------------------------------------------------------------------- /docs-2.0-zh/7.data-security/1.authentication/1.authentication.md: -------------------------------------------------------------------------------- 1 | # 身份验证 2 | 3 | 身份验证用于将会话映射到特定用户,从而实现访问控制。 4 | 5 | 当客户端连接到 {{nebula.name}} 时,{{nebula.name}} 会创建一个会话,会话中存储连接的各种信息,如果开启了身份验证,就会将会话映射到对应的用户。 6 | 7 | 8 | 9 | ## 本地身份验证 10 | 11 | 本地身份验证是指在服务器本地存储用户名、加密密码,当用户尝试访问 {{nebula.name}} 时,将进行身份验证。 12 | 13 | ### 启用本地身份验证 14 | 15 | 1. 编辑配置文件`nebula-graphd.conf`(默认目录为`/usr/local/nebula/etc/`),设置如下参数: 16 | 17 | - `--enable_authorize`:是否启用身份验证,可选值:`true`、`false`。 18 | 19 | !!! note 20 | 21 | - 默认情况下,身份验证功能是关闭的,用户可以使用`root`用户名和任意密码连接到 {{nebula.name}} 。 22 | - 开启身份验证后,默认的 God 角色账号为`root`,密码为`nebula`。角色详情请参见[内置角色权限](3.role-list.md)。 23 | 24 | 25 | - `--failed_login_attempts`:可选项,需要手动添加该参数。单个 Graph 节点允许连续输入错误密码的次数。超过该次数时,账户会被锁定。如果有多个 Graph 节点,允许的次数为`节点数 * 次数`。 26 | 27 | - `--password_lock_time_in_secs`:可选项,需要手动添加该参数。多次输入错误密码后,账户被锁定的时间。单位:秒。 28 | 29 | 2. 重启 {{nebula.name}} 服务。 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs-2.0-zh/8.service-tuning/3.system-design.md: -------------------------------------------------------------------------------- 1 | # 系统设计建议 2 | 3 | ## 选择 QPS 优先或时延优先 4 | 5 | - {{nebula.name}} {{ nebula.release }} 更擅长处理(互联网式的)有大量并发的小请求。也即:虽然全图很大(万亿点边),但是每个请求要访问到的子图本身并不大(几百万个点边)——单个请求时延不大;但这类请求的并发数量特别多——QPS 大。 6 | 7 | - 但对于一些交互分析型的场景,并发请求的数量不多,而每个请求要访问的子图本身特别大(亿以上)。为降低时延,可以在应用程序中将一个大的请求,拆分为多个小请求,并发发送给多个 graphd。这样可以降低单个大请求的时延,降低单个 graphd 的内存占用。另外,也可以使用[图计算功能 NebulaGraph Algorithm](../graph-computing/nebula-algorithm.md)。 8 | 32 | ## 数据传输与优化 33 | 34 | - 读写平衡。 {{nebula.name}} 适合读写平衡性的在线场景,也即 OLTP 型的的“并发的发生写入与读取”;而非数仓 OLAP 型的“一次写入多次读取”。 35 | - 选择不同的写入方式。大批量的数据写入可以使用 sst 加载的方式;小批量的写入使用`INSERT`语句。 36 | - 选择合适的时间运行 COMPACTION 和 BALANCE,来分别优化数据格式和存储分布。 37 | - {{nebula.name}} {{ nebula.release }} 不支持关系型数据库意义上的事务和隔离性,更接近 NoSQL。 38 | 39 | ## 查询预热与数据预热 40 | 41 | 应用端进行预热: 42 | 43 | - Graphd 不支持预编译查询及相应生成查询计划,也不支持缓存之前的查询结果; 44 | - Storaged 不支持预热数据,只有 RocksDB 自身的 LSM-tree 和 BloomFilter 会启动时加载到内存中。 45 | - 点和边被访问过后,会各自缓存在 Storaged 的两种 (LRU) Cache 中。 46 | -------------------------------------------------------------------------------- /docs-2.0-zh/8.service-tuning/4.plan.md: -------------------------------------------------------------------------------- 1 | # 执行计划 2 | 3 | {{nebula.name}} {{ nebula.release }} 实现了基于规则的执行计划。用户无法改变执行计划,无法进行查询的预编译(及相应的计划缓存),无法通过指定索引来加速查询。 4 | 5 | 要查看执行计划及执行概要,请参考 [EXPLAIN 和 PROFILE](../3.ngql-guide/17.query-tuning-statements/1.explain-and-profile.md)。 6 | -------------------------------------------------------------------------------- /docs-2.0-zh/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changes 2 | 3 | -------------------------------------------------------------------------------- /docs-2.0-zh/css/version-select.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width:76.1875em) { 2 | #version-selector { 3 | padding: .6rem .8rem; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /docs-2.0-zh/fonts/NotoSansSC-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vesoft-inc/nebula-docs/4adcf3fa59bfcf3ab630794db6e1b6fd4ada3de5/docs-2.0-zh/fonts/NotoSansSC-Regular.ttf -------------------------------------------------------------------------------- /docs-2.0-zh/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vesoft-inc/nebula-docs/4adcf3fa59bfcf3ab630794db6e1b6fd4ada3de5/docs-2.0-zh/icon/favicon.ico -------------------------------------------------------------------------------- /docs-2.0-zh/icon/兼容compatibility.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs-2.0-zh/icon/放大镜note.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs-2.0-zh/icon/炸弹danger.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs-2.0-zh/import-export/nebula-exchange/about-exchange/ex-ug-limitations.md: -------------------------------------------------------------------------------- 1 | # 使用限制 2 | 3 | 本文描述 Exchange {{exchange.release}} 的一些使用限制。 4 | 5 | ## 使用环境 6 | 7 | Exchange 3.x 支持以下操作系统: 8 | 9 | - CentOS 7 10 | - macOS 11 | 12 | ## 软件依赖 13 | 14 | 为保证 Exchange 正常工作,请确认机器上已经安装如下软件: 15 | 16 | - Java 1.8 版本 17 | 18 | - Scala 2.10.7、2.11.12 或 2.12.10 版本 19 | 20 | - Apache Spark。使用 Exchange 从不同数据源导出数据对 Spark 版本的要求如下: 21 | 22 | !!! note 23 | 使用 Exchange 时,需根据 Spark 版本选择相应的 JAR 文件。例如,当 Spark 版本为 2.4 时,选择 nebula-exchange_spark_2.4-{{exchange.release}}.jar。 24 | 25 | | 数据源 | Spark 2.2 | Spark 2.4 | Spark 3 | 26 | | - | - | - | - | 27 | | CSV 文件 | 支持 | 支持 | 支持 | 28 | | JSON 文件 | 支持 | 支持 | 支持 | 29 | | ORC 文件 | 支持 | 支持 | 支持 | 30 | | Parquet 文件 | 支持 | 支持 | 支持 | 31 | | HBase | 支持 | 支持 | 支持 | 32 | | MySQL | 支持 | 支持 | 支持 | 33 | | PostgreSQL | 支持 | 支持 | 支持 | 34 | | Oracle | 支持 | 支持 | 支持 | 35 | | ClickHouse | 支持 | 支持 | 支持 | 36 | | Neo4j | 不支持 | 支持 | 不支持 | 37 | | Hive | 支持 | 支持 | 支持 | 38 | | MaxCompute | 不支持 | 支持 | 不支持 | 39 | | Pulsar | 不支持 | 支持 | 未测试 | 40 | | Kafka | 不支持 | 支持 | 未测试 | 41 | | {{nebula.name}} | 不支持 | 支持 | 不支持 | 42 | 43 | 在以下使用场景,还需要部署 Hadoop Distributed File System (HDFS): 44 | 45 | - 迁移 HDFS 的数据 46 | - 生成 SST 文件 47 | -------------------------------------------------------------------------------- /docs-2.0-zh/import-export/write-tools.md: -------------------------------------------------------------------------------- 1 | # 导入导出工具概述 2 | 3 | ## 导入工具 4 | 5 | 有多种方式可以将数据写入{{nebula.name}} {{ nebula.release }}: 6 | 7 | - 使用[命令行 -f 的方式](../2.quick-start/3.quick-start-on-premise/3.connect-to-nebula-graph.md)导入:可以导入少量准备好的 nGQL 文件,适合少量手工测试数据准备。 8 | 9 | - 使用 [Studio 导入](../nebula-studio/quick-start/st-ug-import-data.md):可以用过浏览器导入本机多个 CSV 文件,格式有限制。 10 | 11 | - 使用 [Importer 导入](use-importer.md):导入单机多个 CSV 文件,大小没有限制,格式灵活。适合十亿条数据以内的场景。 12 | - 使用 [Exchange 导入](nebula-exchange/about-exchange/ex-ug-what-is-exchange.md):从 Neo4j、Hive、MySQL 等多种源分布式导入,需要有 Spark 集群。适合十亿条数据以上的场景。 13 | - 使用 [Spark-connector](../connector/nebula-spark-connector.md)/[Flink-connector](../connector/nebula-flink-connector.md) 读写 API:这种方式需要编写少量代码来使用 Spark/Flink 连接器提供的 API。 14 | - 使用 [C++/GO/Java/Python SDK](../20.appendix/6.eco-tool-version.md):编写程序的方式导入,需要有一定编程和调优能力。 15 | 16 | 下图给出了几种方式的定位: 17 | 18 | ![image](https://docs-cdn.nebula-graph.com.cn/figures/write-choice.png) 19 | 20 | ## 导出工具 21 | 22 | - 使用 [Spark-connector](../connector/nebula-spark-connector.md)/[Flink-connector](../connector/nebula-flink-connector.md) 读写 API:这种方式需要编写少量代码来使用 Spark/Flink 连接器提供的 API。 23 | - 使用 Exchange 导出功能将数据导出至 CSV 文件或另一个图空间(支持不同 {{nebula.name}} 集群)中。 24 | 25 | !!! enterpriseonly 26 | 27 | 仅企业版 Exchange 提供导出功能。如需企业版,请[联系我们](https://discuss.nebula-graph.com.cn/uploads/default/optimized/3X/7/6/76add3b56ce137be42ebf6e79027bef8a1a0de6b_2_648x1000.jpeg)。 28 | -------------------------------------------------------------------------------- /docs-2.0-zh/js/config.js: -------------------------------------------------------------------------------- 1 | window.MathJax = { 2 | tex: { 3 | inlineMath: [["\\(", "\\)"]], 4 | displayMath: [["\\[", "\\]"]], 5 | processEscapes: true, 6 | processEnvironments: true 7 | }, 8 | options: { 9 | ignoreHtmlClass: ".*|", 10 | processHtmlClass: "arithmatex" 11 | } 12 | }; 13 | 14 | document$.subscribe(() => { 15 | MathJax.typesetPromise() 16 | }) -------------------------------------------------------------------------------- /docs-2.0-zh/js/init.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | $("img").click(function change(){ 3 | var $this = $(this) 4 | $(this).toggleClass("max"); 5 | $("#dialog-bg").toggleClass("dialog-bg"); 6 | }); 7 | $("#dialog-bg").on("click",function () { 8 | $("#dialog-bg").toggleClass("dialog-bg"); 9 | $("img").each(function(){ 10 | if($(this).hasClass("max")){ 11 | $(this).toggleClass("max"); 12 | } 13 | }) 14 | }); 15 | })() -------------------------------------------------------------------------------- /docs-2.0-zh/k8s-operator/3.operator-management/3.2.update-operator.md: -------------------------------------------------------------------------------- 1 | # 更新 NebulaGraph Operator 配置 2 | 3 | 本文将介绍如何更新 NebulaGraph Operator 的配置。 4 | 5 | ## 操作步骤 6 | 7 | 1. 拉取最新的 Helm 仓库。 8 | 9 | ```bash 10 | helm repo update 11 | ``` 12 | 13 | 2. 查看 NebulaGraph Operator 的默认配置。 14 | 15 | ```bash 16 | helm show values nebula-operator/nebula-operator 17 | ``` 18 | 19 | 3. 通过`--set`传递配置参数,更新 NebulaGraph Operator。 20 | 21 | - `--set`:通过命令行的方式新增或覆盖指定项。有关可以更新的配置项,请查看[自定义配置](3.1.customize-installation.md)。 22 | 23 | 例如,更新 NebulaGraph Operator 的 AdmissionWebhook 机制为开启状态。 24 | 25 | ```bash 26 | helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=nebula-operator-system --version={{operator.release}} --set admissionWebhook.create=true 27 | ``` 28 | 29 | 更多信息,参考 [Helm 升级](https://helm.sh/docs/helm/helm_upgrade/)。 30 | 31 | 4. 查看 NebulaGraph Operator 的配置是否更新成功。 32 | 33 | ```bash 34 | helm get values nebula-operator -n nebula-operator-system 35 | ``` 36 | 37 | 示例输出: 38 | 39 | ```yaml 40 | USER-SUPPLIED VALUES: 41 | admissionWebhook: 42 | create: true 43 | ``` 44 | 45 | 46 | -------------------------------------------------------------------------------- /docs-2.0-zh/k8s-operator/3.operator-management/3.4.unistall-operator.md: -------------------------------------------------------------------------------- 1 | # 卸载 NebulaGraph Operator 2 | 3 | 本文将介绍如何卸载 NebulaGraph Operator。 4 | 5 | ## 操作步骤 6 | 7 | 1. 卸载 NebulaGraph Operator chart。 8 | 9 | ```bash 10 | helm uninstall nebula-operator --namespace= 11 | ``` 12 | 13 | 2. 查看默认创建的 CRD 信息。 14 | 15 | ```bash 16 | kubectl get crd 17 | ``` 18 | 19 | 返回示例: 20 | 21 | ```bash 22 | NAME CREATED AT 23 | nebulaautoscalers.autoscaling.nebula-graph.io 2023-11-01T04:16:51Z 24 | nebulaclusters.apps.nebula-graph.io 2023-10-12T07:55:32Z 25 | nebularestores.apps.nebula-graph.io 2023-02-04T23:01:00Z 26 | ``` 27 | 28 | 3. 删除 CRD。 29 | 30 | ```bash 31 | kubectl delete crd nebulaclusters.apps.nebula-graph.io nebularestores.apps.nebula-graph.io nebulaautoscalers.autoscaling.nebula-graph.io 32 | ``` 33 | -------------------------------------------------------------------------------- /docs-2.0-zh/k8s-operator/4.cluster-administration/4.7.security/4.7.3.config-deletion-protection.md: -------------------------------------------------------------------------------- 1 | # 配置删除保护 2 | 3 | NebulaGraph Operator 支持删除保护,以防止{{nebula.name}}集群被意外删除。本文介绍如何为{{nebula.name}}集群配置删除保护。 4 | 5 | ## 前提条件 6 | 7 | - {{nebula.name}}集群已创建。更多信息,请参见[创建{{nebula.name}}集群](../4.1.installation/4.1.1.cluster-install.md)。 8 | - {{nebula.name}}集群已启用准入控制。更多信息,请参见[开启准入控制](4.7.2.enable-admission-control.md)。 9 | 10 | ## 添加注解以开启删除保护 11 | 12 | 添加`delete-protection`注解到集群。 13 | 14 | ```bash 15 | kubectl annotate nc nebula -n nebula-test nebula-graph.io/delete-protection=true 16 | ``` 17 | 18 | 以上命令为`nebula-test`命名空间中的`nebula`集群启用了删除保护。 19 | 20 | 21 | ## 验证删除保护 22 | 23 | To verify that deletion protection is enabled, run the following command: 24 | 25 | 运行以下命令验证删除保护是否已启用: 26 | 27 | ```bash 28 | kubectl delete nc nebula -n nebula-test 29 | ``` 30 | 31 | 以上命令尝试删除`nebula-test`命名空间中的`nebula`集群。 32 | 33 | 34 | 返回信息: 35 | 36 | ```bash 37 | Error from server: admission webhook "nebulaclustervalidating.nebula-graph.io" denied the request: metadata.annotations[nebula-graph.io/delete-protection]: Forbidden: protected cluster cannot be deleted 38 | ``` 39 | 40 | ## 删除注解以关闭删除保护 41 | 42 | 从集群中删除`delete-protection`注解: 43 | 44 | ```bash 45 | kubectl annotate nc nebula -n nebula-test nebula-graph.io/delete-protection- 46 | ``` 47 | 48 | 以上命令为`nebula-test`命名空间中的`nebula`集群关闭了删除保护。 49 | -------------------------------------------------------------------------------- /docs-2.0-zh/k8s-operator/4.cluster-administration/4.8.ha-and-balancing/4.8.1.self-healing.md: -------------------------------------------------------------------------------- 1 | # 故障自愈 2 | 3 | NebulaGraph Operator 调用 {{nebula.name}} 集群提供的接口,动态地感知服务是否正常运行。当 {{nebula.name}} 集群中某一组件停止运行时,NebulaGraph Operator 会自动地进行容错处理。本文通过删除 {{nebula.name}} 集群中 1 个 Storage 服务 Pod,模拟集群故障为例,说明 Nebular Operator 如何进行故障自愈。 4 | 5 | ## 前提条件 6 | 7 | [安装 NebulaGraph Operator](../../2.get-started/2.1.install-operator.md) 8 | 9 | ## 操作步骤 10 | 11 | 1. 创建 {{nebula.name}} 集群。具体步骤参考[创建 {{nebula.name}} 集群](../4.1.installation/4.1.1.cluster-install.md)。 12 | 13 | 2. 待所有 Pods 都处于`Running`状态时,模拟故障,删除名为`-storaged-2` Pod。 14 | 15 | ```bash 16 | kubectl delete pod -storaged-2 --now 17 | ``` 18 | ``为 {{nebula.name}} 集群的名称。 19 | 20 | 3. NebulaGraph Operator 自动创建名为`-storaged-2`的 Pod,以修复故障。 21 | 22 | 执行`kubectl get pods`查看`-storaged-2`Pod 的创建状态。 23 | 24 | ```bash 25 | ... 26 | nebula-cluster-storaged-1 1/1 Running 0 5d23h 27 | nebula-cluster-storaged-2 0/1 ContainerCreating 0 1s 28 | ... 29 | ``` 30 | 31 | ```bash 32 | ... 33 | nebula-cluster-storaged-1 1/1 Running 0 5d23h 34 | nebula-cluster-storaged-2 1/1 Running 0 4m2s 35 | ... 36 | ``` 37 | 当`-storaged-2`的状态由`ContainerCreating`变为`Running`时,说明自愈成功。 38 | -------------------------------------------------------------------------------- /docs-2.0-zh/k8s-operator/4.cluster-administration/4.9.advanced/4.9.1.rolling-update-strategy.md: -------------------------------------------------------------------------------- 1 | # 优化滚动更新中的 Leader 分布 2 | 3 | {{nebula.name}} 集群使用分布式架构将数据分成多个逻辑分片,这些分片通常均分在不同的节点上。分布式系统中,同一份数据通常会有多个副本。为了保证多个副本数据的一致性,{{nebula.name}} 集群使用 Raft 协议实现了多分片副本同步。Raft 协议中,每个分片都会选举出一个 Leader 副本,Leader 副本负责处理写请求,Follower 副本负责处理读请求。 4 | 5 | 通过 Operator 创建的 {{nebula.name}} 集群在滚动更新过程中,一个存储节点会暂时停止提供服务以进行更新。关于滚动更新的概述,参见[执行滚动更新](https://kubernetes.io/zh-cn/docs/tutorials/kubernetes-basics/update/update-intro/)。如果 Leader 副本所在的节点停止提供服务,会导致该分片的读写不可用。为了避免这种情况,Operator 会在 {{nebula.name}} 集群滚动更新过程中,默认将 Leader 副本迁移到其他未受影响节点上。这样,当一个存储节点处于更新状态时,其他节点上的 Leader 副本能够继续处理客户端请求,以保证集群的读写可用性。 6 | 7 | 一个存储节点上的所有 Leader 副本全部迁移到其他节点的这个过程可能会持续较长时间。为了更好地控制滚动更新的时间,Operator 提供了一个名为`enableForceUpdate`参数。当确定没有外部访问流量时,可将该参数设置为`true`,这样,Leader 副本将不会被迁移到其他节点上,从而加快滚动更新的速度。 8 | 9 | ## 滚动更新触发条件 10 | 11 | Operator 会在以下情况下触发 {{nebula.name}} 集群的滚动更新: 12 | 13 | - {{nebula.name}} 集群的版本发生变化。 14 | - {{nebula.name}} 集群的配置发生变化。 15 | - {{nebula.name}} 集群的服务执行重启操作。 16 | 17 | ## 配置滚动更新策略 18 | 19 | 在创建集群实例的 YAML 文件中,添加`spec.storaged.enableForceUpdate`参数,设置为`true`或`false`,以控制滚动更新的速度。 20 | 21 | 当`enableForceUpdate`为`true`时,表示不迁移分片 Leader 副本,从而加快滚动更新的速度;反之,表示迁移分片 Leader 副本,以保证集群的读写可用性。默认值为`false`。 22 | 23 | !!! warning 24 | 25 | 设置`enableForceUpdate`为`true`时,确保没有流量进入集群进行读写操作。因为该设置会强制重建集群 Pod,此过程会发生数据丢失或客户端请求失败的情况。 26 | 27 | 28 | 配置示例: 29 | 30 | ```yaml 31 | ... 32 | spec: 33 | ... 34 | storaged: 35 | enableForceUpdate: true // 设置为 true 时,表示不迁移分片 Leader 副本,而是直接重建集群 Pod。 36 | ... 37 | ``` -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-bench.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Bench 2 | 3 | NebulaGraph Bench 是一款利用 LDBC 数据集对 {{nebula.name}} 进行性能测试的工具。 4 | 5 | ## 适用场景 6 | 7 | - 生成测试数据并导入 {{nebula.name}} 。 8 | 9 | - 对 {{nebula.name}} 集群进行性能测试。 10 | 11 | ## 更新说明 12 | 13 | [Release](https://github.com/vesoft-inc/nebula-bench/releases/tag/{{bench.tag}}) 14 | 15 | 详细使用说明请参见 [NebulaGraph Bench](https://github.com/vesoft-inc/nebula-bench/blob/{{bench.branch}}/README_cn.md)。 16 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud.md: -------------------------------------------------------------------------------- 1 | # NebulaGraph Cloud 2 | 3 | NebulaGraph Cloud(简称 Cloud)是一套集成了 {{nebula.name}} 数据库和数据服务的云上服务,支持一键部署 {{nebula.name}} 和相关可视化产品。用户可以在几分钟内创建一个图数据库,并快速扩展计算、存储等资源。 4 | 5 | Cloud 支持: 6 | 7 | - 基于 Azure 的全托管云服务,即 NebulaGraph Cloud Azure 版。 8 | - 基于阿里云的半托管云服务,即 NebulaGraph Cloud 阿里云版。 9 | 10 | !!! note 11 | 12 | Cloud 暂不支持 {{nebula.release}} 版本的内核。最新版本的 Cloud 文档参见[什么是 NebulaGraph Cloud](https://docs.nebula-graph.com.cn/{{cloud.azureLatestRelease}}/nebula-cloud/1.what-is-cloud/)。 13 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/1.what-is-cloud.md: -------------------------------------------------------------------------------- 1 | # 什么是{{cloud.name}}(公有云) 2 | 3 | {{cloud.name}}(公有云)是一套集成了 {{nebula.name}} 和数据服务的云上服务,支持一键部署 {{nebula.name}} 和相关可视化产品。用户可以在几分钟内创建一个图数据库,并快速扩展计算、存储等资源。 4 | 5 | !!! note 6 | 7 | Cloud 当前支持的内核版本是 {{cloud.aliyunRelease}},暂不支持 {{nebula.release}}。 8 | 9 | 14 | 18 | 19 | ## 产品功能 20 | 21 | - 即买即用。用户可以根据自己的业务发展随时创建或停止 {{nebula.name}} 实例,业务提供充分的灵活性。 22 | - 集成可视化图数据库管理工具。可以使用它们导入图数据集、执行 nGQL 语句查询、探索图数据、监控数据等。即使没有图数据库操作经验,也可以快速成为图专家。 23 | - 用户可直接使用 Nebula Console 等客户端连接到云上数据库,而不需要先访问云平台。 24 | - 权限控制。用户可以为指定图空间增加不同角色权限的数据库用户,保证业务数据安全。 25 | - 官方支持。用户可以快速创建工单,咨询使用过程中遇到的问题。 26 | 27 | ## 产品优点 28 | 29 | - 灵活与弹性:{{cloud.name}}(公有云)最大的优势在于灵活与弹性,无需自购软硬件即可快速(5-10分钟)搭建 {{nebula.name}} 。 30 | - 高可用性:{{cloud.name}}(公有云)上创建的 {{nebula.name}} 集群采用 Raft 协议,结合云厂商提供的同城多机房实现数据冗余备份,保证云计算基础框架的高可用性、数据的可靠性以及云服务器的高可用性。 31 | - 操作易用:{{cloud.name}}(公有云)提供 Web 页面对 {{nebula.name}} 集群进行在线管理,同时提供配套的可视化软件,降低用户使用门槛,快速上手。 32 | 33 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-alibabacloud/2.use-cloud-services.md: -------------------------------------------------------------------------------- 1 | # 使用服务实例 2 | 3 | 创建好服务实例后,即可查看服务信息,并开始使用 {{nebula.name}} 服务。 4 | 5 | ## 查看服务实例 6 | 7 | 在计算巢控制台可以查看服务实例的详细信息,详情参见[查看服务实例](https://help.aliyun.com/document_detail/290838.html)。 8 | 9 | ## 查看连接信息 10 | 11 | 连接服务前,需要在阿里云计算巢的实例详情中查看各服务的连接地址。查看方式如下: 12 | 13 | 1. 登录[服务实例管理](http://c.nxw.so/9huj4 "https://computenest.console.aliyun.com/user/cn-hangzhou/serviceInstance/private")页面。 14 | 15 | !!! note 16 | 17 | 如果要寻找的是免费试用版服务实例,需先在**服务实例管理**页面单击**试用服务**标签。 18 | 19 | 2. 在实例列表中,单击目标实例的**服务实例ID**,或其右侧**操作**列的**详情**。 20 | 21 | 3. 在**概览**标签页的**基本信息**区域,可以查看 Graph 服务、Storage 服务,以及周边工具的连接信息。 22 | 23 | ## 连接 {{nebula.name}} 24 | 25 | {{cloud.name}}(阿里云版)提供多种连接方式。 26 | 27 | ### 使用客户端直连 {{nebula.name}} 28 | 29 | 获取到连接地址后,即可使用 {{nebula.name}} 的各类客户端连接服务。 30 | 31 | 连接方式: 32 | 33 | 直连 Graph 服务的私网或公网 IP 地址。详细连接方式参见[客户端文档](https://docs.nebula-graph.com.cn/{{nebula.release}}/14.client/1.nebula-client/)。 34 | 35 | 如需通过公网连接 {{nebula.name}} 数据库: 36 | 37 | 1. 到 Graph 服务部署的 ECS 实例详情中找到其公网 IP 地址。 38 | 39 | 2. (仅付费版需执行该步骤)在 {{nebula.name}} 服务实例加入的安全组中,[添加安全组规则](https://help.aliyun.com/document_detail/25471.html),允许从指定的公网 IP 地址访问 TCP 9669 端口。 40 | 41 | !!! note 42 | 43 | 免费试用版默认允许从公网访问 Graph 服务的 9669 端口。 44 | 45 | 3. 使用 Graph 服务的公网 IP 地址和 9669 端口访问 {{nebula.name}} 。 46 | 47 | !!! caution 48 | 49 | 建议仅通过私网 IP 连接,提高网络和数据的安全性。 50 | 51 | ### 使用 Explorer 连接 {{nebula.name}} 52 | 53 | 使用图探索工具可以快速连接 {{nebula.name}},与图数据进行可视化交互。 54 | 55 | 连接方式: 56 | 57 | 1. 在浏览器中使用 **Explorer 服务访问地址**打开 Nebula Explorer。 58 | 2. 使用 Explorer 连接 {{nebula.name}} 。 59 | 60 | ## 监控 {{nebula.name}} 61 | 62 | 在{{cloud.name}}(阿里云版)中部署监控工具后,可以实时监控 {{nebula.name}} 服务的状态。 63 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-alibabacloud/3.delete-service-instance.md: -------------------------------------------------------------------------------- 1 | # 删除服务实例 2 | 3 | 如果不再需要某个实例,可手动删除该实例。 4 | 5 | 删除方式参见[删除服务实例](https://help.aliyun.com/document_detail/290837.html)。 6 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-alibabacloud/4.scaling-services.md: -------------------------------------------------------------------------------- 1 | # 扩缩容服务 2 | 3 | {{cloud.name}}(阿里云版)的弹性扩缩容功能支持根据需求扩缩容服务节点,灵活调整集群规模。 4 | 5 | ## 使用限制 6 | 7 | - 弹性扩缩容功能支持 Storage 扩容,不支持 Storage 缩容。 8 | - 使用弹性扩缩容功能缩容 Graph 服务时,需先使用运维工具的扩缩容功能删除不再需要的 Graph 服务节点。扩容 Graph 服务时无此限制。 9 | 10 | ## 操作步骤 11 | 12 | 1. 登录阿里云计算巢的[服务实例管理页面](http://c.nxw.so/9huj4 "https://computenest.console.aliyun.com/user/cn-hangzhou/serviceInstance/private")。 13 | 14 | 2. 在服务实例列表中,单击目标实例的 ID 或其右侧**操作**列的**详情**。 15 | 16 | !!! note 17 | 18 | 免费试用版服务实例列表在**试用服务**标签页中。 19 | 20 | 3. 在**服务实例详情**页面,单击**运维管理**标签。 21 | 22 | 4. 在**应用运维**区域,单击**弹性扩缩容**。 23 | 24 | 5. 在**弹性扩缩容**对话框,完成如下操作。 25 | 26 | 1. 确认**将要调整的资源类型**为 **ESS**。 27 | 28 | 2. 选择**伸缩组 ID**。 29 | 30 | - 如需扩缩容 Storage 服务,选择名称以 **ng-storage** 开头的伸缩组。 31 | - 如需扩缩容 Graph 服务,选择名称以 **ng-graph** 开头的伸缩组。 32 | 33 | 3. 选择**伸缩规则的调整方式**。 34 | 35 | - 如果选择**扩容**或**缩容**,下方的**伸缩组 ECS 实例调整的数量**指定的是要增加或减少的节点数量。 36 | - 如果选择**调整至指定数量**,下方的**伸缩组 ECS 实例调整的数量**指定的是节点调整之后剩余的数量,而不是增加或减少的数量。 37 | 38 | 4. 输入**伸缩组 ECS 实例调整的数量**。 39 | 40 | 5. 单击**下一步**。 41 | 42 | 6. 检查任务信息,确认无误后单击**创建**。 43 | 44 | 6. 等候数分钟,直到**运维管理**标签页中的**执行状态**显示**成功**。 45 | 46 | 7. 单击**概览**标签页,查看**服务资源**区域的 ECS 实例数量,如果符合预期的调整效果,则扩缩容完成。 47 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/2.how-to-create-subsciption.md: -------------------------------------------------------------------------------- 1 | # 创建订阅 2 | 3 | 在使用 Cloud 之前,用户需要在 Azure 上创建订阅,本文介绍如何在 Azure Marketplace 上创建订阅。 4 | 5 | ## 订阅流程 6 | 7 | 8 | 1. 进入 [Azure市场](https://portal.azure.com/?l=en.en-us#blade/Microsoft_Azure_Marketplace/GalleryMenuBlade/selectedMenuItemId/home),在市场中的搜索栏搜索 NebulaGraph Cloud,或直接点击 [NebulaGraph Cloud]() 进入购买页面。[TODO] 9 | 10 | 2. 用户根据需求选定计划,选择**创建 + 订阅**。 11 | 1. 在**订阅 NebulaGraph Cloud**的**基本信息**选项卡中,输入或选择以下信息: 12 | 13 | - 项目详细信息 14 | 15 | |设置项|预设值| 16 | |:---|:---| 17 | |订阅|选择用户的订阅。| 18 | |资源组|选择用户已有的资源组或新建一个资源组。| 19 | 20 | - SaaS 详情信息 21 | 22 | |设置项|预设值| 23 | |:---|:---| 24 | |名称|输入 SaaS 订阅创建名称。| 25 | |定时收费|选择**开**或**关**。| 26 | 27 | 2. 在页面的下方,选择**下一步:标记**的按钮。 28 | 3. (可选)在**标记**选项卡中,输入**名称:值**。 29 | 4. 在页面的下方,选择**订阅**的按钮,等待时间约 2 分钟。 30 | 31 | 3. 订阅完成后,用户需点击**在发布者站点上打开 SaaS 帐户**创建并配置 Solution。详细信息,参考[如何配置 Solution](3.how-to-set-solution.md)。 32 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/3.how-to-set-solution.md: -------------------------------------------------------------------------------- 1 | # 配置 Solution 2 | 3 | Solution 指运行在 NebulaGraph Cloud 上的 {{nebula.name}} 。在 Azure 完成订阅后需要于 Cloud 平台上配置 Solution 完成购买,本文介绍如何配置 Solution。 4 | 5 | ## 配置流程 6 | 7 | 1. 在 Azure 上订阅后,若要完成购买,请在页面上点击**立即配置账户**即跳转至 NebulaGraph Cloud 登录页面。 8 | 2. 在 NebulaGraph Cloud 中登录订阅服务的 Azure 账号。 9 | 1. 在 **供应商** 选择**区域**。 10 | 11 | !!! caution 12 | 13 | 为提升服务性能,建议选择的区域应与业务区域在同一区域。 14 | 15 | 2. 在 **实例** 中,选择查询引擎的类型及数量,存储引擎的类型、磁盘大小及数量。 16 | 17 | !!! caution 18 | 19 | 为保证服务高可用,建议至少配置2个查询引擎和3个存储引擎。 20 | 21 | 3. 在 ** {{nebula.name}} ** 中,输入指定 Azure 账号邮箱为 Root 用户,默认为 Azure 订阅账户。 22 | 4. 在页面的下方,选择 **下一步** 的按钮。 23 | 5. 确定选择无误后,在页面的下方,选择 **创建** 的按钮。 24 | 3. 至此,用户已经完成了 Solution 的配置。当在 Cloud 首页上看到 Solution 的状态为 **创建中**,即认为 Solution 已创建成功。 25 | 26 | ## Solution 状态 27 | 28 | 用户可能会在 Solution 页面上看到如下表描述的状态。 29 | 30 | |状态| 状态说明 | 31 | |:---|:---| 32 | | 创建中 | Solution 所需资源已经准备完毕,Solution 自动开始创建,此时 Solution 短暂处于**创建中**状态,可能持续几分钟到十几分钟。| 33 | | 启动中 | 重新启动 Solution,此时 Solution 短暂处于**启动中**状态。 | 34 | | 停止中 | 用户点击停止 Solution 后,此时 Solution 短暂处于**停止中**状态。 | 35 | | 删除中 | 用户点击删除 Solution 后,此时 Solution 短暂处于**删除中**状态。 | 36 | | 运行中 | Solution 创建成功后,会长时间稳定地处于**运行中**状态。 | 37 | | 已停止 | 停止 Solution 后,会长时间稳定地处于**已停止**状态。 | 38 | | 已删除 | 删除 Solution 后,会长时间稳定地处于**已删除**状态。 | 39 | | 创建失败 | Solution 创建失败后,会长时间稳定地处于**创建失败**状态。 | 40 | | 停止失败 | Solution 停止失败后,会长时间稳定地处于**停止失败**状态。 | 41 | | 启动失败 | Solution 开始失败后,会长时间稳定地处于**启动失败**状态。 | 42 | 43 | 44 | !!! caution 45 | 46 | 如果 Solution 长时间处于某个中间状态,刷新页面后仍未改变,说明出现异常,用户需要提交工单处理。 47 | 48 | !!! caution 49 | 50 | 如果 Solution 处于创建失败、停止失败、启动失败态,用户可以重新执行 **创建、停止、开始** 的操作。 51 | 52 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/4.user-role-description.md: -------------------------------------------------------------------------------- 1 | # Cloud Solution 角色身份说明 2 | 3 | 在创建 Solution 之后,用户需要明确 Cloud 中角色身份的权限,本文介绍 Cloud Solution 角色身份说明。 4 | 5 | ## 内置角色 6 | 7 | NebulaGraph Cloud 中内置了多种角色,说明如下: 8 | 9 | - OWNER 10 | - 资源管理员,对应服务订阅的创建者,具有订阅及资源管理权限。 11 | - 配置 **Solution**,确定及创建服务、激活订阅。 12 | - 管理服务,可以启动或停止 **Solution** 的服务。 13 | - 管理数据库中 **ROOT** 权限的用户,手动授权 **ROOT** 用户。 14 | - 管理数据库私有链接,可以通过私有链接访问云上数据库。 15 | - 查看资源记录。 16 | - 连接可视化工具 Dashboard,可以查看指定 Solution 的节点监控和服务监控。 17 | 18 | - ROOT 19 | - 对应 {{nebula.name}} 的 God 权限角色,由资源管理员设置。God 角色的执行权限,详情可见[内置角色权限](../7.data-security/1.authentication/3.role-list.md)。 20 | - 管理 Cloud 中的不同图空间下的 **USER** 级别的用户,授权 **USER** 级别用户时,需要指定 {{nebula.name}} 的操作权限,包括**ADMIN、DBA、GUEST、USER**,详情可见[内置角色权限](../7.data-security/1.authentication/3.role-list.md)。 21 | - 业务直连访问管理,通过私有链接访问云上数据库。 22 | - 连接可视化工具 Dashboard、Studio、Explorer。 23 | 24 | - USER 25 | - 使用数据库的用户,由 Cloud 中 **ROOT** 用户通过权限管理添加邀请的 Azure 平台用户。 26 | - 对应 {{nebula.name}} 的 **ADMIN**、**DBA**、**GUEST** 或 **USER** 权限角色。 27 | - 业务直连访问管理,通过私有链接访问云上数据库。 28 | - 连接可视化工具 Studio、Explorer。 29 | 30 | ## Solutions 页面的权限 31 | 32 | 在 Solution 页面中,不同的角色将会看到不同的侧边栏下表描述了角色的页面权限。其中,Y 表示该列的角色能看到该行的页面,N 表示不能。 33 | 34 | |页面|OWNER|ROOT|USER| 35 | |:---|:---|:---|:---| 36 | |Solution Info|Y|Y|Y| 37 | |Applications|Y|Y|Y| 38 | |Connectivity|Y|N|N| 39 | |Root Management|Y|N|N| 40 | |User Management|N|Y|N| 41 | |Audit Log|Y|N|N| 42 | |Settings|Y|N|N| 43 | |Subscribe Settings|Y|N|N| 44 | |Billing|Y|N|N| 45 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/5.solution/5.0.introduce-solution.md: -------------------------------------------------------------------------------- 1 | # Solution 2 | 3 | 在 Solution 页面中,不同的角色将会看到不同的侧边栏。具体角色权限,详情参见 [Cloud Solution 角色身份说明](../4.user-role-description.md)。 4 | 5 | ## 详情页面介绍 6 | 7 | 在 Cloud 的首页点击 Solution 名字进入指定的详情页面。详情页面由以下几个部分组成:基本信息、实例信息、价格、入门指南。用户可以在此页面查看每个部分的详细的信息。 8 | 9 | ![详情](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-001_cn.png) 10 | 11 | ## 应用页面介绍 12 | 13 | 在侧边栏点击**应用**进入 Cloud 配套周边工具的跳转页面,不同的用户角色将会在**应用**页面看到不同的周边工具。详情信息,参见 [配套的应用](../5.solution/5.1.supporting-application.md)。 14 | 15 | ![应用](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-002_cn.png) 16 | 17 | ## 链接页面介绍 18 | 19 | 在侧边栏点击**链接**进入私有链接设置页面,在页面中可根据提示设置私有链接,让用户能够通过虚拟网络中的专用节点访问 {{nebula.name}} 。详情信息,参见 [Private Link](../5.solution/5.2.connection-configuration-and-use.md)。 20 | 21 | ![链接](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-003_cn.png) 22 | 23 | ## Root 权限管理页面介绍 24 | 25 | 在侧边栏点击**Root 权限管理**进入 Root 账号管理页面。详情信息,参见[角色与权限管理](../5.solution/5.3.role-and-authority-management.md)。 26 | 27 | ![root](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-004_cn.png) 28 | 29 | ## User 权限管理页面介绍 30 | 31 | 在侧边栏点击**User 权限管理**进入 User 账号管理页面。详情信息,参见[角色与权限管理](../5.solution/5.3.role-and-authority-management.md)。 32 | 33 | ![user](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-005_cn.png) 34 | 35 | ## 审计日志页面介绍 36 | 37 | 在侧边栏点击**审计日志**进入操作记录页面,用户可以根据**所有**、**创建 Solution**、**更改权限** 等操作信息,选择时间段,筛选出操作人和操作记录。 38 | 39 | ![审计日志](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-006_cn.png) 40 | 41 | ## 设置页面介绍 42 | 43 | 在侧边栏点击**设置**进入设置页面,用户可以在设置中**停止Solution**或**转移 Solution**。 44 | 45 | ![设置](https://docs-cdn.nebula-graph.com.cn/figures/cl-ug-007_cn.png) -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/5.solution/5.1.supporting-application.md: -------------------------------------------------------------------------------- 1 | # 配套的应用(Dashboard/Studio/Explorer) 2 | 3 | NebulaGraph Cloud 集成了可视化图数据库管理工具 NebulaGraph Studio、可视化数据库监控工具 NebulaGraph Dashboard、可视化图探索工具 NebulaGraph Explorer。 4 | 5 | 不同的用户角色将会使在 **Applications** 页面看到不同的周边工具,下表描述了不同角色及相应的权限。其中,第一列表示角色所能使用的周边工具,Y 表示拥有权限,N 表示没有权限。 6 | 7 | |周边工具|OWNER|ROOT|USER| 8 | |:---|:---|:---|:---| 9 | |Dashboard|Y|Y|N| 10 | |Studio|N|Y|Y| 11 | |Explorer|N|Y|Y| 12 | 13 | ## Dashboard 14 | 15 | Dashboard 是一款用于监控和管理 {{nebula.name}} 多集群中机器和服务状态的可视化工具。目前 Dashboard 仅支持查看 [集群监控](../../nebula-dashboard-ent/4.cluster-operator/2.monitor.md) 页面。 16 | 17 | ## Studio 18 | 19 | Studio 是一款可以通过 Web 访问的图数据库开源可视化工具,搭配 {{nebula.name}} 内核使用,提供构图、数据导入、编写 nGQL 查询、图探索等一站式服务。使用说明及详情信息,可查看 [什么是 NebulaGraph Studio](../../nebula-studio/about-studio/st-ug-what-is-graph-studio.md)。 20 | 21 | ## Explorer 22 | 23 | Explore 是一款可以通过 Web 访问的图探索可视化工具,搭配 {{nebula.name}} 内核使用,用于与图数据进行可视化交互。即使没有图数据操作经验,用户也可以快速成为图专家。 24 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/5.solution/5.3.role-and-authority-management.md: -------------------------------------------------------------------------------- 1 | # 管理角色权限 2 | 3 | Cloud 上 Solution 的角色与 {{nebula.name}} 内核的角色权限不相同,详情信息,参见 [Cloud Solution 角色身份说明](../4.user-role-description.md)。 4 | 5 | 下表显示了 Cloud 的角色权限与 {{nebula.name}} 内置角色权限的对应情况。 6 | 7 | |Cloud 上的角色权限| {{nebula.name}} 内置角色权限| 8 | |:---|:---| 9 | |OWNER|-| 10 | |ROOT|ROOT| 11 | |USER|ADMIN/DBA/GUEST/USER| 12 | 13 | ## Root Management 14 | 15 | 只有拥有 OWNER 权限的用户可以管理 ROOT 用户。 16 | 17 | 进入 ROOT 管理页面,OWNER 可以对 ROOT 权限用户进行重置。 18 | 19 | 点击 **Reset** 后输入需要更新的 ROOT 用户的邮箱,并点击 **Send Email** 发送邮件。指定用户收到确认邮件后,点击确认即可。 20 | 21 | ## User Management 22 | 23 | 只有拥有 ROOT 权限的用户可以管理 USER 用户。 24 | 25 | 进入 USER 管理页面,ROOT 可以指定用户对图空间的权限为 **ADMIN**、**DBA**、**GUEST** 或 **USER**。 26 | 27 | 选定图空间,点击 **Add User**,输入指定的用户邮箱并选择该用户图空间的管理权限后,点击 **Send Email** 发送邮件。指定用户收到确认邮件后,点击确认即可。 28 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-cloud/nebula-cloud-on-azure/6.pricing.md: -------------------------------------------------------------------------------- 1 | # 价格 2 | 3 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-dashboard/1.what-is-dashboard.md: -------------------------------------------------------------------------------- 1 | # 什么是 NebulaGraph Dashboard(社区版) 2 | 3 | NebulaGraph Dashboard(简称 Dashboard)是一款用于监控 {{nebula.name}} 集群中机器和服务状态的可视化工具。 4 | 5 | !!! enterpriseonly 6 | 7 | 企业版增加了可视化创建集群、批量导入集群、快速扩缩容等功能,点击[定价](https://nebula-graph.com.cn/pricing/)查看更多。用户还可以在阿里云上[免费试用](https://computenest.console.aliyun.com/user/cn-hangzhou/serviceInstanceCreate?ServiceId=service-39f4f251e9484369a778&ServiceVersion=20&isTrial=true)。 8 | 9 | ## 产品功能 10 | 11 | - 监控集群中所有机器的状态,包括 CPU、内存、负载、磁盘和流量。 12 | 13 | - 监控集群中所有服务的信息,包括服务 IP 地址、版本和监控指标(例如查询数量、查询延迟、心跳延迟等)。 14 | 15 | - 监控集群本身的信息,包括集群的服务信息、分区信息、配置和长时任务。 16 | 17 | - 支持全局调整监控数据的页面更新频率。 18 | 19 | ## 适用场景 20 | 21 | 如果有以下任一需求,都可以使用 Dashboard: 22 | 23 | - 需要方便快捷地监测关键指标,集中呈现业务的多个重点信息,保证业务正常运行。 24 | 25 | - 需要多维度(例如时间段、聚合规则、指标)监控集群。 26 | 27 | - 故障发生后,需要复盘问题,确认故障发生时间、异常现象。 28 | 29 | ## 注意事项 30 | 31 | 监控数据默认保留 14 天,即只能查询最近 14 天内任意时间段的监控数据。 32 | 33 | !!! note 34 | 35 | 监控服务由 prometheus 提供,更新频率和保留时间等都可以自行修改。详情请参见 [prometheus 官方文档](https://prometheus.io/docs/prometheus/latest/configuration/configuration/)。 36 | 37 | ## 版本兼容性 38 | 39 | {{nebula.name}} 的版本和 Dashboard 社区版的版本对应关系如下。 40 | 41 | | {{nebula.name}} 版本|Dashboard 版本| 42 | |:---|:---| 43 | |3.6.0 |3.4.0| 44 | |3.5.x |3.4.0| 45 | |3.4.0 ~ 3.4.1|3.4.0、3.2.0| 46 | |3.3.0 |3.2.0| 47 | |2.5.0 ~ 3.2.0|3.1.0| 48 | |2.5.x ~ 3.1.0|1.1.1| 49 | |2.0.1 ~ 2.5.1|1.0.2| 50 | |2.0.1 ~ 2.5.1|1.0.1| 51 | 52 | ## 更新说明 53 | 54 | [Release](https://github.com/vesoft-inc/nebula-dashboard/releases/tag/{{dashboard.tag}}) 55 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-dashboard/3.connect-dashboard.md: -------------------------------------------------------------------------------- 1 | # 连接 Dashboard 2 | 3 | Dashboard 部署完成后,可以通过浏览器登录使用 Dashboard。 4 | 5 | ## 前提条件 6 | 7 | - Dashboard 相关服务已经启动。详情请参见[部署 Dashboard](2.deploy-dashboard.md)。 8 | 9 | - 建议使用 Chrome 89 及以上的版本的 Chrome 浏览器,否则可能有兼容问题。 10 | 11 | ## 操作步骤 12 | 13 | 1. 确认 Dashboard 服务所在机器的 IP 地址,在浏览器中输入`:7003`打开登录页面。 14 | 15 | 2. 输入 {{nebula.name}} 数据库的账号和密码。 16 | 17 | - 如果 {{nebula.name}} 已经启用身份验证,用户可以使用已创建的账号连接 Dashboard。 18 | 19 | - 如果 {{nebula.name}} 未启用身份验证,用户只能使用默认用户`root`和任意密码连接 Dashboard。 20 | 21 | 有关如何启用身份验证请参见[身份验证](../7.data-security/1.authentication/1.authentication.md)。 22 | 23 | 3. 单击**登录**。 24 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-studio/about-studio/st-ug-limitations.md: -------------------------------------------------------------------------------- 1 | # 使用限制 2 | 3 | 本文描述使用 Studio 的限制。 4 | 5 | ## 系统架构 6 | 7 | Studio 目前仅支持 x86_64 架构。 8 | 9 | ## 数据上传 10 | 11 | Studio 上传数据仅支持上传无表头的 CSV 文件,但是,单个文件大小及保存时间不受限制,而且数据总量以本地存储容量为准。 12 | 13 | ## 数据备份 14 | 15 | 目前仅支持在 **控制台** 上以 CSV 格式导出查询结果,不支持其他数据备份方式。 16 | 17 | ## nGQL 支持 18 | 19 | 除以下内容外,用户可以在 **控制台** 上执行所有 nGQL 语句: 20 | 21 | - `USE `:只能在 **Space** 下拉列表中选择图空间,不能运行这个语句选择图空间。 22 | - **控制台** 上使用 nGQL 语句时,用户可以直接回车换行,不能使用换行符。 23 | 24 | 37 | 38 | ## 浏览器支持 39 | 40 | 建议使用最新版本的 Chrome 访问 Studio。否则会出现样式显示异常和交互异常等问题。 41 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-studio/manage-schema/st-ug-view-schema.md: -------------------------------------------------------------------------------- 1 | # 查看 Schema 2 | 3 | 用户可以在 Studio 上可视化地查看 Schema。 4 | 5 | ## 操作步骤 6 | 7 | 1. 在顶部导航栏里,点击 **Schema** 页签。 8 | 9 | 2. 在**图空间列表**中,找到图空间,单击图空间名称或者在**操作**列中单击 **Schema**。 10 | 11 | 3. 单击**查看 Schema** 页签,单击**获取 Schema**。 12 | 13 | ## 其他操作 14 | 15 | 在**图空间列表**中,找到图空间,在**操作**列可以执行如下操作: 16 | 17 | - 查看 Schema DDL:显示该图空间的 Schema 创建语句,包括图空间、Tag、Edge type 和索引。 18 | - 克隆图空间:克隆该图空间的 Schema 到新的图空间。 19 | - 删除图空间:删除该图空间,包括 Schema 和所有点边数据。 20 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-studio/quick-start/st-ug-plan-schema.md: -------------------------------------------------------------------------------- 1 | # 规划 Schema 2 | 3 | 在使用 Studio 之前,用户需要先根据 {{nebula.name}} 的要求规划 Schema(模式)。 4 | 5 | Schema 至少要包含以下要素: 6 | 7 | * Tag,以及每种 Tag 的属性。 8 | 9 | * Edge type,以及每种 Edge type 的属性。 10 | 11 | 用户可以下载 {{nebula.name}} 示例数据集 [basketballplayer](https://docs-cdn.nebula-graph.com.cn/dataset/dataset.zip "点击下载") ,本文将通过该示例说明如何规划 Schema。 12 | 13 | 下表列出了 Schema 要素。 14 | 15 | | 类型 | 名称 | 属性名(数据类型) | 说明 | 16 | | :--- | :--- | :---| :--- | 17 | | Tag | **player** | - `name` (`string`)
- `age` (`int`) | 表示球员。 | 18 | | Tag | **team** | - `name` (`string`) | 表示球队。 | 19 | | Edge type | **serve** | - `start_year` (`int`)
- `end_year` (`int`) | 表示球员的行为。
该行为将球员和球队联系起来,方向是从球员到球队。 | 20 | | Edge type | **follow** | - `degree`(`int`) | 表示球员的行为。
该行为将两个球员联系起来,方向是从一个球员到另一个球员。 | 21 | 22 | 下图说明示例中 **player** 类点与 **team** 类点之间如何发生关系(**serve**/**follow**)。 23 | 24 | ![球员和球员、球员和球队之间的关系](https://docs-cdn.nebula-graph.com.cn/figures/st-ug-013-cn.png) -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-studio/system-settings.md: -------------------------------------------------------------------------------- 1 | # 全局设置 2 | 3 | 本文介绍 Studio 的全局设置,包含语言切换和 Beta 功能。 4 | 5 | - 语言:支持切换中文和英文。 6 | 7 | - Beta 功能:Beta 功能开关。Beta 功能目前包括[查看 Schema](manage-schema/st-ug-view-schema.md)、[文本转查询](quick-start/st-ug-console.md)和 [AI 导入](quick-start/st-ug-import-data.md)。 8 | 9 | 文本转查询和 AI 导入需要设置人工智能相关的配置。详细设置参见下文。 10 | 11 | ## 文本转查询和 AI 导入 12 | 13 | 文本转查询和 AI 导入是基于大规模语言模型(LLM)实现的人工智能,需要配置以下参数才能正常使用。 14 | 15 | |参数|说明| 16 | |:---------|:--| 17 | |**API type** | API 接口类型。支持`OpenAI`和`Aliyun`。 | 18 | |**URL** | API URL。请按照对应接口类型填写正确的 URL 格式。例如`https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}`。 | 19 | |**key** | 用于验证 API 的 key。使用在线大语言模型时必填,使用离线大语言模型时根据实际设置选填。 | 20 | |**model** | 大语言模型版本。使用在线大语言模型时必填,使用离线大语言模型时根据实际设置选填。 | 21 | |**文本最大长度**| 接收或生成一段文本的最大长度限制。单位:字节。 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-studio/troubleshooting/st-ug-config-server-errors.md: -------------------------------------------------------------------------------- 1 | # 连接数据库错误 2 | 3 | ## 问题描述 4 | 5 | 按[连接 Studio](../deploy-connect/st-ug-connect.md) 文档操作,提示 **配置失败**。 6 | 7 | ## 可能的原因及解决方法 8 | 9 | 用户可以按以下步骤排查问题。 10 | 11 | ### 第 1 步。确认 **Host** 字段的格式是否正确 12 | 13 | 必须填写 {{nebula.name}} 图数据库 Graph 服务的 IP 地址(`graph_server_ip`)和端口。如果未做修改,端口默认为 `9669`。即使 {{nebula.name}} 与 Studio 都部署在当前机器上,用户也必须使用本机 IP 地址,而不能使用 `127.0.0.1`、`localhost` 或者 `0.0.0.0`。 14 | 15 | ### 第 2 步。确认 **用户名** 和 **密码** 是否正确 16 | 17 | 如果 {{nebula.name}} 没有开启身份认证,用户可以填写任意字符串登录。 18 | 19 | 如果已经开启身份认证,用户必须使用分配的账号登录。 20 | 21 | ### 第 3 步。确认 {{nebula.name}} 服务是否正常 22 | 23 | 检查 {{nebula.name}} 服务状态。关于查看服务的操作: 24 | 25 | - 如果在 Linux 服务器上通过编译部署的 {{nebula.name}},参考[查看 {{nebula.name}} 服务](../../4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster.md "点击查看 {{nebula.name}} 内核文档")。 26 | - 如果使用 Docker Compose 部署和 RPM 部署的 {{nebula.name}},参考[查看 {{nebula.name}} 服务状态和端口](../deploy-connect/st-ug-deploy.md "点击前往 GitHub 网站")。 27 | 28 | 如果 {{nebula.name}} 服务正常,进入第 4 步继续排查问题。否则,请重启 {{nebula.name}} 服务。 29 | 30 | !!! note 31 | 32 | 如果之前使用 `docker-compose up -d` 启动 {{nebula.name}},必须运行 `docker-compose down` 命令停止 {{nebula.name}} 。 33 | 34 | ### 第 4 步。确认 Graph 服务的网络连接是否正常 35 | 36 | 在 Studio 机器上运行命令(例如 `telnet 9669`)确认 {{nebula.name}} 的 Graph 服务网络连接是否正常。 37 | 38 | 如果连接失败,则按以下要求检查: 39 | 40 | - 如果 Studio 与 {{nebula.name}} 在同一台机器上,检查端口是否已暴露。 41 | - 如果两者不在同一台机器上,检查 {{nebula.name}} 服务器的网络配置,例如,防火墙、网关以及端口。 42 | 43 | 如果按上述步骤排查后仍无法连接 {{nebula.name}} 服务,请前往 [{{nebula.name}} 官方论坛](https://discuss.nebula-graph.com.cn/ "点击前往 {{nebula.name}} 官方论坛")咨询。 44 | -------------------------------------------------------------------------------- /docs-2.0-zh/nebula-studio/troubleshooting/st-ug-faq.md: -------------------------------------------------------------------------------- 1 | # 常见问题 2 | 3 | **为什么我无法使用某个功能?** 4 | 5 | 如果发现无法使用某个功能,建议按以下步骤排除问题: 6 | 7 | 1. 确认 {{nebula.name}} 是最新版本。如果使用 Docker Compose 部署 {{nebula.name}} 数据库,建议运行 `docker-compose pull && docker-compose up -d` 拉取最新的 Docker 镜像,并启动容器。 8 | 2. 确认 Studio 是最新版本。详细信息参考[版本更新](../../20.appendix/release-notes/studio-release-note.md)。 9 | 3. 搜索[论坛](https://discuss.nebula-graph.com.cn/)或 GitHub 的 [nebula](https://github.com/vesoft-inc/nebula) 和 [nebula-web-docker](https://github.com/vesoft-inc/nebula-web-docker/issues) 项目,确认是否已经有类似的问题。 10 | 4. 如果上述操作均未解决问题,欢迎在论坛上提交问题。 11 | 12 | -------------------------------------------------------------------------------- /docs-2.0-zh/overrides/404.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | {% block content %} 4 |

对不起,页面失效了……

5 | 6 |

欢迎点击原文档右上角的编辑按钮修复失效链接,并成为contributor

7 |

你还可以:

8 |

提交issue反馈链接问题

9 |

返回上一页

10 |

返回文档首页

11 | {% endblock %} 12 | {% block disqus %}{% endblock %} -------------------------------------------------------------------------------- /docs-2.0-zh/overrides/content.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | {% if page.meta.source %} 5 | 10 | {% endif %} 11 | 12 | {{ page.content }} 13 | 14 | {% if page.meta.git_revision_date_localized %} 15 | Last update: {{ page.meta.git_revision_date_localized }} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /docs-2.0-zh/overrides/main.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | {% extends "base.html" %} 5 | 6 | {% block outdated %} 7 | 从3.5.0版本开始的文档仅包含社区版功能。如需查看企业版文档,欢迎联系我们。 8 | {% endblock %} 9 | 10 | {% block announce %} 11 | 让 NebulaGraph 周边工具产品更好用, 12 | 13 | 填写问卷提交反馈,就能抽取现金红包! 14 | 15 | {% endblock %} -------------------------------------------------------------------------------- /docs-2.0-zh/overrides/partials/algolia-search.html: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /docs-2.0-zh/stylesheets/extra.css: -------------------------------------------------------------------------------- 1 | .md-grid { 2 | max-width: initial; 3 | } 4 | 5 | /*隐藏mike默认的version selector 6 | div.md-version { 7 | display: none !important; 8 | } */ 9 | 10 | /*自定义announce banner的字体和背景颜色*/ 11 | aside.md-banner { 12 | color: rgba(0, 0, 0, 0.714); 13 | background-color: rgba(146, 228, 24, 0.541); 14 | } 15 | 16 | /* 自定义 annnoucement bar 和 outdate bar的height */ 17 | div.md-banner__inner { 18 | margin: 0.2rem auto; 19 | } 20 | 21 | /* 自定义 outdated bar 的颜色 */ 22 | aside.md-banner--warning { 23 | color: rgba(0, 0, 0, 0.714); 24 | background-color: rgba(146, 228, 24, 0.541); 25 | } 26 | 27 | 28 | /* 黑夜主题色 */ 29 | :root{ 30 | --md-primary-fg-color: #A6A5C4; /* 导航栏页面颜色 */ 31 | --md-accent-fg-color: #49BDF0; /* 选中/悬浮链接的颜色 */ 32 | } 33 | 34 | /* 白天主题色 */ 35 | [data-md-color-scheme="nebula"]{ 36 | --md-primary-fg-color: #55295B; /* 导航栏页面颜色 */ 37 | --md-accent-fg-color: #7DBB7C; /* 选中/悬浮链接的颜色 */ 38 | --md-typeset-a-color: #0FA37F!important; /* 白天的链接颜色 */ 39 | --md-code-fg-color: rgb(12, 21, 26); /* 代码段字体色 */ 40 | --md-code-bg-color: #eaebec;/* 代码段背景色 */ 41 | --md-typeset-color: #000000;/* 普通背景字 */ 42 | } 43 | 44 | /* 修复版本选择框上边缘被box-shadow覆盖的情况 */ 45 | div>nav>label.md-nav__title { 46 | box-shadow: none!important; 47 | } 48 | -------------------------------------------------------------------------------- /docs-2.0-zh/stylesheets/logo.css: -------------------------------------------------------------------------------- 1 | .md-header .md-logo { 2 | display: block; 3 | width: 187px; 4 | height: 40px; 5 | padding: 0; 6 | } 7 | 8 | .md-header .md-logo img { 9 | width: 187px !important; 10 | height: 40px !important; 11 | } -------------------------------------------------------------------------------- /docs-2.0-zh/stylesheets/pdf.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Zh Font'; 3 | src: url('../fonts/NotoSansSC-Regular.ttf') format('truetype'); 4 | } 5 | 6 | @media print { 7 | * { 8 | font-family: 'Zh Font'; 9 | }} -------------------------------------------------------------------------------- /docs-2.0-zh/synchronization-and-migration/2.balance-syntax.md: -------------------------------------------------------------------------------- 1 | # 负载均衡 2 | 3 | 我们可以提交任务让 {{nebula.name}} 的 Storage 服务实现负载均衡。详细示例请参见 [Storage 负载均衡](../8.service-tuning/load-balance.md)。 4 | 5 | !!! note 6 | 7 | 其他作业管理命令请参见[作业管理](../3.ngql-guide/4.job-statements.md)。 8 | 9 | 负载均衡相关的语法说明如下。 10 | 11 | |语法|说明| 12 | |:---|:---| 13 | |`SUBMIT JOB BALANCE LEADER`|启动任务均衡分布所有图空间中的 leader。该命令会返回任务 ID(`job_id`)。| 14 | 15 | 16 | 查看、停止、重启任务,请参见[作业管理](../3.ngql-guide/4.job-statements.md)。 17 | -------------------------------------------------------------------------------- /prepare.sh: -------------------------------------------------------------------------------- 1 | sudo apt update -y 2 | sudo apt install -y python3-pip python3-cffi python3-brotli libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 pango1.0-tools 3 | 4 | # Install dependencies 5 | pip install --upgrade pip 6 | pip install -r ./requirements.txt 7 | 8 | # Render content according to the database_edition in mkdocs.yml 9 | python ./scripts/conditional_render.py 10 | python ./scripts/conditional_yml.py 11 | 12 | # zh language 13 | sudo apt install font-manager fonts-noto-cjk language-pack-zh-hans fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core 14 | 15 | export LANG="zh_CN.UTF-8" 16 | fc-match serif:lang=zh 17 | fc-match sans-serif:lang=zh 18 | 19 | #sed -i '1i---\ntemplate: overrides/main.html\n---' `find ./ -name "*.md"` 20 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs 2 | weasyprint==54.3 3 | mkdocs-material-extensions 4 | mike==1.1.2 5 | mkdocs-material==9.4.6 6 | mkdocs-material-extensions 7 | mkdocs-macros-plugin 8 | mdx_truly_sane_lists 9 | mkdocs_latest_release_plugin 10 | mkdocs-git-revision-date-localized-plugin 11 | mkdocs-with-pdf 12 | qrcode 13 | mkdocs-exclude 14 | mkdocs-redirects 15 | mkdocs-minify-plugin 16 | Markdown==3.3.7 17 | pyyaml 18 | mkdocs-glightbox 19 | -------------------------------------------------------------------------------- /scripts copy/render_chinese_only.py: -------------------------------------------------------------------------------- 1 | # This script processes mkdocs.yml to remove all content between every pair of "# en.begin" and "# en.end" annotations 2 | 3 | mkdocs_yml_path = 'mkdocs.yml' 4 | 5 | def remove_content(filename): 6 | with open(filename, 'r') as file: 7 | lines = file.readlines() 8 | 9 | begin_tag = "# en.begin" 10 | end_tag = "# en.end" 11 | in_en_block = False 12 | 13 | with open(filename, 'w') as file: 14 | for line in lines: 15 | if line.strip() == begin_tag: 16 | in_en_block = True 17 | elif line.strip() == end_tag: 18 | in_en_block = False 19 | elif not in_en_block: 20 | file.write(line) 21 | 22 | 23 | remove_content(mkdocs_yml_path) 24 | 25 | -------------------------------------------------------------------------------- /scripts copy/render_english_only.py: -------------------------------------------------------------------------------- 1 | # This script processes mkdocs.yml to remove all content between every pair of "# zh.begin" and "# zh.end" annotations 2 | 3 | mkdocs_yml_path = 'mkdocs.yml' 4 | 5 | def remove_content(filename): 6 | with open(filename, 'r') as file: 7 | lines = file.readlines() 8 | 9 | begin_tag = "# zh.begin" 10 | end_tag = "# zh.end" 11 | in_zh_block = False 12 | 13 | with open(filename, 'w') as file: 14 | for line in lines: 15 | if line.strip() == begin_tag: 16 | in_zh_block = True 17 | elif line.strip() == end_tag: 18 | in_zh_block = False 19 | elif not in_zh_block: 20 | file.write(line) 21 | 22 | 23 | remove_content(mkdocs_yml_path) 24 | -------------------------------------------------------------------------------- /scripts/render_chinese_only.py: -------------------------------------------------------------------------------- 1 | # This script processes mkdocs.yml to remove all content between every pair of "# en.begin" and "# en.end" annotations 2 | 3 | mkdocs_yml_path = 'mkdocs.yml' 4 | 5 | def remove_content(filename): 6 | with open(filename, 'r') as file: 7 | lines = file.readlines() 8 | 9 | begin_tag = "# en.begin" 10 | end_tag = "# en.end" 11 | in_en_block = False 12 | 13 | with open(filename, 'w') as file: 14 | for line in lines: 15 | if line.strip() == begin_tag: 16 | in_en_block = True 17 | elif line.strip() == end_tag: 18 | in_en_block = False 19 | elif not in_en_block: 20 | file.write(line) 21 | 22 | 23 | remove_content(mkdocs_yml_path) 24 | 25 | -------------------------------------------------------------------------------- /scripts/render_english_only.py: -------------------------------------------------------------------------------- 1 | # This script processes mkdocs.yml to remove all content between every pair of "# zh.begin" and "# zh.end" annotations 2 | 3 | mkdocs_yml_path = 'mkdocs.yml' 4 | 5 | def remove_content(filename): 6 | with open(filename, 'r') as file: 7 | lines = file.readlines() 8 | 9 | begin_tag = "# zh.begin" 10 | end_tag = "# zh.end" 11 | in_zh_block = False 12 | 13 | with open(filename, 'w') as file: 14 | for line in lines: 15 | if line.strip() == begin_tag: 16 | in_zh_block = True 17 | elif line.strip() == end_tag: 18 | in_zh_block = False 19 | elif not in_zh_block: 20 | file.write(line) 21 | 22 | 23 | remove_content(mkdocs_yml_path) 24 | -------------------------------------------------------------------------------- /third-party-lib-licenses/3.third-party-licenses-for-docs.md: -------------------------------------------------------------------------------- 1 | # Third-party licenses for the NebulaGraph documentation 2 | 3 | This document presents a list of license information on the third-party utilities that are used for building the NebulaGraph documentation. 4 | 5 | | Project Name | Version | License | 6 | | ----------------------------------------- | ------- | ------------------------------------------------------------ | 7 | | [mkdocs](https://www.mkdocs.org/) | 1.3.0 | [BSD 2-Clause "Simplified" License](https://github.com/mkdocs/mkdocs/blob/master/LICENSE) | 8 | | [mike](https://github.com/jimporter/mike) | 1.1.2 | [BSD 3-Clause "New" or "Revised" License](https://github.com/jimporter/mike/blob/master/LICENSE) | 9 | | [weasyprint](https://weasyprint.org/) | 54.3 | [BSD 3-Clause "New" or "Revised" License](https://github.com/Kozea/WeasyPrint/blob/master/LICENSE) | --------------------------------------------------------------------------------