Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update book from 2.6.0 #1157

Merged
merged 187 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
a48ce94
Updated studio docs
randomJoe211 May 14, 2021
01e4284
Create st-ug-limitations.md
randomJoe211 May 14, 2021
bfdb9ff
Delete st-ug-limitations.md
randomJoe211 May 14, 2021
f855b27
Revert "Delete st-ug-limitations.md"
randomJoe211 May 14, 2021
03a8d26
Delete docs-2.0/nebula-docs directory
randomJoe211 May 17, 2021
04bee24
keep consistency
randomJoe211 May 17, 2021
5954458
Updated studio docs
randomJoe211 May 14, 2021
e9d8153
Create st-ug-limitations.md
randomJoe211 May 14, 2021
d4530ba
Delete st-ug-limitations.md
randomJoe211 May 14, 2021
48ab6b6
Revert "Delete st-ug-limitations.md"
randomJoe211 May 14, 2021
66941d4
Delete docs-2.0/nebula-docs directory
randomJoe211 May 17, 2021
9286aa4
keep consistency
randomJoe211 May 17, 2021
6fb5ecc
Updated studio docs
randomJoe211 May 14, 2021
cbee085
Create st-ug-limitations.md
randomJoe211 May 14, 2021
5a4a026
Delete st-ug-limitations.md
randomJoe211 May 14, 2021
c147be1
Revert "Delete st-ug-limitations.md"
randomJoe211 May 14, 2021
83cbeb9
Delete docs-2.0/nebula-docs directory
randomJoe211 May 17, 2021
df91984
keep consistency
randomJoe211 May 17, 2021
a3db441
Merge branch 'vesoft-inc:master' into master
randomJoe211 May 31, 2021
c72bd3c
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 2, 2021
7859fb6
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 2, 2021
649ae82
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 3, 2021
be2e882
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 4, 2021
55906d3
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 9, 2021
32982c7
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 15, 2021
d58a30d
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 21, 2021
a1d22f8
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 23, 2021
31b686a
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 23, 2021
b813a7c
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 24, 2021
b6dc134
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 24, 2021
64cabe3
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jun 25, 2021
a9e8293
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 2, 2021
7fbc278
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 9, 2021
32187a7
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 16, 2021
7db0590
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 16, 2021
64ea344
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 21, 2021
1a44200
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 21, 2021
ee01f88
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 23, 2021
f122f44
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 26, 2021
b6d38cc
Merge branch 'vesoft-inc:master' into master
randomJoe211 Jul 27, 2021
6a99d39
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 3, 2021
29757d2
Update mkdocs.yml
randomJoe211 Aug 3, 2021
34f5073
Update mkdocs.yml
randomJoe211 Aug 4, 2021
d0c0bd7
Merge pull request #1 from vesoft-inc/master
randomJoe211 Aug 4, 2021
c442c6f
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 11, 2021
6ad100b
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 13, 2021
4543c45
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 18, 2021
c991fa6
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 18, 2021
0a7ec05
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 19, 2021
1ad3c6d
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 20, 2021
396f908
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 24, 2021
e5d6e5f
Merge branch 'vesoft-inc:master' into master
randomJoe211 Aug 30, 2021
fe26569
Merge branch 'vesoft-inc:master' into master
randomJoe211 Sep 16, 2021
c24f22c
Update 5.lookup.md (#1002)
lopn Sep 26, 2021
a837fc7
Update 3.role-list.md (#1005)
cooper-lzy Sep 26, 2021
488b6bf
Update source_install-nebula-graph-by-rpm-or-deb.md (#1008)
foesa-yang Sep 26, 2021
dab75a4
Merge branch 'vesoft-inc:master' into master
randomJoe211 Sep 26, 2021
454e14e
Update 2.deploy-nebula-operator.md (#1015)
abby-cyber Sep 27, 2021
289321e
Update mkdocs.yml (#1016)
cooper-lzy Sep 27, 2021
ee84903
Support excluding files (#1017)
randomJoe211 Sep 27, 2021
4b4b449
Update 2.deploy-dashboard.md (#1014)
foesa-yang Sep 27, 2021
16db60b
Update 4.ldap.md (#1011)
cooper-lzy Sep 27, 2021
f623f42
Enable prefix bloom filter by default (#1012)
cooper-lzy Sep 27, 2021
9df1a04
show jobs only show space related (#1013)
cooper-lzy Sep 27, 2021
0deb35b
Update 3.2create-cluster-with-helm.md (#1021)
abby-cyber Sep 28, 2021
1db4753
Update 4.schema.md (#1019)
randomJoe211 Sep 28, 2021
19b9e28
Update nebula-algorithm.md (#1022)
cooper-lzy Sep 29, 2021
8c50b37
Update 4.connect-to-nebula-graph-service.md (#1023)
abby-cyber Sep 29, 2021
c6fabca
Update 5.operator-failover.md (#1025)
abby-cyber Sep 29, 2021
b990b87
update utils (#1029)
cooper-lzy Sep 29, 2021
dc3e360
Update ex-ug-FAQ.md (#1033)
foesa-yang Oct 8, 2021
8e5e453
add toss (#1035)
cooper-lzy Oct 11, 2021
816900d
Update ex-ug-import-from-neo4j.md (#1034)
cooper-lzy Oct 11, 2021
95fbb2c
add ssl (#1039)
cooper-lzy Oct 11, 2021
6463662
delete enterpriseonly (#1046)
cooper-lzy Oct 12, 2021
3f62909
lookup support use IN (#1050)
cooper-lzy Oct 12, 2021
7cfd9ce
Update 4.date-and-time.md (#1037)
foesa-yang Oct 12, 2021
bf4f2e1
Update 4.date-and-time.md (#1038)
foesa-yang Oct 12, 2021
49bbd71
Update 3.go.md (#1048)
foesa-yang Oct 12, 2021
4e4be7f
add max_allowed_query_size in graph config (#1036)
foesa-yang Oct 12, 2021
f248722
Update mkdocs.yml (#1040)
cooper-lzy Oct 13, 2021
3cb7db7
create space as (#1045)
cooper-lzy Oct 13, 2021
8c50d6a
Fix bad punctuations (#1049)
greyli Oct 13, 2021
6538960
Fix the incorrect description for UPSERT example (#1051)
greyli Oct 13, 2021
b9a1bc1
Update how-to-contribute.md (#1052)
abby-cyber Oct 13, 2021
0ea08c8
Update 4.ssl.md (#1044)
cooper-lzy Oct 14, 2021
04d7be6
Update nebula-algorithm.md (#1043)
cooper-lzy Oct 15, 2021
8586081
Update 4.ssl.md (#1041)
cooper-lzy Oct 15, 2021
86446ee
Modify some descriptions (#1054)
zhaohaifei Oct 15, 2021
199015e
fetch format (#1060)
cooper-lzy Oct 15, 2021
4d137b6
lookup format (#1061)
cooper-lzy Oct 15, 2021
ed518fe
Update ex-ug-import-from-sst.md (#1055)
cooper-lzy Oct 15, 2021
26a24b2
Improve the format of contributing guide (#1056)
greyli Oct 15, 2021
96f7566
get subgraph format (#1058)
cooper-lzy Oct 15, 2021
99743f7
Update 4.fetch.md (#1063)
izhuxiaoqing Oct 15, 2021
586c178
Update explorer (#1059)
foesa-yang Oct 15, 2021
6e70a2d
Update ex-ug-page-overview.md (#1065)
foesa-yang Oct 15, 2021
de2f46a
add a memory configuration param (#1062)
abby-cyber Oct 15, 2021
ccf39a8
add go format (#1064)
cooper-lzy Oct 18, 2021
1e8dbf5
Update 3.go.md (#1067)
cooper-lzy Oct 18, 2021
446e563
update eco tools (#1057)
foesa-yang Oct 18, 2021
d000a69
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 19, 2021
f4e0aae
Add rate limit parameters (#1071)
randomJoe211 Oct 19, 2021
9d81e03
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 19, 2021
9d1fb02
modify suffix (#1068)
izhuxiaoqing Oct 22, 2021
8828b87
Update ex-ug-import-from-sst.md (#1074)
izhuxiaoqing Oct 22, 2021
32e9f6d
Update 6.delete-tag.md (#1075)
xiajingchun Oct 22, 2021
444d0ab
update explorer picture (#1078)
foesa-yang Oct 22, 2021
b0b93ed
yield for full doc (#1070)
cooper-lzy Oct 22, 2021
745c9e6
Update 2.meta-config.md (#1066)
abby-cyber Oct 22, 2021
736f132
Update ex-ug-import-from-sst.md (#1073)
cooper-lzy Oct 22, 2021
0648788
lack of "[" (#1079)
abby-cyber Oct 22, 2021
3fbc367
Update ttl-options.md (#1080)
abby-cyber Oct 22, 2021
e0a53eb
add zone doc (#1053)
cooper-lzy Oct 22, 2021
8d02242
add geo (#1081)
cooper-lzy Oct 22, 2021
d9662d6
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 22, 2021
51b06f1
Update 1.search-with-text-based-index.md (#1083)
abby-cyber Oct 22, 2021
5413618
Update limit syntax (#1082)
randomJoe211 Oct 22, 2021
d777fb1
Add sample doc (#1084)
randomJoe211 Oct 25, 2021
1e962e2
Update 0.FAQ.md (#1087)
cooper-lzy Oct 25, 2021
c6222b9
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 25, 2021
c380ad9
Update 1.text-based-index-restrictions.md (#1089)
abby-cyber Oct 26, 2021
b0df1d6
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 26, 2021
d41788d
Update 5.lookup.md (#1086)
randomJoe211 Oct 26, 2021
445db4f
add 2.6 release note (#1088)
cooper-lzy Oct 26, 2021
cb109b1
Update 2.rocksdb-statistics.md (#1091)
cooper-lzy Oct 26, 2021
2de6722
upgrade nebula (#1093)
cooper-lzy Oct 26, 2021
a8ee231
Update load-balance.md (#1092)
cooper-lzy Oct 26, 2021
7dd6924
Update source_manage-service.md (#1094)
abby-cyber Oct 26, 2021
a023ffd
Update 5.null.md (#1097)
randomJoe211 Oct 26, 2021
5c06dea
Update releasenote.md (#1099)
izhuxiaoqing Oct 26, 2021
bc136ff
Update 4.date-and-time.md (#1095)
randomJoe211 Oct 26, 2021
bd2ba75
add geo directory (#1096)
cooper-lzy Oct 26, 2021
5d37de2
Update 4.nebula-graph-crud.md (#1098)
abby-cyber Oct 26, 2021
aff3c49
remove studio&dashboard&explorer (#1100)
foesa-yang Oct 26, 2021
c2471b6
No line to separate result rows (#1105)
randomJoe211 Oct 27, 2021
84dc9b1
change eco-tools (#1106)
cooper-lzy Oct 27, 2021
318a2d1
Use new console table format in example (#1102)
yixinglu Oct 27, 2021
0a7c433
Update 8.map.md (#1103)
randomJoe211 Oct 27, 2021
c4b1c24
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 27, 2021
de31fd6
Update 9.type-conversion.md (#1104)
randomJoe211 Oct 27, 2021
7a493ac
Update 1.resource-preparations.md (#1110)
abby-cyber Oct 27, 2021
337166e
Update 2.deploy-es.md (#1111)
cooper-lzy Oct 27, 2021
9919be1
Update 4.schema.md (#1108)
cooper-lzy Oct 27, 2021
aca9405
updated-connect-to-nebula-graph (#1107)
abby-cyber Oct 27, 2021
12c676f
Update 6.eco-tool-version.md (#1101)
Sophie-Xie Oct 27, 2021
57d1f05
Update 3.property-reference.md (#1109)
randomJoe211 Oct 27, 2021
2a53a2a
Merge branch 'vesoft-inc:master' into master
randomJoe211 Oct 27, 2021
d441456
change example (#1115)
cooper-lzy Oct 28, 2021
e36430e
Add doc: install with tar (#1116)
randomJoe211 Oct 28, 2021
06138c6
Update 6.set.md (#1114)
randomJoe211 Oct 29, 2021
5ee09ed
Update 4.pipe.md (#1113)
randomJoe211 Nov 1, 2021
6050b54
Update 1.comparison.md (#1112)
randomJoe211 Nov 1, 2021
e847c6d
Update composite property indexes (#1118)
cooper-lzy Nov 1, 2021
e6f9c73
update studio (#1069)
foesa-yang Nov 1, 2021
aefcb11
Update 7.string.md (#1120)
randomJoe211 Nov 1, 2021
15be5f7
Update 8.predicate.md (#1124)
randomJoe211 Nov 1, 2021
9799434
Update 14.geo.md (#1125)
randomJoe211 Nov 1, 2021
7071425
update exchange 2.6.0 (#1119)
cooper-lzy Nov 1, 2021
2fe9744
Create 6. cheatcheet-for-ngql-command.md (#1085)
abby-cyber Nov 1, 2021
a3852b0
Update 1.install-nebula-graph-by-compiling-the-source-code.md (#1117)
abby-cyber Nov 1, 2021
125be8f
Update 5.case-expressions.md (#1121)
randomJoe211 Nov 1, 2021
5b030df
Update 7.count.md (#1122)
randomJoe211 Nov 1, 2021
4e9b28f
Update 12.hash.md (#1123)
randomJoe211 Nov 1, 2021
23a20cc
Update 2.match.md (#1127)
randomJoe211 Nov 1, 2021
42848f7
Update 4.install-nebula-graph-from-tar.md (#1128)
randomJoe211 Nov 1, 2021
68d25d8
verify nGQL (#1129)
cooper-lzy Nov 1, 2021
b13f4df
update (#1133)
foesa-yang Nov 1, 2021
2d65e61
Update 14.show-stats.md (#1138)
randomJoe211 Nov 1, 2021
2501b75
Update 7.show-index-status.md (#1137)
randomJoe211 Nov 1, 2021
bf43c24
Update 6.show-hosts.md (#1136)
randomJoe211 Nov 1, 2021
08ec670
Update 5.show-create-tags-edges.md (#1135)
randomJoe211 Nov 1, 2021
d1f642d
Update 4.show-create-space.md (#1134)
randomJoe211 Nov 1, 2021
ea8f02f
Update 3.go.md (#1132)
randomJoe211 Nov 1, 2021
03fb36f
Update 3.deploy-nebula-graph-with-docker-compose.md (#1126)
abby-cyber Nov 1, 2021
4f74430
Update 5.lookup.md (#1130)
randomJoe211 Nov 1, 2021
0f88790
Update 0.FAQ.md (#1141)
randomJoe211 Nov 1, 2021
2f5fb89
Update 15.show-tags-edges.md (#1139)
randomJoe211 Nov 1, 2021
076090d
Update 17.show-sessions.md (#1140)
randomJoe211 Nov 1, 2021
999d16a
updates (#1131)
abby-cyber Nov 2, 2021
8875daa
Update source_install-nebula-graph-by-rpm-or-deb.md (#1142)
abby-cyber Nov 2, 2021
27cf3b8
Add an example for random LIMIT seed (#1143)
randomJoe211 Nov 2, 2021
3fc61ee
modify-doc-name (#1144)
abby-cyber Nov 2, 2021
30f6fa8
Update upgrade-nebula-graph-to-260.md (#1147)
abby-cyber Nov 2, 2021
b7fa7d8
Merge branch 'vesoft-inc:master' into master
randomJoe211 Nov 2, 2021
1e9634c
Merge branch 'master' into update-book-from-2.6.0
randomJoe211 Nov 3, 2021
16a4c57
Update mkdocs.yml
randomJoe211 Nov 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

可以从以下方面进行贡献:

- 修正拼写错误或格式(标点,空格,缩进,代码块等)
- 修正或更新不适当或过时的描述
- 提交新文档
- 提交或解决文档[issues](https://github.com/vesoft-inc/nebula-docs-cn/issues)
- 审阅他人提交的 PR
- 修正拼写错误或格式(标点,空格,缩进,代码块等)
- 修正或更新不适当或过时的描述
- 提交新文档
- 提交或解决文档 [issue][_issues]。
- 审阅他人提交的 PR

## 必须遵循的 Markdown 规范

Expand All @@ -22,5 +22,8 @@

可以选择以下方式进行贡献:

- 在 [GitHub](https://github.com/vesoft-inc/nebula-docs-cn/issues) 提交 issue。
- Fork 文档,在本地分支上更改或添加新内容,然后向主分支提交 PR。
- 在 GitHub 提交 [issue][_issues]。
- [Fork](https://github.com/vesoft-inc/nebula-docs-cn/fork) 文档,在本地分支上更改或添加新内容,然后向主分支提交 PR。


[_issues]: https://github.com/vesoft-inc/nebula-docs-cn/issues
2 changes: 1 addition & 1 deletion docs-2.0/1.introduction/1.what-is-nebula-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Nebula Graph支持严格的角色访问控制和LDAP(Lightweight Directory Acc

### 生态多样化

Nebula Graph开放了越来越多的原生工具,例如[Nebula Graph Studio](https://github.com/vesoft-inc/nebula-studio)、[Nebula Console](https://github.com/vesoft-inc/nebula-console)、[Nebula Exchange](https://github.com/vesoft-inc/nebula-spark-utils/tree/v2.0.0/nebula-exchange)等,更多工具可以查看 [生态工具概览](../20.appendix/6.eco-tool-version.md)。
Nebula Graph开放了越来越多的原生工具,例如[Nebula Graph Studio](https://github.com/vesoft-inc/nebula-studio)、[Nebula Console](https://github.com/vesoft-inc/nebula-console)、[Nebula Exchange](https://github.com/vesoft-inc/nebula-exchange)等,更多工具可以查看 [生态工具概览](../20.appendix/6.eco-tool-version.md)。

此外,Nebula Graph还具备与Spark、Flink、HBase等产品整合的能力,在这个充满挑战与机遇的时代,大大增强了自身的竞争力。

Expand Down
18 changes: 9 additions & 9 deletions docs-2.0/1.introduction/2.data-model.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# 数据模型

本文介绍Nebula Graph的数据模型。数据模型是一种组织数据并说明它们如何相互关联的模型(schema)
本文介绍Nebula Graph的数据模型。数据模型是一种组织数据并说明它们如何相互关联的模型schema

## 数据模型

Nebula Graph数据模型使用6种基本的数据模型:

- 图空间(Space)
- 图空间Space)

图空间用于隔离不同团队或者项目的数据。不同图空间的数据是相互隔离的,可以指定不同的存储副本数、权限、分片等。

- 点(Vertex)

点用来保存实体对象,特点如下:

- 点是用点标识符(`VID`)标识的。`VID`在同一图空间中唯一。VID 是一个 int64, 或者 fixed_string(N)。
- 点是用点标识符(`VID`)标识的。`VID`在同一图空间中唯一。VID 是一个 int64或者 fixed_string(N)。
- 点必须有至少一个Tag,也可以有多个Tag。但不能没有Tag。

- 边(Edge)
Expand All @@ -25,7 +25,7 @@ Nebula Graph数据模型使用6种基本的数据模型:
- 边是有方向的,不存在无向边。
- 四元组 `<起点VID、Edge type、边排序值(Rank)、终点VID>` 用于唯一标识一条边。边没有EID。
- 一条边有且仅有一个Edge type。
- 一条边有且仅有一个rank。其为int64, 默认为0。
- 一条边有且仅有一个rank。其为int64默认为0。

- 标签(Tag)

Expand All @@ -51,17 +51,17 @@ Nebula Graph使用有向属性图模型,指点和边构成的图,这些边

| 类型 | 名称 | 属性名(数据类型) | 说明 |
| :--- | :--- | :---| :--- |
|Tag| **player** | name string <br>age (int) | 表示球员。 |
|Tag| **team** | name string | 表示球队。 |
|Edge type| **serve** | start_year int <br> end_year int | 表示球员的行为。<br>该行为将球员和球队联系起来,方向是从球员到球队。 |
|Edge type| **follow** | degreeint | 表示球员的行为。<br>该行为将两个球员联系起来,方向是从一个球员到另一个球员。 |
|Tag| **player** | name (string) <br>age(int) | 表示球员。 |
|Tag| **team** | name (string) | 表示球队。 |
|Edge type| **serve** | start_year (int) <br> end_year (int) | 表示球员的行为。<br>该行为将球员和球队联系起来,方向是从球员到球队。 |
|Edge type| **follow** | degree (int) | 表示球员的行为。<br>该行为将两个球员联系起来,方向是从一个球员到另一个球员。 |

!!! Note

Nebula Graph 中没有无向边,只支持有向边。

!!! compatibility

由于 Nebula Graph {{ nebula.release }} 的数据模型中,允许存在"悬挂边",因此在增删时,用户需自行保证“一条边所对应的起点和终点”的存在性。详见[INSERT VERTEX](../3.ngql-guide/12.vertex-statements/1.insert-vertex.md), [DELETE VERTEX](../3.ngql-guide/12.vertex-statements/4.delete-vertex.md), [INSERT EDGE](../3.ngql-guide/13.edge-statements/1.insert-edge.md), [DELETE EDGE](../3.ngql-guide/13.edge-statements/4.delete-edge.md)。
由于 Nebula Graph {{ nebula.release }} 的数据模型中,允许存在"悬挂边",因此在增删时,用户需自行保证“一条边所对应的起点和终点”的存在性。详见[INSERT VERTEX](../3.ngql-guide/12.vertex-statements/1.insert-vertex.md)[DELETE VERTEX](../3.ngql-guide/12.vertex-statements/4.delete-vertex.md)[INSERT EDGE](../3.ngql-guide/13.edge-statements/1.insert-edge.md)[DELETE EDGE](../3.ngql-guide/13.edge-statements/4.delete-edge.md)。

不支持 openCypher 中的 MERGE 语句。
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Graph 服务主要负责处理查询请求,包括解析查询语句、校验

Parser 模块收到请求后,通过 Flex(词法分析工具)和 Bison(语法分析工具)生成的词法语法解析器,将语句转换为抽象语法树(AST),在语法解析阶段会拦截不符合语法规则的语句。

例如`GO FROM "Tim" OVER like WHERE like.likeness > 8.0 YIELD like._dst`语句转换的 AST 如下。
例如`GO FROM "Tim" OVER like WHERE properties(edge).likeness > 8.0 YIELD dst(edge)`语句转换的 AST 如下。

![AST](https://docs-cdn.nebula-graph.com.cn/docs-2.0/1.introduction/2.nebula-graph-architecture/parser-ast-tree.png)

Expand All @@ -38,7 +38,7 @@ Validator 模块对生成的 AST 进行语义校验,主要包括:

校验引用的变量是否存在或者引用的属性是否属于变量。

例如语句`$var = GO FROM "Tim" OVER like YIELD like._dst AS ID; GO FROM $var.ID OVER serve YIELD serve._dst`,Validator 模块首先会检查变量 `var` 是否定义,其次再检查属性 `ID` 是否属于变量 `var`。
例如语句`$var = GO FROM "Tim" OVER like YIELD dst(edge) AS ID; GO FROM $var.ID OVER serve YIELD dst(edge)`,Validator 模块首先会检查变量 `var` 是否定义,其次再检查属性 `ID` 是否属于变量 `var`。

- 校验类型推断

Expand All @@ -50,13 +50,13 @@ Validator 模块对生成的 AST 进行语义校验,主要包括:

查询语句中包含 `*` 时,校验子句时需要将 `*` 涉及的Schema都进行校验。

例如语句`GO FROM "Tim" OVER * YIELD like._dst, like.likeness, serve._dst`,校验`OVER`子句时需要校验所有的 Edge type,如果 Edge type 包含 `like`和`serve`,该语句会展开为`GO FROM "Tim" OVER like,serve YIELD like._dst, like.likeness, serve._dst`。
例如语句`GO FROM "Tim" OVER * YIELD dst(edge), properties(edge).likeness, dst(edge)`,校验`OVER`子句时需要校验所有的 Edge type,如果 Edge type 包含 `like`和`serve`,该语句会展开为`GO FROM "Tim" OVER like,serve YIELD dst(edge), properties(edge).likeness, dst(edge)`。

- 校验输入输出

校验管道符(|)前后的一致性。

例如语句`GO FROM "Tim" OVER like YIELD like._dst AS ID | GO FROM $-.ID OVER serve YIELD serve._dst`,Validator 模块会校验 `$-.ID` 在管道符左侧是否已经定义。
例如语句`GO FROM "Tim" OVER like YIELD dst(edge) AS ID | GO FROM $-.ID OVER serve YIELD dst(edge)`,Validator 模块会校验 `$-.ID` 在管道符左侧是否已经定义。

校验完成后,Validator 模块还会生成一个默认可执行,但是未进行优化的执行计划,存储在目录 `src/planner` 内。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ EdgeA_Out和EdgeA_In以方向相反的两条边的形式存在于存储层,二

如EdgeA_Out和EdgeA_In一样,Nebula Graph冗余了存储每条边的信息,导致存储边所需的实际空间翻倍。因为边对应的Key占用的硬盘空间较小,但Value占用的空间与属性值的长度和数量成正比,所以,当边的属性值较大或数量较多时候,硬盘空间占用量会比较大。

如果对边进行操作,为了保证两个键值对的最终一致性,可以开启[TOSS功能](../../5.configurations-and-logs/1.configurations/3.graph-config.md),开启后,会先在正向边所在的分片进行操作,然后在反向边所在分片进行操作,最后返回结果。

### 分片算法

分片策略采用**静态 Hash**的方式,即对点VID进行取模操作,同一个点的所有Tag、出边和入边信息都会存储到同一个分片,这种方式极大地提升了查询效率。
Expand Down
6 changes: 3 additions & 3 deletions docs-2.0/1.introduction/3.vid.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

- 可以使用`LOOKUP`或者`MATCH`语句,来通过属性索引查找对应的VID;

- 性能上,直接通过VID找到点的语句性能最高,例如`DELETE xxx WHERE id(xxx) == "player100"`, 或者`GO FROM "player100"`等语句。通过属性先查找VID,再进行图操作的性能会变差,例如`LOOKUP | GO FROM $-.ids`等语句,相比前者多了一次内存或硬盘的随机读(`LOOKUP`)以及一次序列化(`|`)。
- 性能上,直接通过VID找到点的语句性能最高,例如`DELETE xxx WHERE id(xxx) == "player100"`或者`GO FROM "player100"`等语句。通过属性先查找VID,再进行图操作的性能会变差,例如`LOOKUP | GO FROM $-.ids`等语句,相比前者多了一次内存或硬盘的随机读(`LOOKUP`)以及一次序列化(`|`)。

## VID生成建议

Expand All @@ -50,13 +50,13 @@ VID的数据类型必须在[创建图空间](../3.ngql-guide/9.space-statements/

## "查询起始点"(`start vid`)与全局扫描

绝大多数情况下,Nebula Graph 的查询语句(`MATCH`, `GO`, `LOOKUP`)的执行计划,必须要通过一定方式找到查询起始点的 VID (`start vid`)
绝大多数情况下,Nebula Graph 的查询语句`MATCH``GO``LOOKUP`的执行计划,必须要通过一定方式找到查询起始点的 VID`start vid`

定位 `start vid` 只有两种方式:

1. 例如 `GO FROM "player100" OVER` 是在语句中显式的指明 `start vid` 是 "player100";

2. 例如, `LOOKUP ON player WHERE player.name == "Tony Parker"` 或者 `MATCH (v:player {name:"Tony Parker"}) `,是通过属性 `player.name` 的索引来定位到 `start vid`;
2. 例如 `LOOKUP ON player WHERE player.name == "Tony Parker"` 或者 `MATCH (v:player {name:"Tony Parker"}) `,是通过属性 `player.name` 的索引来定位到 `start vid`;


!!! caution 不能在没有 `start vid` 情况下进行全局扫描;
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/14.client/4.nebula-java-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ try {
ResultSet resp = session.execute(insertEdges);

// query
String query = "GO FROM \"Bob\" OVER like " + "YIELD $$.person.name, $$.person.age, like.likeness";
String query = "GO FROM \"Bob\" OVER like " + "YIELD properties($$).name, properties($$).age, properties(edge).likeness";
ResultSet resp = session.execute(query);
printResult(resp);
}finally {
Expand Down
Loading