From 78c9ae178939bb95ed33e2e04da8a6b1eb0b7b80 Mon Sep 17 00:00:00 2001 From: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com> Date: Mon, 1 Nov 2021 15:52:09 +0800 Subject: [PATCH 1/2] verify nGQL --- .../12.vertex-statements/1.insert-vertex.md | 2 +- .../12.vertex-statements/3.upsert-vertex.md | 9 +++- .../2.1.show-create-index.md | 13 +++--- .../16.subgraph-and-path/2.find-path.md | 2 +- .../4.job-statements.md | 41 ++++++++---------- .../8.clauses-and-options/group-by.md | 21 +++------ .../8.clauses-and-options/limit.md | 6 +-- .../8.clauses-and-options/order-by.md | 32 ++++++-------- .../8.clauses-and-options/return.md | 18 ++++---- .../8.clauses-and-options/where.md | 4 +- .../8.clauses-and-options/with.md | 43 +++++++------------ 11 files changed, 84 insertions(+), 107 deletions(-) diff --git a/docs-2.0/3.ngql-guide/12.vertex-statements/1.insert-vertex.md b/docs-2.0/3.ngql-guide/12.vertex-statements/1.insert-vertex.md index 014733db4c8..951a8084c1b 100644 --- a/docs-2.0/3.ngql-guide/12.vertex-statements/1.insert-vertex.md +++ b/docs-2.0/3.ngql-guide/12.vertex-statements/1.insert-vertex.md @@ -92,7 +92,7 @@ nebula> INSERT VERTEX t5(p1, p2, p3) VALUES "001":("Abe", 2, 3); # In the following example, the insertion fails because the value of p1 cannot be NULL. nebula> INSERT VERTEX t5(p1, p2, p3) VALUES "002":(NULL, 4, 5); -[ERROR (-8)]: Storage Error: The not null field cannot be null. +[ERROR (-1005)]: Storage Error: The not null field cannot be null. # In the following example, the value of p3 is the default NULL. nebula> INSERT VERTEX t5(p1, p2) VALUES "003":("cd", 5); diff --git a/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md b/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md index 22968dc55e8..d0fbc0faf08 100644 --- a/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md +++ b/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md @@ -57,6 +57,10 @@ Here are some examples: ```ngql // This query checks if the following three vertices exist. The result "Empty set" indicates that the vertices do not exist. nebula> FETCH PROP ON * "player666", "player667", "player668"; ++-----------+ +| vertices_ | ++-----------+ ++-----------+ Empty set nebula> UPSERT VERTEX ON player "player666" \ @@ -69,7 +73,10 @@ nebula> UPSERT VERTEX ON player "player666" \ | __NULL__ | 30 | +----------+----------+ -nebula> UPSERT VERTEX ON player "player666" SET age = 31 WHEN name == "Joe" YIELD name AS Name, age AS Age; +nebula> UPSERT VERTEX ON player "player666" \ + SET age = 31 \ + WHEN name == "Joe" \ + YIELD name AS Name, age AS Age; +----------+-----+ | Name | Age | +----------+-----+ diff --git a/docs-2.0/3.ngql-guide/14.native-index-statements/2.1.show-create-index.md b/docs-2.0/3.ngql-guide/14.native-index-statements/2.1.show-create-index.md index 2dec87fc676..dd30ae03308 100644 --- a/docs-2.0/3.ngql-guide/14.native-index-statements/2.1.show-create-index.md +++ b/docs-2.0/3.ngql-guide/14.native-index-statements/2.1.show-create-index.md @@ -14,18 +14,19 @@ You can run `SHOW TAG INDEXES` to list all tag indexes, and then use `SHOW CREAT ```ngql nebula> SHOW TAG INDEXES; -+------------------+--------------+-----------------+ -| "player_index_0" | "player" | ["name"] | -+------------------+--------------+-----------------+ -| "player_index_1" | "player" | ["name", "age"] | -+------------------+--------------+-----------------+ ++------------------+----------+----------+ +| Index Name | By Tag | Columns | ++------------------+----------+----------+ +| "player_index_0" | "player" | [] | +| "player_index_1" | "player" | ["name"] | ++------------------+----------+----------+ nebula> SHOW CREATE TAG INDEX player_index_1; +------------------+--------------------------------------------------+ | Tag Index Name | Create Tag Index | +------------------+--------------------------------------------------+ | "player_index_1" | "CREATE TAG INDEX `player_index_1` ON `player` ( | -| | `name(20)` | +| | `name`(20) | | | )" | +------------------+--------------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md index f1379a09f44..61b4a8b73eb 100644 --- a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md +++ b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md @@ -78,8 +78,8 @@ nebula> FIND ALL PATH FROM "player100" TO "team204" OVER * WHERE follow.degree i | <("player100")-[:follow@0 {}]->("player125")-[:serve@0 {}]->("team204")> | +------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player101")-[:serve@0 {}]->("team204")> | +|... | +------------------------------------------------------------------------------+ -... ``` ```ngql diff --git a/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md b/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md index a3e0426b09d..eaed26ba790 100644 --- a/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md +++ b/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md @@ -53,7 +53,7 @@ nebula> SUBMIT JOB STATS; +------------+ | New Job Id | +------------+ -| 97 | +| 34 | +------------+ ``` @@ -66,18 +66,13 @@ The Meta Service parses a `SUBMIT JOB` request into multiple tasks and assigns t ### Example ```ngql -nebula> SHOW JOB 96; -+----------------+---------------+------------+-------------------------+-------------------------+ -| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | -+----------------+---------------+------------+-------------------------+-------------------------+ -| 96 | "FLUSH" | "FINISHED" | 2020-11-28T14:14:29.000 | 2020-11-28T14:14:29.000 | -+----------------+---------------+------------+-------------------------+-------------------------+ -| 0 | "storaged2" | "FINISHED" | 2020-11-28T14:14:29.000 | 2020-11-28T14:14:29.000 | -+----------------+---------------+-------------------------+------------+-------------------------+ -| 1 | "storaged0" | "FINISHED" | 2020-11-28T14:14:29.000 | 2020-11-28T14:14:29.000 | -+----------------+---------------+------------+-------------------------+-------------------------+ -| 2 | "storaged1" | "FINISHED" | 2020-11-28T14:14:29.000 | 2020-11-28T14:14:29.000 | -+----------------+---------------+------------+-------------------------+-------------------------+ +nebula> SHOW JOB 34; ++----------------+-----------------+------------+----------------------------+----------------------------+ +| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | ++----------------+-----------------+------------+----------------------------+----------------------------+ +| 34 | "STATS" | "FINISHED" | 2021-11-01T03:32:27.000000 | 2021-11-01T03:32:27.000000 | +| 0 | "192.168.8.111" | "FINISHED" | 2021-11-01T03:32:27.000000 | 2021-11-01T03:32:41.000000 | ++----------------+-----------------+------------+----------------------------+----------------------------+ ``` The descriptions are as follows. @@ -123,17 +118,15 @@ The default job expiration interval is one week. You can change it by modifying ```ngql nebula> SHOW JOBS; -+--------+----------------------+------------+-------------------------+-------------------------+ -| Job Id | Command | Status | Start Time | Stop Time | -+--------+----------------------+------------+-------------------------+-------------------------+ -| 97 | "STATS" | "FINISHED" | 2020-11-28T14:48:52.000 | 2020-11-28T14:48:52.000 | -+--------+----------------------+------------+-------------------------+-------------------------+ -| 96 | "FLUSH" | "FINISHED" | 2020-11-28T14:14:29.000 | 2020-11-28T14:14:29.000 | -+--------+----------------------+------------+-------------------------+-------------------------+ -| 95 | "STATS" | "FINISHED" | 2020-11-28T13:02:11.000 | 2020-11-28T13:02:11.000 | -+--------+----------------------+------------+-------------------------+-------------------------+ -| 86 | "REBUILD_EDGE_INDEX" | "FINISHED" | 2020-11-26T13:38:24.000 | 2020-11-26T13:38:24.000 | -+--------+----------------------+------------+-------------------------+-------------------------+ ++--------+---------------------+------------+----------------------------+----------------------------+ +| Job Id | Command | Status | Start Time | Stop Time | ++--------+---------------------+------------+----------------------------+----------------------------+ +| 34 | "STATS" | "FINISHED" | 2021-11-01T03:32:27.000000 | 2021-11-01T03:32:27.000000 | +| 33 | "FLUSH" | "FINISHED" | 2021-11-01T03:32:15.000000 | 2021-11-01T03:32:15.000000 | +| 32 | "COMPACT" | "FINISHED" | 2021-11-01T03:32:06.000000 | 2021-11-01T03:32:06.000000 | +| 31 | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-10-29T05:39:16.000000 | 2021-10-29T05:39:17.000000 | +| 10 | "COMPACT" | "FINISHED" | 2021-10-26T02:27:05.000000 | 2021-10-26T02:27:05.000000 | ++--------+---------------------+------------+----------------------------+----------------------------+ ``` ## STOP JOB diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md index 4461785baa3..72ba5bb8e50 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md @@ -50,25 +50,16 @@ nebula> GO FROM "player100" OVER follow BIDIRECT \ +---------------------+------------+ | Player | Name_Count | +---------------------+------------+ +| "Shaquille O'Neal" | 1 | | "Tiago Splitter" | 1 | -+---------------------+------------+ -| "Aron Baynes" | 1 | -+---------------------+------------+ -| "Boris Diaw" | 1 | -+---------------------+------------+ | "Manu Ginobili" | 2 | -+---------------------+------------+ -| "Dejounte Murray" | 1 | -+---------------------+------------+ -| "Danny Green" | 1 | -+---------------------+------------+ -| "Tony Parker" | 2 | -+---------------------+------------+ -| "Shaquille O'Neal" | 1 | -+---------------------+------------+ +| "Boris Diaw" | 1 | | "LaMarcus Aldridge" | 1 | -+---------------------+------------+ +| "Tony Parker" | 2 | | "Marco Belinelli" | 1 | +| "Dejounte Murray" | 1 | +| "Danny Green" | 1 | +| "Aron Baynes" | 1 | +---------------------+------------+ ``` diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md index cb6c6e7a9dd..01b19f40ba7 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md @@ -47,9 +47,9 @@ nebula> LOOKUP ON player |\ # The following example returns the 3 rows of data starting from the second row of the sorted output. nebula> GO FROM "player100" OVER follow REVERSELY \ - YIELD properties($$).name AS Friend, properties($$).age AS Age \| - ORDER BY $-.Age, $-.Friend \| - LIMIT 1, 3; + YIELD properties($$).name AS Friend, properties($$).age AS Age \ + | ORDER BY $-.Age, $-.Friend \ + | LIMIT 1, 3; +-------------------+-----+ | Friend | Age | +-------------------+-----+ diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md index b3802c973a8..249371ef7ab 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md @@ -104,26 +104,22 @@ nGQL lists NULL values at the end of the output for ascending sorting, and at th nebula> MATCH (v:player{name:"Tim Duncan"}) --> (v2) \ RETURN v2.name AS Name, v2.age AS Age \ ORDER BY Age; -+-----------------+----------+ -| Name | Age | -+-----------------+----------+ -| "Tony Parker" | 36 | -+-----------------+----------+ -| "Manu Ginobili" | 41 | -+-----------------+----------+ -| "Spurs" | __NULL__ | -+-----------------+----------+ ++-----------------+--------------+ +| Name | Age | ++-----------------+--------------+ +| "Tony Parker" | 36 | +| "Manu Ginobili" | 41 | +| "Spurs" | UNKNOWN_PROP | ++-----------------+--------------+ nebula> MATCH (v:player{name:"Tim Duncan"}) --> (v2) \ RETURN v2.name AS Name, v2.age AS Age \ ORDER BY Age DESC; -+-----------------+----------+ -| Name | Age | -+-----------------+----------+ -| "Spurs" | __NULL__ | -+-----------------+----------+ -| "Manu Ginobili" | 41 | -+-----------------+----------+ -| "Tony Parker" | 36 | -+-----------------+----------+ ++-----------------+--------------+ +| Name | Age | ++-----------------+--------------+ +| "Spurs" | UNKNOWN_PROP | +| "Manu Ginobili" | 41 | +| "Tony Parker" | 36 | ++-----------------+--------------+ ``` diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md index a00ed6aa4a5..2775dcd8ddd 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md @@ -169,15 +169,13 @@ If a property matched does not exist, `NULL` is returned. ```ngql nebula> MATCH (v:player{name:"Tim Duncan"})-[e]->(v2) \ RETURN v2.name, type(e), v2.age; -+-----------------+----------+----------+ -| v2.name | type(e) | v2.age | -+-----------------+----------+----------+ -| "Tony Parker" | "follow" | 36 | -+-----------------+----------+----------+ -| "Manu Ginobili" | "follow" | 41 | -+-----------------+----------+----------+ -| "Spurs" | "serve" | __NULL__ | -+-----------------+----------+----------+ ++-----------------+----------+--------------+ +| v2.name | type(e) | v2.age | ++-----------------+----------+--------------+ +| "Tony Parker" | "follow" | 36 | +| "Manu Ginobili" | "follow" | 41 | +| "Spurs" | "serve" | UNKNOWN_PROP | ++-----------------+----------+--------------+ ``` ## Return expression results @@ -211,7 +209,7 @@ nebula> RETURN 3 > 1; | true | +-------+ -RETURN 1+1, rand32(1, 5); +nebula> RETURN 1+1, rand32(1, 5); +-------+-------------+ | (1+1) | rand32(1,5) | +-------+-------------+ diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md index 0dcb4dcc9cc..2c4b0c06ed2 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md @@ -339,7 +339,9 @@ nebula> MATCH (v:player) \ | "Joel Embiid" | 25 | +-------------------------+-------+ -nebula> LOOKUP ON player WHERE player.age IN [25,28] YIELD properties(vertex).name, properties(vertex).age; +nebula> LOOKUP ON player \ + WHERE player.age IN [25,28] \ + YIELD properties(vertex).name, properties(vertex).age; +-------------+-------------------------+------------------------+ | VertexID | properties(VERTEX).name | properties(VERTEX).age | +-------------+-------------------------+------------------------+ diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md index 05c0a2ab6bd..ea6810fb316 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md @@ -28,33 +28,22 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})--() \ WITH nodes(p) AS n \ UNWIND n AS n1 \ RETURN DISTINCT n1; -+----------------------------------------------------------------------+ -| n1 | -+----------------------------------------------------------------------+ -| ("player100" :star{} :person{} :player{age: 42, name: "Tim Duncan"}) | -+----------------------------------------------------------------------+ -| ("player101" :player{age: 36, name: "Tony Parker"}) | -+----------------------------------------------------------------------+ -| ("team204" :team{name: "Spurs"}) | -+----------------------------------------------------------------------+ -| ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | -+----------------------------------------------------------------------+ -| ("player125" :player{age: 41, name: "Manu Ginobili"}) | -+----------------------------------------------------------------------+ -| ("player104" :player{age: 32, name: "Marco Belinelli"}) | -+----------------------------------------------------------------------+ -| ("player144" :player{age: 47, name: "Shaquile O'Neal"}) | -+----------------------------------------------------------------------+ -| ("player105" :player{age: 31, name: "Danny Green"}) | -+----------------------------------------------------------------------+ -| ("player113" :player{age: 29, name: "Dejounte Murray"}) | -+----------------------------------------------------------------------+ -| ("player107" :player{age: 32, name: "Aron Baynes"}) | -+----------------------------------------------------------------------+ -| ("player109" :player{age: 34, name: "Tiago Splitter"}) | -+----------------------------------------------------------------------+ -| ("player108" :player{age: 36, name: "Boris Diaw"}) | -+----------------------------------------------------------------------+ ++-----------------------------------------------------------+ +| n1 | ++-----------------------------------------------------------+ +| ("player100" :player{age: 42, name: "Tim Duncan"}) | +| ("player101" :player{age: 36, name: "Tony Parker"}) | +| ("team204" :team{name: "Spurs"}) | +| ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | +| ("player125" :player{age: 41, name: "Manu Ginobili"}) | +| ("player104" :player{age: 32, name: "Marco Belinelli"}) | +| ("player144" :player{age: 47, name: "Shaquille O'Neal"}) | +| ("player105" :player{age: 31, name: "Danny Green"}) | +| ("player113" :player{age: 29, name: "Dejounte Murray"}) | +| ("player107" :player{age: 32, name: "Aron Baynes"}) | +| ("player109" :player{age: 34, name: "Tiago Splitter"}) | +| ("player108" :player{age: 36, name: "Boris Diaw"}) | ++-----------------------------------------------------------+ ``` ### Example 2 From 5456a4cea108040f0e62fa233624570bd0798c7e Mon Sep 17 00:00:00 2001 From: Yee <2520865+yixinglu@users.noreply.github.com> Date: Wed, 27 Oct 2021 11:27:59 +0800 Subject: [PATCH 2/2] merge new console table format --- docs-2.0/2.quick-start/4.nebula-graph-crud.md | 51 +++++------- docs-2.0/20.appendix/0.FAQ.md | 14 ++-- .../10.tag-statements/4.show-tags.md | 1 - .../10.tag-statements/5.describe-tag.md | 1 - .../11.edge-type-statements/4.show-edges.md | 1 - .../12.vertex-statements/3.upsert-vertex.md | 26 +++--- .../13.edge-statements/2.update-edge.md | 18 ++--- .../13.edge-statements/3.upsert-edge.md | 28 +++---- .../2.show-native-indexes.md | 4 - .../3.describe-native-index.md | 1 - .../4.rebuild-native-index.md | 7 +- .../5.show-native-index-status.md | 1 - .../1.search-with-text-based-index.md | 8 +- .../16.subgraph-and-path/1.get-subgraph.md | 4 - .../16.subgraph-and-path/2.find-path.md | 6 -- .../4.job-statements.md | 30 +++---- .../3.ngql-guide/3.data-types/10.geography.md | 10 +-- docs-2.0/3.ngql-guide/3.data-types/5.null.md | 24 +++--- docs-2.0/3.ngql-guide/3.data-types/6.list.md | 8 +- .../3.data-types/9.type-conversion.md | 18 ++--- .../1.composite-queries.md | 2 - .../2.user-defined-variables.md | 2 - .../3.property-reference.md | 43 +++++----- .../3.ngql-guide/5.operators/1.comparison.md | 44 +++++----- .../5.operators/5.property-reference.md | 13 ++- docs-2.0/3.ngql-guide/5.operators/6.set.md | 19 ++--- docs-2.0/3.ngql-guide/5.operators/7.string.md | 14 ++-- docs-2.0/3.ngql-guide/5.operators/8.list.md | 11 ++- .../6.functions-and-expressions/1.math.md | 1 - .../6.functions-and-expressions/10.collect.md | 9 +-- .../6.functions-and-expressions/11.reduce.md | 21 ++--- .../6.functions-and-expressions/13.concat.md | 2 - .../6.functions-and-expressions/14.geo.md | 30 +++---- .../3.date-and-time.md | 14 ++-- .../6.functions-and-expressions/4.schema.md | 20 +++-- .../5.case-expressions.md | 26 +++--- .../6.functions-and-expressions/6.list.md | 30 +++---- .../6.functions-and-expressions/7.count.md | 13 --- .../8.predicate.md | 20 ++--- .../7.general-query-statements/2.match.md | 81 ++----------------- .../7.general-query-statements/3.go.md | 18 ----- .../7.general-query-statements/4.fetch.md | 44 ++++------ .../7.general-query-statements/5.lookup.md | 17 +--- .../6.show/1.show-charset.md | 12 +-- .../6.show/11.show-snapshots.md | 3 +- .../6.show/12.show-spaces.md | 3 +- .../6.show/14.show-stats.md | 8 -- .../6.show/15.show-tags-edges.md | 3 - .../6.show/16.show-users.md | 3 +- .../6.show/17.show-sessions.md | 28 +++---- .../6.show/18.show-queries.md | 23 +++--- .../6.show/19.show-meta-leader.md | 8 +- .../6.show/6.show-hosts.md | 8 -- .../6.show/7.show-index-status.md | 1 - .../6.show/8.show-indexes.md | 3 - .../6.show/9.show-parts.md | 21 ++--- .../7.general-query-statements/7.unwind.md | 12 ++- .../8.clauses-and-options/group-by.md | 4 - .../8.clauses-and-options/limit.md | 26 ++---- .../8.clauses-and-options/order-by.md | 11 --- .../8.clauses-and-options/return.md | 26 ------ .../8.clauses-and-options/where.md | 41 ---------- .../8.clauses-and-options/with.md | 4 - .../8.clauses-and-options/yield.md | 24 +++--- .../9.space-statements/1.create-space.md | 26 +++--- .../9.space-statements/3.show-spaces.md | 1 - ...deploy-nebula-graph-with-docker-compose.md | 3 - .../deploy-nebula-graph-cluster.md | 49 +++++------ .../6.deploy-text-based-index/2.deploy-es.md | 2 - .../3.deploy-listener.md | 32 ++++---- .../1.authentication/2.management-user.md | 2 - .../2.backup-restore/4.br-restore-data.md | 22 ++--- docs-2.0/7.data-security/3.manage-snapshot.md | 11 ++- docs-2.0/8.service-tuning/compaction.md | 4 - .../improve-query-by-tag-index.md | 10 +-- docs-2.0/8.service-tuning/load-balance.md | 19 ----- .../use-exchange/ex-ug-import-from-hive.md | 20 ++--- .../reuse/source_connect-to-nebula-graph.md | 9 +-- 78 files changed, 411 insertions(+), 826 deletions(-) diff --git a/docs-2.0/2.quick-start/4.nebula-graph-crud.md b/docs-2.0/2.quick-start/4.nebula-graph-crud.md index 25d292904d5..361da9dcd92 100644 --- a/docs-2.0/2.quick-start/4.nebula-graph-crud.md +++ b/docs-2.0/2.quick-start/4.nebula-graph-crud.md @@ -12,12 +12,12 @@ A Nebula Graph instance consists of one or more graph spaces. Graph spaces are p To insert data into a graph space, define a schema for the graph database. Nebula Graph schema is based on the following components. -| Schema component | Description | -| ---------------- | --------------------------------------------------------------------------------------- | -| Vertex | Represents an entity in the real world. A vertex can have one or more tags. | +| Schema component | Description | +| ---------------- | --------------------------------------------------------------------------------------- | +| Vertex | Represents an entity in the real world. A vertex can have one or more tags. | | Tag | The type of the same group of vertices. It defines a set of properties that describes the types of vertices. | -| Edge | Represents a **directed** relationship between two vertices. | -| Edge type | The type of an edge. It defines a group of properties that describes the types of edges. | +| Edge | Represents a **directed** relationship between two vertices. | +| Edge type | The type of an edge. It defines a group of properties that describes the types of edges. | For more information, see [Data modeling](../1.introduction/2.data-model.md). @@ -37,11 +37,8 @@ nebula> SHOW HOSTS; | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+-----------+-----------+--------------+----------------------+------------------------+ | "storaged0" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+-------------+-----------+-----------+--------------+----------------------+------------------------+ | "storaged1" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+-------------+-----------+-----------+--------------+----------------------+------------------------+ | "storaged2" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+-------------+-----------+-----------+--------------+----------------------+------------------------+ | "Total" | __EMPTY__ | __EMPTY__ | 0 | __EMPTY__ | __EMPTY__ | +-------------+-----------+-----------+--------------+----------------------+------------------------+ Got 4 rows (time spent 1061/2251 us) @@ -81,7 +78,7 @@ To make sure the follow-up operations work as expected, take one of the followin ```ngql CREATE SPACE [IF NOT EXISTS] ( - [partition_num = ,] + [partition_num = ,] [replica_factor = ,] vid_type = {FIXED_STRING() | INT64} ) @@ -124,11 +121,8 @@ To make sure the follow-up operations work as expected, take one of the followin | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+-----------+-----------+--------------+----------------------------------+------------------------+ | "storaged0" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | - +-------------+-----------+-----------+--------------+----------------------------------+------------------------+ | "storaged1" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | - +-------------+-----------+-----------+--------------+----------------------------------+------------------------+ | "storaged2" | 9779 | "ONLINE" | 5 | "basketballplayer:5" | "basketballplayer:5" | - +-------------+-----------+-----------+--------------+----------------------------------+------------------------+ | "Total" | | | 15 | "basketballplayer:15" | "basketballplayer:15" | +-------------+-----------+-----------+--------------+----------------------------------+------------------------+ Got 4 rows (time spent 1633/2867 us) @@ -171,8 +165,8 @@ For more information on parameters, see [CREATE TAG](../3.ngql-guide/10.tag-stat Create tags `player` and `team`, edge types `follow` and `serve`. Descriptions are as follows. -| Component name | Type | Property | -| :--- | :--- | :--- | +| Component name | Type | Property | +| :--- | :--- | :--- | | player | Tag | name (string), age (int) | | team | Tag | name (string) | | follow | Edge type | degree (int) | @@ -283,9 +277,9 @@ Users can use the `INSERT` statement to insert vertices or edges based on existi * Fetch properties on tags: ```ngql - FETCH PROP ON {[, tag_name ...] | *} - [, vid ...] - [YIELD [AS ]]; + FETCH PROP ON {[, tag_name ...] | *} + [, vid ...] + [YIELD [AS ]]; ``` * Fetch properties on edges: @@ -298,8 +292,8 @@ Users can use the `INSERT` statement to insert vertices or edges based on existi * `LOOKUP` ```ngql - LOOKUP ON { | } - [WHERE [AND ...]] + LOOKUP ON { | } + [WHERE [AND ...]] [YIELD [AS ]]; ``` @@ -334,16 +328,15 @@ Users can use the `INSERT` statement to insert vertices or edges based on existi | Teammate | Age | +-----------------+-----+ | "Tony Parker" | 36 | - +-----------------+-----+ | "Manu Ginobili" | 41 | +-----------------+-----+ ``` - |Clause/Sign|Description| - |-|-| - |`YIELD`|Specifies what values or results you want to return from the query.| - |`$$`|Represents the target vertices.| - |`\`|A line-breaker.| + | Clause/Sign | Description | + |-------------+---------------------------------------------------------------------| + | `YIELD` | Specifies what values or results you want to return from the query. | + | `$$` | Represents the target vertices. | + | `\` | A line-breaker. | * Search for the players that the player with VID `player100` follows. Then Retrieve the teams of the players that the player with VID `player100` follows. To combine the two queries, use a pipe or a temporary variable. @@ -357,11 +350,9 @@ Users can use the `INSERT` statement to insert vertices or edges based on existi | Team | Player | +-----------+-----------------+ | "Spurs" | "Tony Parker" | - +-----------+-----------------+ | "Hornets" | "Tony Parker" | - +-----------+-----------------+ | "Spurs" | "Manu Ginobili" | - +-----------+-----------------+ + +-----------+-----------------+ ``` |Clause/Sign|Description| @@ -384,9 +375,7 @@ Users can use the `INSERT` statement to insert vertices or edges based on existi | Team | Player | +-----------+-----------------+ | "Spurs" | "Tony Parker" | - +-----------+-----------------+ | "Hornets" | "Tony Parker" | - +-----------+-----------------+ | "Spurs" | "Manu Ginobili" | +-----------+-----------------+ ``` @@ -540,7 +529,7 @@ Users can add indexes to tags and edge types with the [CREATE INDEX](../3.ngql-g * Create an index: ```ngql - CREATE {TAG | EDGE} INDEX [IF NOT EXISTS] + CREATE {TAG | EDGE} INDEX [IF NOT EXISTS] ON { | } ([]) [COMMENT = '']; ``` diff --git a/docs-2.0/20.appendix/0.FAQ.md b/docs-2.0/20.appendix/0.FAQ.md index d01e3d000d6..50ac9a3cf39 100644 --- a/docs-2.0/20.appendix/0.FAQ.md +++ b/docs-2.0/20.appendix/0.FAQ.md @@ -22,7 +22,7 @@ Nebula Graph is still under development. Its behavior changes from time to time. !!! compatibility "`X` version compatibility" - Neubla Graph {{ nebula.release }} is **not compatible** with Nebula Graph 1.x nor 2.0-RC in both data formats and RPC-protocols, and **vice versa**. + Neubla Graph {{ nebula.release }} is **not compatible** with Nebula Graph 1.x nor 2.0-RC in both data formats and RPC-protocols, and **vice versa**. To upgrade data formats, see [Upgrade Nebula Graph to v2.0.0](../4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-260.md). Users must upgrade [all clients](../20.appendix/6.eco-tool-version.md). @@ -146,7 +146,7 @@ See [show-stats](../3.ngql-guide/7.general-query-statements/6.show/14.show-stats > CREATE TAG INDEX i_player ON player(); > REBUILD TAG INDEX i_player; ``` - + 2. Use `LOOKUP` or `MATCH`. For example: ```ngql @@ -325,11 +325,11 @@ Hosts with the status of `OFFLINE` will be automatically deleted after one day. If you have not modified the predefined ports in the [Configurations](../5.configurations-and-logs/1.configurations/1.configurations.md), open the following ports for the Nebula Graph services: -|Service|Port| -|-|-| -|Meta|9559, 9560, 19559, 19560| -|Graph|9669, 19669, 19670| -|Storage|9777 ~ 9780, 19779, 19780| +| Service | Port | +|---------+---------------------------| +| Meta | 9559, 9560, 19559, 19560 | +| Graph | 9669, 19669, 19670 | +| Storage | 9777 ~ 9780, 19779, 19780 | If you have customized the configuration files and changed the predefined ports, find the port numbers in your configuration files and open them on the firewalls. diff --git a/docs-2.0/3.ngql-guide/10.tag-statements/4.show-tags.md b/docs-2.0/3.ngql-guide/10.tag-statements/4.show-tags.md index 821224e8a55..4c9a622453b 100644 --- a/docs-2.0/3.ngql-guide/10.tag-statements/4.show-tags.md +++ b/docs-2.0/3.ngql-guide/10.tag-statements/4.show-tags.md @@ -18,7 +18,6 @@ nebula> SHOW TAGS; | Name | +----------+ | "player" | -+----------+ | "team" | +----------+ ``` diff --git a/docs-2.0/3.ngql-guide/10.tag-statements/5.describe-tag.md b/docs-2.0/3.ngql-guide/10.tag-statements/5.describe-tag.md index 7f94386b739..05a36bb5164 100644 --- a/docs-2.0/3.ngql-guide/10.tag-statements/5.describe-tag.md +++ b/docs-2.0/3.ngql-guide/10.tag-statements/5.describe-tag.md @@ -22,7 +22,6 @@ nebula> DESCRIBE TAG player; | Field | Type | Null | Default | Comment | +--------+----------+-------+---------+---------+ | "name" | "string" | "YES" | | | -+--------+----------+-------+---------+---------+ | "age" | "int64" | "YES" | | | +--------+----------+-------+---------+---------+ ``` diff --git a/docs-2.0/3.ngql-guide/11.edge-type-statements/4.show-edges.md b/docs-2.0/3.ngql-guide/11.edge-type-statements/4.show-edges.md index e615d14627a..c5b7b8b6293 100644 --- a/docs-2.0/3.ngql-guide/11.edge-type-statements/4.show-edges.md +++ b/docs-2.0/3.ngql-guide/11.edge-type-statements/4.show-edges.md @@ -18,7 +18,6 @@ nebula> SHOW EDGES; | Name | +----------+ | "follow" | -+----------+ | "serve" | +----------+ ``` diff --git a/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md b/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md index d0fbc0faf08..05b6b872c25 100644 --- a/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md +++ b/docs-2.0/3.ngql-guide/12.vertex-statements/3.upsert-vertex.md @@ -21,13 +21,13 @@ SET [YIELD ] ``` -| Parameter | Required | Description | Example | -|-|-|-|-| -| `ON ` | Yes | Specifies the tag of the vertex. The properties to be updated must be on this tag. | `ON player` | -| `` | Yes | Specifies the ID of the vertex to be updated or inserted. | `"player100"` | -| `SET ` | Yes | Specifies the properties to be updated and how they will be updated. | `SET age = age +1` | -| `WHEN ` | No | Specifies the filter conditions. | `WHEN name == "Tim"` | -| `YIELD ` | No | Specifies the output format of the statement. | `YIELD name AS Name` | +| Parameter | Required | Description | Example | +|---------------------+----------+------------------------------------------------------------------------------------+----------------------| +| `ON ` | Yes | Specifies the tag of the vertex. The properties to be updated must be on this tag. | `ON player` | +| `` | Yes | Specifies the ID of the vertex to be updated or inserted. | `"player100"` | +| `SET ` | Yes | Specifies the properties to be updated and how they will be updated. | `SET age = age +1` | +| `WHEN ` | No | Specifies the filter conditions. | `WHEN name == "Tim"` | +| `YIELD ` | No | Specifies the output format of the statement. | `YIELD name AS Name` | ## Insert a vertex if it does not exist @@ -45,12 +45,12 @@ For example, if: Then the property values in different cases are listed as follows: -| Are `WHEN` conditions met | If properties have default values | Value of `name` | Value of `age` | -| - | - | - | - | -| Yes | Yes | The default value | `30` | -| Yes | No | `NULL` | `30` | -| No | Yes | The default value | `30` | -| No | No | `NULL` | `30` | +| Are `WHEN` conditions met | If properties have default values | Value of `name` | Value of `age` | +|---------------------------+-----------------------------------+-------------------+----------------| +| Yes | Yes | The default value | `30` | +| Yes | No | `NULL` | `30` | +| No | Yes | The default value | `30` | +| No | No | `NULL` | `30` | Here are some examples: diff --git a/docs-2.0/3.ngql-guide/13.edge-statements/2.update-edge.md b/docs-2.0/3.ngql-guide/13.edge-statements/2.update-edge.md index 6a681d62256..e0c2b05c368 100644 --- a/docs-2.0/3.ngql-guide/13.edge-statements/2.update-edge.md +++ b/docs-2.0/3.ngql-guide/13.edge-statements/2.update-edge.md @@ -14,15 +14,15 @@ SET [YIELD ] ``` -| Parameter | Required | Description | Example | -|-|-|-|-| -| `ON ` | Yes | Specifies the edge type. The properties to be updated must be on this edge type. | `ON serve` | -| `` | Yes | Specifies the source vertex ID of the edge. | `"player100"` | -| `` | Yes | Specifies the destination vertex ID of the edge. | `"team204"` | -| `` | No | Specifies the rank of the edge. | `10` | -| `SET ` | Yes | Specifies the properties to be updated and how they will be updated. | `SET start_year = start_year +1` | -| `WHEN ` | No | Specifies the filter conditions. If `` evaluates to `false`, the `SET` clause does not take effect. | `WHEN end_year < 2010` | -| `YIELD ` | No | Specifies the output format of the statement. | `YIELD start_year AS Start_Year` | +| Parameter | Required | Description | Example | +|---------------------+----------+----------------------------------------------------------------------------------------------------------------+----------------------------------| +| `ON ` | Yes | Specifies the edge type. The properties to be updated must be on this edge type. | `ON serve` | +| `` | Yes | Specifies the source vertex ID of the edge. | `"player100"` | +| `` | Yes | Specifies the destination vertex ID of the edge. | `"team204"` | +| `` | No | Specifies the rank of the edge. | `10` | +| `SET ` | Yes | Specifies the properties to be updated and how they will be updated. | `SET start_year = start_year +1` | +| `WHEN ` | No | Specifies the filter conditions. If `` evaluates to `false`, the `SET` clause does not take effect. | `WHEN end_year < 2010` | +| `YIELD ` | No | Specifies the output format of the statement. | `YIELD start_year AS Start_Year` | ## Example diff --git a/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md b/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md index 68da2b0577c..94ab75962f8 100644 --- a/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md +++ b/docs-2.0/3.ngql-guide/13.edge-statements/3.upsert-edge.md @@ -18,15 +18,15 @@ SET [YIELD ] ``` -| Parameter | Required | Description | Example | -|-|-|-|-| -| `ON ` | Yes | Specifies the edge type. The properties to be updated must be on this edge type. | `ON serve` | -| `` | Yes | Specifies the source vertex ID of the edge. | `"player100"` | -| `` | Yes | Specifies the destination vertex ID of the edge. | `"team204"` | -| `` | No | Specifies the rank of the edge. | `10` | -| `SET ` | Yes | Specifies the properties to be updated and how they will be updated. | `SET start_year = start_year +1` | -| `WHEN ` | No | Specifies the filter conditions. | `WHEN end_year < 2010` | -| `YIELD ` | No | Specifies the output format of the statement. | `YIELD start_year AS Start_Year` | +| Parameter | Required | Description | Example | +|---------------------+----------+----------------------------------------------------------------------------------+----------------------------------| +| `ON ` | Yes | Specifies the edge type. The properties to be updated must be on this edge type. | `ON serve` | +| `` | Yes | Specifies the source vertex ID of the edge. | `"player100"` | +| `` | Yes | Specifies the destination vertex ID of the edge. | `"team204"` | +| `` | No | Specifies the rank of the edge. | `10` | +| `SET ` | Yes | Specifies the properties to be updated and how they will be updated. | `SET start_year = start_year +1` | +| `WHEN ` | No | Specifies the filter conditions. | `WHEN end_year < 2010` | +| `YIELD ` | No | Specifies the output format of the statement. | `YIELD start_year AS Start_Year` | ## Insert an edge if it does not exist @@ -45,11 +45,11 @@ For example, if: Then the property values in different cases are listed as follows: | Are `WHEN` conditions met | If properties have default values | Value of `start_year` | Value of `end_year` | -| - | - | - | - | -| Yes | Yes | The default value | `2021` | -| Yes | No | `NULL` | `2021` | -| No | Yes | The default value | `2021` | -| No | No | `NULL` | `2021` | +| - | - | - | - | +| Yes | Yes | The default value | `2021` | +| Yes | No | `NULL` | `2021` | +| No | Yes | The default value | `2021` | +| No | No | `NULL` | `2021` | Here are some examples: diff --git a/docs-2.0/3.ngql-guide/14.native-index-statements/2.show-native-indexes.md b/docs-2.0/3.ngql-guide/14.native-index-statements/2.show-native-indexes.md index 1d436616891..c870a1ccfe5 100644 --- a/docs-2.0/3.ngql-guide/14.native-index-statements/2.show-native-indexes.md +++ b/docs-2.0/3.ngql-guide/14.native-index-statements/2.show-native-indexes.md @@ -16,18 +16,14 @@ nebula> SHOW TAG INDEXES; | Index Name | By Tag | Columns | +------------------+--------------+-----------------+ | "fix" | "fix_string" | ["p1"] | -+------------------+--------------+-----------------+ | "player_index_0" | "player" | ["name"] | -+------------------+--------------+-----------------+ | "player_index_1" | "player" | ["name", "age"] | -+------------------+--------------+-----------------+ | "var" | "var_string" | ["p1"] | +------------------+--------------+-----------------+ nebula> SHOW EDGE INDEXES; +----------------+----------+---------+ | Index Name | By Edge | Columns | -+----------------+----------+---------+ | "follow_index" | "follow" | [] | +----------------+----------+---------+ ``` diff --git a/docs-2.0/3.ngql-guide/14.native-index-statements/3.describe-native-index.md b/docs-2.0/3.ngql-guide/14.native-index-statements/3.describe-native-index.md index f7b057c1335..b4558b8127a 100644 --- a/docs-2.0/3.ngql-guide/14.native-index-statements/3.describe-native-index.md +++ b/docs-2.0/3.ngql-guide/14.native-index-statements/3.describe-native-index.md @@ -23,7 +23,6 @@ nebula> DESCRIBE TAG INDEX player_index_1; | Field | Type | +--------+--------------------+ | "name" | "fixed_string(10)" | -+--------+--------------------+ | "age" | "int64" | +--------+--------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/14.native-index-statements/4.rebuild-native-index.md b/docs-2.0/3.ngql-guide/14.native-index-statements/4.rebuild-native-index.md index 5b5037f0be0..3dbf0f8c143 100644 --- a/docs-2.0/3.ngql-guide/14.native-index-statements/4.rebuild-native-index.md +++ b/docs-2.0/3.ngql-guide/14.native-index-statements/4.rebuild-native-index.md @@ -2,8 +2,8 @@ !!! danger - If data is updated or inserted before the creation of the index, you must rebuild the indexes **manually** to make sure that the indexes contain the previously added data. Otherwise, you cannot use `LOOKUP` and `MATCH` to query the data based on the index. If the index is created before any data insertion, there is no need to rebuild the index. - + If data is updated or inserted before the creation of the index, you must rebuild the indexes **manually** to make sure that the indexes contain the previously added data. Otherwise, you cannot use `LOOKUP` and `MATCH` to query the data based on the index. If the index is created before any data insertion, there is no need to rebuild the index. + During the rebuilding, all queries skip the index and perform sequential scans. This means that the return results can be different because not all the data is indexed during rebuilding. You can use `REBUILD INDEX` to rebuild the created tag or edge type index. For details on how to create an index, see [CREATE INDEX](1.create-native-index.md). @@ -49,11 +49,8 @@ nebula> SHOW JOB 31; | Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | +----------------+---------------------+------------+-------------------------+-------------------------+ | 31 | "REBUILD_TAG_INDEX" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:24.000 | -+----------------+---------------------+------------+-------------------------+-------------------------+ | 0 | "storaged1" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 | -+----------------+---------------------+------------+-------------------------+-------------------------+ | 1 | "storaged2" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 | -+----------------+---------------------+------------+-------------------------+-------------------------+ | 2 | "storaged0" | "FINISHED" | 2021-07-07T09:04:24.000 | 2021-07-07T09:04:28.000 | +----------------+---------------------+------------+-------------------------+-------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/14.native-index-statements/5.show-native-index-status.md b/docs-2.0/3.ngql-guide/14.native-index-statements/5.show-native-index-status.md index 3e66fff9ad2..d22471d60f6 100644 --- a/docs-2.0/3.ngql-guide/14.native-index-statements/5.show-native-index-status.md +++ b/docs-2.0/3.ngql-guide/14.native-index-statements/5.show-native-index-status.md @@ -29,7 +29,6 @@ nebula> SHOW TAG INDEX STATUS; | Name | Index Status | +----------------------+--------------+ | "player_index_0" | "FINISHED" | -+----------------------+--------------+ | "player_index_1" | "FINISHED" | +----------------------+--------------+ ``` diff --git a/docs-2.0/3.ngql-guide/15.full-text-index-statements/1.search-with-text-based-index.md b/docs-2.0/3.ngql-guide/15.full-text-index-statements/1.search-with-text-based-index.md index c0bd31e627f..c2864586479 100644 --- a/docs-2.0/3.ngql-guide/15.full-text-index-statements/1.search-with-text-based-index.md +++ b/docs-2.0/3.ngql-guide/15.full-text-index-statements/1.search-with-text-based-index.md @@ -63,7 +63,7 @@ LOOKUP ON { | } WHERE [YIELD ]; - FUZZY(schema_name.prop_name, fuzzy_string, fuzziness, operator, row_limit, timeout) - `fuzziness` (optional): Maximum edit distance allowed for matching. The default value is `AUTO`. For other valid values and more information, see [Elasticsearch document](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/common-options.html#fuzziness). - + - `operator` (optional): Boolean logic used to interpret the text. Valid values are `OR` (default) and `AND`. - `row_limit` (optional): Specifies the number of rows to return. The default value is `100`. @@ -128,9 +128,7 @@ nebula> LOOKUP ON player WHERE PREFIX(player.name, "B"); | _vid | +-----------------+ | "Boris Diaw" | -+-----------------+ | "Ben Simmons" | -+-----------------+ | "Blake Griffin" | +-----------------+ @@ -139,9 +137,7 @@ nebula> LOOKUP ON player WHERE WILDCARD(player.name, "*ri*") YIELD player.name, | _vid | name | age | +-----------------+-----------------+-----+ | "Chris Paul" | "Chris Paul" | 33 | -+-----------------+-----------------+-----+ | "Boris Diaw" | "Boris Diaw" | 36 | -+-----------------+-----------------+-----+ | "Blake Griffin" | "Blake Griffin" | 30 | +-----------------+-----------------+-----+ @@ -164,9 +160,7 @@ nebula> LOOKUP ON player WHERE REGEXP(player.name, ".*"); | _vid | +---------------------+ | "Danny Green" | -+---------------------+ | "David West" | -+---------------------+ | "Russell Westbrook" | +---------------------+ ... diff --git a/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md b/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md index cc4f0e6dbed..b538bfa48dd 100644 --- a/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md +++ b/docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md @@ -38,7 +38,6 @@ The following graph is used as the sample. | nodes | relationships | +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | [("player100" :player{})] | [[:follow "player100"->"player101" @0 {}], [:follow "player100"->"player102" @0 {}], [:serve "player100"->"team200" @0 {}]] | - +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | [("player101" :player{}), ("player102" :player{}), ("team200" :team{})] | [[:follow "player102"->"player101" @0 {}]] | +-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ ``` @@ -55,7 +54,6 @@ The following graph is used as the sample. | nodes | relationships | +---------------------------+---------------+ | [("player100" :player{})] | [] | - +---------------------------+---------------+ | [] | [] | +---------------------------+---------------+ ``` @@ -70,7 +68,6 @@ The following graph is used as the sample. | nodes | relationships | +------------------------------------------------------+-------------------------------------------------------------------------+ | [("player100" :player{age: 42, name: "Tim Duncan"})] | [[:serve "player100"->"team200" @0 {end_year: 2016, start_year: 1997}]] | - +------------------------------------------------------+-------------------------------------------------------------------------+ | [("team200" :team{name: "Warriors"})] | [] | +------------------------------------------------------+-------------------------------------------------------------------------+ ``` @@ -109,7 +106,6 @@ nebula> GET SUBGRAPH 100 STEPS FROM "player141" OUT follow YIELD VERTICES AS nod | nodes | relationships | +---------------------------+--------------------------------------------+ | [("player141" :player{})] | [[:follow "player141"->"player124" @0 {}]] | -+---------------------------+--------------------------------------------+ | [("player124" :player{})] | [[:follow "player124"->"player141" @0 {}]] | +---------------------------+--------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md index 61b4a8b73eb..2a2bf0b760c 100644 --- a/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md +++ b/docs-2.0/3.ngql-guide/16.subgraph-and-path/2.find-path.md @@ -74,9 +74,7 @@ nebula> FIND ALL PATH FROM "player100" TO "team204" OVER * WHERE follow.degree i | path | +------------------------------------------------------------------------------+ | <("player100")-[:serve@0 {}]->("team204")> | -+------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player125")-[:serve@0 {}]->("team204")> | -+------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player101")-[:serve@0 {}]->("team204")> | |... | +------------------------------------------------------------------------------+ @@ -88,13 +86,9 @@ nebula> FIND NOLOOP PATH FROM "player100" TO "team204" OVER *; | path | +--------------------------------------------------------------------------------------------------------+ | <("player100")-[:serve@0 {}]->("team204")> | -+--------------------------------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player125")-[:serve@0 {}]->("team204")> | -+--------------------------------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player101")-[:serve@0 {}]->("team204")> | -+--------------------------------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player101")-[:follow@0 {}]->("player125")-[:serve@0 {}]->("team204")> | -+--------------------------------------------------------------------------------------------------------+ | <("player100")-[:follow@0 {}]->("player101")-[:follow@0 {}]->("player102")-[:serve@0 {}]->("team204")> | +--------------------------------------------------------------------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md b/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md index eaed26ba790..cfbf6f89d50 100644 --- a/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md +++ b/docs-2.0/3.ngql-guide/18.operation-and-maintenance-statements/4.job-statements.md @@ -77,26 +77,26 @@ nebula> SHOW JOB 34; The descriptions are as follows. -|Parameter|Description| -|-|-| -|`Job Id(TaskId)`|The first row shows the job ID and the other rows show the task IDs.| -|`Command(Dest)`|The first row shows the command executed and the other rows show on which storaged processes the task is running.| -|`Status`|Shows the status of the job or task. For more information, see [Job status](#job_status).| -|`Start Time`|Shows a timestamp indicating the time when the job or task enters the `RUNNING` phase.| -|`Stop Time`|Shows a timestamp indicating the time when the job or task gets `FINISHED`, `FAILED`, or `STOPPED`.| +| Parameter | Description | +|------------------+-------------------------------------------------------------------------------------------------------------------| +| `Job Id(TaskId)` | The first row shows the job ID and the other rows show the task IDs. | +| `Command(Dest)` | The first row shows the command executed and the other rows show on which storaged processes the task is running. | +| `Status` | Shows the status of the job or task. For more information, see [Job status](#job_status). | +| `Start Time` | Shows a timestamp indicating the time when the job or task enters the `RUNNING` phase. | +| `Stop Time` | Shows a timestamp indicating the time when the job or task gets `FINISHED`, `FAILED`, or `STOPPED`. | ### Job status The descriptions are as follows. -|Status|Description| -|-|-| -|QUEUE|The job or task is waiting in a queue. The `Start Time` is empty in this phase.| -|RUNNING|The job or task is running. The `Start Time` shows the beginning time of this phase.| -|FINISHED|The job or task is successfully finished. The `Stop Time` shows the time when the job or task enters this phase.| -|FAILED|The job or task has failed. The `Stop Time` shows the time when the job or task enters this phase.| -|STOPPED|The job or task is stopped without running. The `Stop Time` shows the time when the job or task enters this phase.| -|REMOVED|The job or task is removed.| +| Status | Description | +|----------+--------------------------------------------------------------------------------------------------------------------| +| QUEUE | The job or task is waiting in a queue. The `Start Time` is empty in this phase. | +| RUNNING | The job or task is running. The `Start Time` shows the beginning time of this phase. | +| FINISHED | The job or task is successfully finished. The `Stop Time` shows the time when the job or task enters this phase. | +| FAILED | The job or task has failed. The `Stop Time` shows the time when the job or task enters this phase. | +| STOPPED | The job or task is stopped without running. The `Stop Time` shows the time when the job or task enters this phase. | +| REMOVED | The job or task is removed. | The description of switching the status is described as follows. diff --git a/docs-2.0/3.ngql-guide/3.data-types/10.geography.md b/docs-2.0/3.ngql-guide/3.data-types/10.geography.md index fa6fde8c290..32da638fb4e 100644 --- a/docs-2.0/3.ngql-guide/3.data-types/10.geography.md +++ b/docs-2.0/3.ngql-guide/3.data-types/10.geography.md @@ -6,11 +6,11 @@ Geography is a data type composed of latitude and longitude that represents geos A point is the basic data type of geography, which is determined by a latitude and a longitude. For example, `"POINT(3 8)"` means that the longitude is `3°` and the latitude is `8°`. Multiple points can form a linestring or a polygon. -|Shape|Example|Description| -|:--|:--|:--| -|Point|`"POINT(3 8)"`|Specifies the data type as a point.| -|LineString|`"LINESTRING(3 8, 4.7 73.23)"`|Specifies the data type as a linestring.| -|Polygon|`"POLYGON((0 1, 1 2, 2 3, 0 1))"`|Specifies the data type as a polygon.| +| Shape | Example | Description | +| :-- | :-- | :-- | +| Point | `"POINT(3 8)"` | Specifies the data type as a point. | +| LineString | `"LINESTRING(3 8, 4.7 73.23)"` | Specifies the data type as a linestring. | +| Polygon | `"POLYGON((0 1, 1 2, 2 3, 0 1))"` | Specifies the data type as a polygon. | (v2) \ | Name | +-----------------+ | "Spurs" | -+-----------------+ | "Tony Parker" | -+-----------------+ | "Manu Ginobili" | +-----------------+ ``` @@ -233,13 +217,9 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-->(v2)<--(v3) \ | Name | +---------------------+ | "Tony Parker" | -+---------------------+ | "Tiago Splitter" | -+---------------------+ | "Dejounte Murray" | -+---------------------+ | "Tony Parker" | -+---------------------+ | "LaMarcus Aldridge" | +---------------------+ ... @@ -254,13 +234,9 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-->()<--(v3) \ | Name | +---------------------+ | "Tony Parker" | -+---------------------+ | "LaMarcus Aldridge" | -+---------------------+ | "Rudy Gay" | -+---------------------+ | "Danny Green" | -+---------------------+ | "Kyle Anderson" | +---------------------+ ... @@ -277,9 +253,7 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-->(v2) \ | p | +-------------------------------------------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})> | -+-------------------------------------------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})> | -+-------------------------------------------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:serve@0 {end_year: 2016, start_year: 1997}]->("team204" :team{name: "Spurs"})> | +-------------------------------------------+ ``` @@ -299,9 +273,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e]-(v2) \ | e | +---------------------------------------------------------------------------+ | [:follow "player101"->"player100" @0 {degree: 95}] | -+---------------------------------------------------------------------------+ | [:follow "player102"->"player100" @0 {degree: 75}] | -+---------------------------------------------------------------------------+ | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] | +---------------------------------------------------------------------------+ ... @@ -318,13 +290,9 @@ nebula> MATCH ()-[e:follow]-() \ | e | +-----------------------------------------------------+ | [:follow "player113"->"player119" @0 {degree: 99}] | -+-----------------------------------------------------+ | [:follow "player130"->"player149" @0 {degree: 80}] | -+-----------------------------------------------------+ | [:follow "player149"->"player130" @0 {degree: 80}] | -+-----------------------------------------------------+ | [:follow "player136"->"player117" @0 {degree: 90}] | -+-----------------------------------------------------+ | [:follow "player142"->"player117" @0 {degree: 90}] | +-----------------------------------------------------+ ... @@ -345,7 +313,6 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e:follow{degree:95}]->(v2) \ | e | +--------------------------------------------------------+ | [:follow "player100"->"player101" @0 {degree: 95}] | -+--------------------------------------------------------+ | [:follow "player100"->"player125" @0 {degree: 95}] | +--------------------------------------------------------+ ``` @@ -361,9 +328,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e:follow|:serve]->(v2) \ | e | +---------------------------------------------------------------------------+ | [:follow "player100"->"player101" @0 {degree: 95}] | -+---------------------------------------------------------------------------+ | [:follow "player100"->"player125" @0 {degree: 95}] | -+---------------------------------------------------------------------------+ | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] | +---------------------------------------------------------------------------+ ``` @@ -379,9 +344,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[]->(v2)<-[e:serve]-(v3) \ | v2 | v3 | +------------------------------------+-----------------------------------------------------------+ | ("player204" :team{name: "Spurs"}) | ("player101" :player{name: "Tony Parker", age: 36}) | -+------------------------------------+-----------------------------------------------------------+ | ("player204" :team{name: "Spurs"}) | ("player102" :player{name: "LaMarcus Aldridge", age: 33}) | -+------------------------------------+-----------------------------------------------------------+ | ("player204" :team{name: "Spurs"}) | ("player103" :player{age: 32, name: "Rudy Gay"}) | +------------------------------------+-----------------------------------------------------------+ ... @@ -398,9 +361,7 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*2]->(v2) \ | Friends | +-----------------------------------------------------------+ | ("player100" :player{name: "Tim Duncan", age: 42}) | -+-----------------------------------------------------------+ | ("player102" :player{name: "LaMarcus Aldridge", age: 33}) | -+-----------------------------------------------------------+ | ("player125" :player{name: "Manu Ginobili", age: 41}) | +-----------------------------------------------------------+ ``` @@ -437,11 +398,8 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2) \ | Friends | +-----------------------------------------------------------+ | ("player100" :player{age: 42, name: "Tim Duncan"}) | -+-----------------------------------------------------------+ | ("player101" :player{age: 36, name: "Tony Parker"}) | -+-----------------------------------------------------------+ | ("player125" :player{age: 41, name: "Manu Ginobili"}) | -+-----------------------------------------------------------+ | ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | +-----------------------------------------------------------+ ``` @@ -455,11 +413,8 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*1..3]->(v2:player) \ | Friends | count(v2) | +-----------------------------------------------------------+-----------+ | ("player125" :player{age: 41, name: "Manu Ginobili"}) | 3 | -+-----------------------------------------------------------+-----------+ | ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | 1 | -+-----------------------------------------------------------+-----------+ | ("player100" :player{age: 42, name: "Tim Duncan"}) | 4 | -+-----------------------------------------------------------+-----------+ | ("player101" :player{age: 36, name: "Tony Parker"}) | 3 | +-----------------------------------------------------------+-----------+ ``` @@ -473,11 +428,8 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow*0..3]->(v2:player) \ | Friends | count(v2) | +-----------------------------------------------------------+-----------+ | ("player125" :player{age: 41, name: "Manu Ginobili"}) | 3 | -+-----------------------------------------------------------+-----------+ | ("player101" :player{age: 36, name: "Tony Parker"}) | 3 | -+-----------------------------------------------------------+-----------+ | ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | 1 | -+-----------------------------------------------------------+-----------+ | ("player100" :player{age: 42, name: "Tim Duncan"}) | 5 | +-----------------------------------------------------------+-----------+ ``` @@ -493,13 +445,9 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e:follow|serve*2]->(v2) \ | v2 | +-----------------------------------------------------------+ | ("player100" :player{name: "Tim Duncan", age: 42}) | -+-----------------------------------------------------------+ | ("player102" :player{name: "LaMarcus Aldridge", age: 33}) | -+-----------------------------------------------------------+ | ("player125" :player{name: "Manu Ginobili", age: 41}) | -+-----------------------------------------------------------+ | ("player204" :team{name: "Spurs"}) | -+-----------------------------------------------------------+ | ("player215" :team{name: "Hornets"}) | +-----------------------------------------------------------+ ``` @@ -525,9 +473,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e]->(v2) \ | e | +---------------------------------------------------------------------------+ | [:follow "player100"->"player101" @0 {degree: 95}] | -+---------------------------------------------------------------------------+ | [:follow "player100"->"player125" @0 {degree: 95}] | -+---------------------------------------------------------------------------+ | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] | +---------------------------------------------------------------------------+ ``` @@ -609,9 +555,7 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) \ | properties(v2) | +------------------------------------+ | {"name":"Spurs"} | -+------------------------------------+ | {"name":"Tony Parker", "age":36} | -+------------------------------------+ | {"age":41, "name":"Manu Ginobili"} | +------------------------------------+ ``` @@ -627,7 +571,6 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[e]->() \ | type(e) | +----------+ | "follow" | -+----------+ | "serve" | +----------+ ``` @@ -643,9 +586,7 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[*3]->() \ | p | +-------------------------------------------------------------------------------------------------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})-[:serve@0 {end_year: 2019, start_year: 2015}]->("team204" :team{name: "Spurs"})> | -+-------------------------------------------------------------------------------------------------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})-[:serve@0 {end_year: 2015, start_year: 2006}]->("team203" :team{name: "Trail Blazers"})> | -+-------------------------------------------------------------------------------------------------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})-[:follow@0 {degree: 75}]->("player101" :player{age: 36, name: "Tony Parker"})> | +-------------------------------------------------------------------------------------------------+ ... @@ -662,9 +603,7 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) \ | nodes(p) | +---------------------------------------------------------------------------------------------------------------------+ | [("player100" :star{} :player{age: 42, name: "Tim Duncan"}), ("player204" :team{name: "Spurs"})] | -+---------------------------------------------------------------------------------------------------------------------+ | [("player100" :star{} :player{age: 42, name: "Tim Duncan"}), ("player101" :player{name: "Tony Parker", age: 36})] | -+---------------------------------------------------------------------------------------------------------------------+ | [("player100" :star{} :player{age: 42, name: "Tim Duncan"}), ("player125" :player{name: "Manu Ginobili", age: 41})] | +---------------------------------------------------------------------------------------------------------------------+ ``` @@ -680,9 +619,7 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[]->(v2) \ | relationships(p) | +-----------------------------------------------------------------------------+ | [[:follow "player100"->"player101" @0 {degree: 95}]] | -+-----------------------------------------------------------------------------+ | [[:follow "player100"->"player125" @0 {degree: 95}]] | -+-----------------------------------------------------------------------------+ | [[:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}]] | +-----------------------------------------------------------------------------+ ``` @@ -698,21 +635,13 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})-[*..2]->(v2) \ | Paths | Length | +----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})-[:serve@0 {end_year: 2018, start_year: 2002}]->("team204" :team{name: "Spurs"})> | 2 | -+----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})-[:follow@0 {degree: 90}]->("player100" :player{age: 42, name: "Tim Duncan"})> | 2 | -+----------------------------------------------------------------------+--------+ -| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:serve@0 {end_year: 2019, start_year: 2018}]->("team215" :team{name: "Hornets"})> | 2 | -+----------------------------------------------------------------------+--------+ +| <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:serve@0 {end_year: 2019, start_year: 2018}]->("team215" :team{name: "Hornets"})> | 2 | | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:serve@0 {end_year: 2018, start_year: 1999}]->("team204" :team{name: "Spurs"})> | 2 | -+----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})> | 2 | -+----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 90}]->("player102" :player{age: 33, name: "LaMarcus Aldridge"})> | 2 | -+----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player101" :player{age: 36, name: "Tony Parker"})-[:follow@0 {degree: 95}]->("player100" :player{age: 42, name: "Tim Duncan"})> | 2 | -+----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:serve@0 {end_year: 2016, start_year: 1997}]->("team204" :team{name: "Spurs"})> | 1 | -+----------------------------------------------------------------------+--------+ | <("player100" :player{age: 42, name: "Tim Duncan"})-[:follow@0 {degree: 95}]->("player125" :player{age: 41, name: "Manu Ginobili"})> | 1 | +----------------------------------------------------------------------+--------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md index 20fd3bed1d4..5b705b6d840 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/3.go.md @@ -74,7 +74,6 @@ nebula> GO FROM "player102" OVER serve; | serve._dst | +------------+ | "team203" | -+------------+ | "team204" | +------------+ ``` @@ -86,7 +85,6 @@ nebula> GO 2 STEPS FROM "player102" OVER follow; | follow._dst | +-------------+ | "player101" | -+-------------+ | "player125" | +-------------+ ... @@ -102,9 +100,7 @@ nebula> GO FROM "player100", "player102" OVER serve \ | team_name | start_year | player_name | +-----------------+------------+---------------------+ | "Spurs" | 1997 | "Tim Duncan" | -+-----------------+------------+---------------------+ | "Trail Blazers" | 2006 | "LaMarcus Aldridge" | -+-----------------+------------+---------------------+ | "Spurs" | 2015 | "LaMarcus Aldridge" | +-----------------+------------+---------------------+ ``` @@ -117,9 +113,7 @@ nebula> GO FROM "player100" OVER follow, serve \ | properties(EDGE).degree | properties(EDGE).start_year | +-------------------------+-----------------------------+ | 95 | UNKNOWN_PROP | -+-------------------------+-----------------------------+ | 95 | UNKNOWN_PROP | -+-------------------------+-----------------------------+ | UNKNOWN_PROP | 1997 | +-------------------------+-----------------------------+ ``` @@ -132,7 +126,6 @@ nebula> GO FROM "player100" OVER follow REVERSELY \ | destination | +-------------+ | "player101" | -+-------------+ | "player102" | +-------------+ ... @@ -144,7 +137,6 @@ nebula> MATCH (v)<-[e:follow]- (v2) WHERE id(v) == 'player100' \ | destination | +-------------+ | "player101" | -+-------------+ | "player102" | +-------------+ ... @@ -161,7 +153,6 @@ nebula> GO FROM "player100" OVER follow REVERSELY \ | FriendOf | Team | +---------------------+-----------------+ | "Danny Green" | "Spurs" | -+---------------------+-----------------+ | "Danny Green" | "Cavaliers" | +---------------------+-----------------+ ... @@ -174,7 +165,6 @@ nebula> MATCH (v)<-[e:follow]- (v2)-[e2:serve]->(v3) \ | FriendOf | Team | +---------------------+-----------------+ | "Tony Parker" | "Spurs" | -+---------------------+-----------------+ | "Tony Parker" | "Hornets" | +---------------------+-----------------+ ... @@ -188,7 +178,6 @@ nebula> GO FROM "player102" OVER follow \ | both | +-------------+ | "player100" | -+-------------+ | "player101" | +-------------+ ... @@ -201,7 +190,6 @@ nebula> MATCH (v) -[e:follow]-(v2) \ | both | +-------------+ | "player101" | -+-------------+ | "player103" | +-------------+ ... @@ -215,7 +203,6 @@ nebula> GO 1 TO 2 STEPS FROM "player100" OVER follow \ | destination | +-------------+ | "player101" | -+-------------+ | "player125" | +-------------+ ... @@ -228,7 +215,6 @@ nebula> MATCH (v) -[e:follow*1..2]->(v2) \ | destination | +-------------+ | "player100" | -+-------------+ | "player102" | +-------------+ ``` @@ -243,9 +229,7 @@ nebula> GO 2 STEPS FROM "player100" OVER follow \ | dst | src | age | +-------------+----------------------------+----------+ | "player125" | ["player101"] | [41] | -+-------------+----------------------------+----------+ | "player100" | ["player125", "player101"] | [42, 42] | -+-------------+----------------------------+----------+ | "player102" | ["player101"] | [33] | +-------------+----------------------------+----------+ ``` @@ -260,7 +244,6 @@ nebula> $a = GO FROM "player100" OVER follow YIELD src(edge) AS src, dst(edge) A | src | $a.dst | follow._src | follow._dst | +-------------+-------------+-------------+-------------+ | "player100" | "player125" | "player100" | "player101" | -+-------------+-------------+-------------+-------------+ | "player100" | "player101" | "player100" | "player125" | +-------------+-------------+-------------+-------------+ ``` @@ -272,7 +255,6 @@ nebula> GO FROM "player100" OVER follow WHERE properties($$).name IS NOT EMPTY Y | follow._dst | +-------------+ | "player125" | -+-------------+ | "player101" | +-------------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md b/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md index f24cc1500c7..794d227d685 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/4.fetch.md @@ -13,18 +13,18 @@ This topic applies to native nGQL only. ### Syntax ```ngql -FETCH PROP ON {[, tag_name ...] | *} - [, vid ...] -[YIELD [AS ]]; +FETCH PROP ON {[, tag_name ...] | *} + [, vid ...] +[YIELD [AS ]]; ``` -|Parameter|Description| -|:---|:---| -|`tag_name`|The name of the tag.| -|`*`|Represents all the tags in the current graph space.| -|`vid`|The vertex ID.| -|`YIELD`|Define the output to be returned. The defined properties and `VertexID` are returned. For details, see [`YIELD`](../8.clauses-and-options/yield.md). If there is no `YIELD` clause, `vertices_` is returned by default, which contains all the information about the vertex. | -|`AS`| Set an alias.| +| Parameter | Description | +| :--- | :--- | +| `tag_name` | The name of the tag. | +| `*` | Represents all the tags in the current graph space. | +| `vid` | The vertex ID. | +| `YIELD` | Define the output to be returned. The defined properties and `VertexID` are returned. For details, see [`YIELD`](../8.clauses-and-options/yield.md). If there is no `YIELD` clause, `vertices_` is returned by default, which contains all the information about the vertex. | +| `AS` | Set an alias. | ### Fetch vertex properties by one tag @@ -63,9 +63,7 @@ nebula> FETCH PROP ON player "player101", "player102", "player103"; | vertices_ | +-----------------------------------------------------------+ | ("player101" :player{age: 36, name: "Tony Parker"}) | -+-----------------------------------------------------------+ | ("player102" :player{age: 33, name: "LaMarcus Aldridge"}) | -+-----------------------------------------------------------+ | ("player103" :player{age: 32, name: "Rudy Gay"}) | +-----------------------------------------------------------+ ``` @@ -98,7 +96,6 @@ nebula> FETCH PROP ON player, t1 "player100", "player103"; | vertices_ | +----------------------------------------------------------------------------+ | ("player100" :t1{a: "Hello", b: 100} :player{age: 42, name: "Tim Duncan"}) | -+----------------------------------------------------------------------------+ | ("player103" :player{age: 32, name: "Rudy Gay"}) | +----------------------------------------------------------------------------+ ``` @@ -113,9 +110,7 @@ nebula> FETCH PROP ON * "player100", "player106", "team200"; | vertices_ | +----------------------------------------------------------------------------+ | ("player106" :player{age: 25, name: "Kyle Anderson"}) | -+----------------------------------------------------------------------------+ | ("team200" :team{name: "Warriors"}) | -+----------------------------------------------------------------------------+ | ("player100" :t1{a: "Hello", b: 100} :player{age: 42, name: "Tim Duncan"}) | +----------------------------------------------------------------------------+ ``` @@ -129,13 +124,13 @@ FETCH PROP ON -> [@] [, -> ] ``` -|Parameter|Description| -|:---|:---| -|`edge_type`|The name of the edge type.| -|`src_vid`|The VID of the source vertex. It specifies the start of an edge.| -|`dst_vid`|The VID of the destination vertex. It specifies the end of an edge.| -|`rank`|The rank of the edge. It is optional and defaults to `0`. It distinguishes an edge from other edges with the same edge type, source vertex, destination vertex, and rank.| -|`YIELD`|Define the output to be returned. The defined properties, `SrcVertexID`, `DstVertexID`, and `rank` are returned. For details, see [`YIELD`](../8.clauses-and-options/yield.md). If there is no `YIELD` clause, `edges_` is returned by default, which contains all the information about the edge. | +| Parameter | Description | +| :--- | :--- | +| `edge_type` | The name of the edge type. | +| `src_vid` | The VID of the source vertex. It specifies the start of an edge. | +| `dst_vid` | The VID of the destination vertex. It specifies the end of an edge. | +| `rank` | The rank of the edge. It is optional and defaults to `0`. It distinguishes an edge from other edges with the same edge type, source vertex, destination vertex, and rank. | +| `YIELD` | Define the output to be returned. The defined properties, `SrcVertexID`, `DstVertexID`, and `rank` are returned. For details, see [`YIELD`](../8.clauses-and-options/yield.md). If there is no `YIELD` clause, `edges_` is returned by default, which contains all the information about the edge. | ### Fetch all properties of an edge @@ -174,7 +169,6 @@ nebula> FETCH PROP ON serve "player100" -> "team204", "player133" -> "team202"; | edges_ | +-----------------------------------------------------------------------+ | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] | -+-----------------------------------------------------------------------+ | [:serve "player133"->"team202" @0 {end_year: 2011, start_year: 2002}] | +-----------------------------------------------------------------------+ ``` @@ -223,9 +217,7 @@ nebula> GO FROM "player101" OVER follow \ | follow._src | follow._dst | follow._rank | properties(EDGE).degree | +-------------+-------------+--------------+-------------------------+ | "player101" | "player100" | 0 | 95 | -+-------------+-------------+--------------+-------------------------+ | "player101" | "player102" | 0 | 90 | -+-------------+-------------+--------------+-------------------------+ | "player101" | "player125" | 0 | 95 | +-------------+-------------+--------------+-------------------------+ ``` @@ -241,9 +233,7 @@ nebula> $var = GO FROM "player101" OVER follow \ | follow._src | follow._dst | follow._rank | properties(EDGE).degree | +-------------+-------------+--------------+-------------------------+ | "player101" | "player100" | 0 | 95 | -+-------------+-------------+--------------+-------------------------+ | "player101" | "player102" | 0 | 90 | -+-------------+-------------+--------------+-------------------------+ | "player101" | "player125" | 0 | 95 | +-------------+-------------+--------------+-------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md b/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md index 07259f017f1..74fad0cef10 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/5.lookup.md @@ -35,8 +35,8 @@ Before using the `LOOKUP` statement, make sure that at least one index is create ## Syntax ```ngql -LOOKUP ON { | } -[WHERE [AND ...]] +LOOKUP ON { | } +[WHERE [AND ...]] [YIELD [AS ]]; @@ -99,7 +99,6 @@ nebula> LOOKUP ON player \ | VertexID | +-------------+ | "player144" | -+-------------+ | "player140" | +-------------+ @@ -111,7 +110,6 @@ nebula> LOOKUP ON player \ | VertexID | properties(VERTEX).name | properties(VERTEX).age | +-------------+-------------------------+------------------------+ | "player149" | "Ben Simmons" | 22 | -+-------------+-------------------------+------------------------+ | "player134" | "Blake Griffin" | 30 | +-------------+-------------------------+------------------------+ @@ -147,9 +145,7 @@ nebula> LOOKUP ON follow \ | SrcVID | DstVID | Ranking | +-------------+-------------+---------+ | "player101" | "player102" | 0 | -+-------------+-------------+---------+ | "player133" | "player114" | 0 | -+-------------+-------------+---------+ | "player133" | "player144" | 0 | +-------------+-------------+---------+ ... @@ -161,9 +157,7 @@ nebula> LOOKUP ON follow \ | SrcVID | DstVID | Ranking | properties(EDGE).degree | +-------------+-------------+---------+-------------------------+ | "player121" | "player116" | 0 | 90 | -+-------------+-------------+---------+-------------------------+ | "player121" | "player128" | 0 | 90 | -+-------------+-------------+---------+-------------------------+ | "player121" | "player129" | 0 | 90 | +-------------+-------------+---------+-------------------------+ ... @@ -177,9 +171,7 @@ nebula> LOOKUP ON follow \ | $-.DstVID | serve.start_year | serve.end_year | $$.team.name | +-------------+------------------+----------------+--------------+ | "player105" | 2010 | 2018 | "Spurs" | -+-------------+------------------+----------------+--------------+ | "player105" | 2009 | 2010 | "Cavaliers" | -+-------------+------------------+----------------+--------------+ | "player105" | 2018 | 2019 | "Raptors" | +-------------+------------------+----------------+--------------+ ``` @@ -206,15 +198,14 @@ For example, if there is a `player` tag with a `name` property and an `age` prop nebula> INSERT VERTEX player(name,age) \ VALUES "player100":("Tim Duncan", 42), "player101":("Tony Parker", 36); - + The following statement retrieves the VID of all vertices with the tag `player`. It is similar to `MATCH (n:player) RETURN id(n) /*, n */`. - + nebula> LOOKUP ON player; +-------------+ | VertexID | +-------------+ | "player100" | - +-------------+ | "player101" | +-------------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md index 800598edf62..9be0c356ac6 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/1.show-charset.md @@ -21,9 +21,9 @@ nebula> SHOW CHARSET; +---------+-----------------+-------------------+--------+ ``` -|Parameter|Description| -|-|-| -|`Charset`|The name of the character set.| -|`Description`|The description of the character set.| -|`Default collation`|The default collation of the character set.| -|`Maxlen`|The maximum number of bytes required to store one character.| +| Parameter | Description | +|---------------------+--------------------------------------------------------------| +| `Charset` | The name of the character set. | +| `Description` | The description of the character set. | +| `Default collation` | The default collation of the character set. | +| `Maxlen` | The maximum number of bytes required to store one character. | diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md index 247ab1ebcf4..e3c8c05c021 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/11.show-snapshots.md @@ -22,7 +22,6 @@ nebula> SHOW SNAPSHOTS; | Name | Status | Hosts | +--------------------------------+---------+-----------------------------------------------------+ | "SNAPSHOT_2020_12_16_11_13_55" | "VALID" | "storaged0:9779, storaged1:9779, storaged2:9779" | -+--------------------------------+---------+-----------------------------------------------------+ | "SNAPSHOT_2020_12_16_11_14_10" | "VALID" | "storaged0:9779, storaged1:9779, storaged2:9779" | +--------------------------------+---------+-----------------------------------------------------+ -``` \ No newline at end of file +``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md index 67b158aa5e4..38eff101f02 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/12.show-spaces.md @@ -18,7 +18,6 @@ nebula> SHOW SPACES; | Name | +---------------------+ | "docs" | -+---------------------+ | "basketballplayer" | +---------------------+ -``` \ No newline at end of file +``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/14.show-stats.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/14.show-stats.md index dedc7fcec3a..b31919138f0 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/14.show-stats.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/14.show-stats.md @@ -43,11 +43,8 @@ nebula> SHOW JOB 98; | Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time | +----------------+---------------+------------+------------+------------+ | 98 | "STATS" | "FINISHED" | 1606552675 | 1606552675 | -+----------------+---------------+------------+------------+------------+ | 0 | "storaged2" | "FINISHED" | 1606552675 | 1606552675 | -+----------------+---------------+------------+------------+------------+ | 1 | "storaged0" | "FINISHED" | 1606552675 | 1606552675 | -+----------------+---------------+------------+------------+------------+ | 2 | "storaged1" | "FINISHED" | 1606552675 | 1606552675 | +----------------+---------------+------------+------------+------------+ @@ -57,15 +54,10 @@ nebula> SHOW STATS; | Type | Name | Count | +---------+------------+-------+ | "Tag" | "player" | 51 | -+---------+------------+-------+ | "Tag" | "team" | 30 | -+---------+------------+-------+ | "Edge" | "like" | 81 | -+---------+------------+-------+ | "Edge" | "serve" | 152 | -+---------+------------+-------+ | "Space" | "vertices" | 81 | -+---------+------------+-------+ | "Space" | "edges" | 233 | +---------+------------+-------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md index 9371d716593..68116bbd32d 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/15.show-tags-edges.md @@ -18,9 +18,7 @@ nebula> SHOW TAGS; | Name | +----------+ | "player" | -+----------+ | "star" | -+----------+ | "team" | +----------+ @@ -29,7 +27,6 @@ nebula> SHOW EDGES; | Name | +---------+ | "like" | -+---------+ | "serve" | +---------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/16.show-users.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/16.show-users.md index f3c875de669..51a387e0a08 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/16.show-users.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/16.show-users.md @@ -20,7 +20,6 @@ nebula> SHOW USERS; | Account | +---------+ | "root" | -+---------+ | "user1" | +---------+ -``` \ No newline at end of file +``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/17.show-sessions.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/17.show-sessions.md index b8981a26d7a..042935f5764 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/17.show-sessions.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/17.show-sessions.md @@ -25,7 +25,6 @@ nebula> SHOW SESSIONS; | SessionId | UserName | SpaceName | CreateTime | UpdateTime | GraphAddr | Timezone | ClientIp | +------------------+----------+--------------------+----------------------------+----------------------------+---------------+----------+----------------+ | 1623305056644097 | "user1" | "" | 2021-06-10T06:04:16.644097 | 2021-06-10T06:04:16.638039 | "graphd:9669" | 0 | "172.22.xx.xx" | -+------------------+----------+--------------------+----------------------------+----------------------------+---------------+----------+----------------+ | 1623304491050858 | "root" | "basketballplayer" | 2021-06-10T05:54:51.50858 | 2021-06-10T06:17:31.5417 | "graphd:9669" | 0 | "172.22.xx.xx" | +------------------+----------+--------------------+----------------------------+----------------------------+---------------+----------+----------------+ @@ -34,30 +33,23 @@ nebula> SHOW SESSION 1623304491050858; | VariableName | Value | +--------------+-----------------------------+ | "SessionID" | 1623304491050858 | -+--------------+-----------------------------+ | "UserName" | "root" | -+--------------+-----------------------------+ | "SpaceName" | "basketballplayer" | -+--------------+-----------------------------+ | "CreateTime" | 2021-06-10T05:54:51.50858 | -+--------------+-----------------------------+ | "UpdateTime" | 2021-06-10T06:17:34.866137 | -+--------------+-----------------------------+ | "GraphAddr" | "graphd:9669" | -+--------------+-----------------------------+ | "Timezone" | 0 | -+--------------+-----------------------------+ | "ClientIp" | "172.22.xx.xx" | +--------------+-----------------------------+ ``` -|Parameter|Description| -|:---|:---| -|`SessionId`|The session ID, namely the identifier of a session.| -|`UserName`|The username in a session.| -|`SpaceName`|The name of the graph space that the user uses currently. It is null (`""`) when you first log in because there is no specified graph space.| -|`CreateTime`|The time when the session is created, namely the time when the user logs in. The time zone is specified by `timezone_name` in the configuration file.| -|`UpdateTime`|The system will update the time when there is an operation. The time zone is specified by `timezone_name` in the configuration file.| -|`GraphAddr`|The IP address and port of the Graph server that hosts the session.| -|`Timezone`|A reserved parameter that has no specified meaning for now.| -|`ClientIp`|The IP address of the client.| +| Parameter | Description | +| :--- | :--- | +| `SessionId` | The session ID, namely the identifier of a session. | +| `UserName` | The username in a session. | +| `SpaceName` | The name of the graph space that the user uses currently. It is null (`""`) when you first log in because there is no specified graph space. | +| `CreateTime` | The time when the session is created, namely the time when the user logs in. The time zone is specified by `timezone_name` in the configuration file. | +| `UpdateTime` | The system will update the time when there is an operation. The time zone is specified by `timezone_name` in the configuration file. | +| `GraphAddr` | The IP address and port of the Graph server that hosts the session. | +| `Timezone` | A reserved parameter that has no specified meaning for now. | +| `ClientIp` | The IP address of the client. | diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/18.show-queries.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/18.show-queries.md index c46a6df69f5..0453ac8a8e2 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/18.show-queries.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/18.show-queries.md @@ -36,25 +36,24 @@ nebula> SHOW ALL QUERIES; +------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+---------------------------------------------------------+ # The following statement returns the top 10 queries that have the longest duration. -nebula> SHOW ALL QUERIES | ORDER BY $-.DurationInUSec DESC | LIMIT 10; +nebula> SHOW ALL QUERIES | ORDER BY $-.DurationInUSec DESC | LIMIT 10; +------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+-------------------------------------------------------+ | SessionID | ExecutionPlanID | User | Host | StartTime | DurationInUSec | Status | Query | +------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+-------------------------------------------------------+ | 1625471375320831 | 98 | "user2" | ""192.168.x.x":9669" | 2021-07-05T07:50:24.461779 | 2608176 | "RUNNING" | "MATCH (v:player)-[*1..4]-(v2) RETURN v2 AS Friends;" | -+------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+-------------------------------------------------------+ | 1625456037718757 | 99 | "user1" | ""192.168.x.x":9669" | 2021-07-05T07:50:24.910616 | 2159333 | "RUNNING" | "MATCH (v:player)-[*1..4]-(v2) RETURN v2 AS Friends;" | +------------------+-----------------+---------+----------------------+----------------------------+----------------+-----------+-------------------------------------------------------+ ``` The descriptions are as follows. -|Parameter|Description| -|:---|:---| -| `SessionID` | The session ID. | -| `ExecutionPlanID` | The ID of the execution plan. | -| `User` | The username that executes the query. | -| `Host` | The IP address and port of the Graph server that hosts the session. | -| `StartTime` | The time when the query starts. | -| `DurationInUSec` | The duration of the query. The unit is microsecond. | -| `Status` | The current status of the query. | -| `Query` | The query statement. | +| Parameter | Description | +| :--- | :--- | +| `SessionID` | The session ID. | +| `ExecutionPlanID` | The ID of the execution plan. | +| `User` | The username that executes the query. | +| `Host` | The IP address and port of the Graph server that hosts the session. | +| `StartTime` | The time when the query starts. | +| `DurationInUSec` | The duration of the query. The unit is microsecond. | +| `Status` | The current status of the query. | +| `Query` | The query statement. | diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md index 60f9afaad56..604eb343c4a 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/19.show-meta-leader.md @@ -21,7 +21,7 @@ nebula> SHOW META LEADER; +------------------+---------------------------+ ``` -|Parameter|Description| -|:---|:---| -|`Meta Leader`|Shows the information of the leader in the Meta cluster, including the IP address and port of the server where the leader is located.| -|`secs from last heart beat`|Indicates the time interval since the last heartbeat. This parameter is measured in seconds.| +| Parameter | Description | +| :--- | :--- | +| `Meta Leader` | Shows the information of the leader in the Meta cluster, including the IP address and port of the server where the leader is located. | +| `secs from last heart beat` | Indicates the time interval since the last heartbeat. This parameter is measured in seconds. | diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md index b2292628d19..bd9ba11e689 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/6.show-hosts.md @@ -18,9 +18,7 @@ nebula> SHOW HOSTS; | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+-------+----------+--------------+----------------------------------+-----------------------------+ | "storaged0" | 9779 | "ONLINE" | 8 | "docs:5, basketballplayer:3" | "docs:5, basketballplayer:3"| -+-------------+-------+----------+--------------+----------------------------------+-----------------------------+ | "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, docs:5" | "docs:5, basketballplayer:4"| -+-------------+-------+----------+--------------+----------------------------------+-----------------------------+ | "storaged2" | 9779 | "ONLINE" | 8 | "basketballplayer:3, docs:5" | "docs:5, basketballplayer:3"| +-------------+-------+----------+--------------+----------------------------------+-----------------------------+ @@ -29,9 +27,7 @@ nebula> SHOW HOSTS GRAPH; | Host | Port | Status | Role | Git Info Sha | Version | +-----------+------+----------+---------+--------------+-------------------------------------------+ | "graphd" | 9669 | "ONLINE" | "GRAPH" | "c397299c" | "2.5.0, Build Time: Aug 19 2021 11:20:18" | -+-----------+------+----------+---------+--------------+-------------------------------------------+ | "graphd1" | 9669 | "ONLINE" | "GRAPH" | "c397299c" | "2.5.0, Build Time: Aug 19 2021 11:20:18" | -+-----------+------+----------+---------+--------------+-------------------------------------------+ | "graphd2" | 9669 | "ONLINE" | "GRAPH" | "c397299c" | "2.5.0, Build Time: Aug 19 2021 11:20:18" | +-----------+------+----------+---------+--------------+-------------------------------------------+ @@ -40,9 +36,7 @@ nebula> SHOW HOSTS STORAGE; | Host | Port | Status | Role | Git Info Sha | Version | +-------------+------+----------+-----------+--------------+-------------------------------------------+ | "storaged0" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | -+-------------+------+----------+-----------+--------------+-------------------------------------------+ | "storaged1" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | -+-------------+------+----------+-----------+--------------+-------------------------------------------+ | "storaged2" | 9779 | "ONLINE" | "STORAGE" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | +-------------+------+----------+-----------+--------------+-------------------------------------------+ @@ -51,9 +45,7 @@ nebula> SHOW HOSTS META; | Host | Port | Status | Role | Git Info Sha | Version | +----------+------+----------+--------+--------------+-------------------------------------------+ | "metad2" | 9559 | "ONLINE" | "META" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | -+----------+------+----------+--------+--------------+-------------------------------------------+ | "metad0" | 9559 | "ONLINE" | "META" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | -+----------+------+----------+--------+--------------+-------------------------------------------+ | "metad1" | 9559 | "ONLINE" | "META" | "5b83e5cb" | "2.5.0, Build Time: Aug 19 2021 10:30:28" | +----------+------+----------+--------+--------------+-------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md index 8a691937be8..597e68d6c54 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/7.show-index-status.md @@ -16,7 +16,6 @@ nebula> SHOW TAG INDEX STATUS; | Name | Index Status | +----------------+--------------+ | "like_index_0" | "FINISHED" | -+----------------+--------------+ | "like1" | "FINISHED" | +----------------+--------------+ diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md index 8dfd817497a..f90c8da49d3 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/8.show-indexes.md @@ -16,11 +16,8 @@ nebula> SHOW TAG INDEXES; | Index Name | By Tag | Columns | +------------------+--------------+-----------------+ | "fix" | "fix_string" | ["p1"] | -+------------------+--------------+-----------------+ | "player_index_0" | "player" | ["name"] | -+------------------+--------------+-----------------+ | "player_index_1" | "player" | ["name", "age"] | -+------------------+--------------+-----------------+ | "var" | "var_string" | ["p1"] | +------------------+--------------+-----------------+ diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/9.show-parts.md b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/9.show-parts.md index 5fad4a1b476..30f48dcca05 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/9.show-parts.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/6.show/9.show-parts.md @@ -16,23 +16,14 @@ nebula> SHOW PARTS; | Partition ID | Leader | Peers | Losts | +--------------+--------------------+--------------------+-------+ | 1 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 2 | "192.168.2.2:9779" | "192.168.2.2:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 3 | "192.168.2.3:9779" | "192.168.2.3:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 4 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 5 | "192.168.2.2:9779" | "192.168.2.2:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 6 | "192.168.2.3:9779" | "192.168.2.3:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 7 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 8 | "192.168.2.2:9779" | "192.168.2.2:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 9 | "192.168.2.3:9779" | "192.168.2.3:9779" | "" | -+--------------+--------------------+--------------------+-------+ | 10 | "192.168.2.1:9779" | "192.168.2.1:9779" | "" | +--------------+--------------------+--------------------+-------+ @@ -46,9 +37,9 @@ nebula> SHOW PARTS 1; The descriptions are as follows. -| Parameter | Description | -| - | - | -| `Partition ID` | The ID of the partition. | -| `Leader` | The IP address and the port of the leader. | -| `Peers` | The IP addresses and the ports of all the replicas. | -| `Losts` | The IP addresses and the ports of replicas at fault. | +| Parameter | Description | +| - | - | +| `Partition ID` | The ID of the partition. | +| `Leader` | The IP address and the port of the leader. | +| `Peers` | The IP addresses and the ports of all the replicas. | +| `Losts` | The IP addresses and the ports of replicas at fault. | diff --git a/docs-2.0/3.ngql-guide/7.general-query-statements/7.unwind.md b/docs-2.0/3.ngql-guide/7.general-query-statements/7.unwind.md index 3ca747d63e1..2c4f5fb1686 100644 --- a/docs-2.0/3.ngql-guide/7.general-query-statements/7.unwind.md +++ b/docs-2.0/3.ngql-guide/7.general-query-statements/7.unwind.md @@ -20,9 +20,7 @@ nebula> UNWIND [1,2,3] AS n RETURN n; | n | +---+ | 1 | -+---+ | 2 | -+---+ | 3 | +---+ ``` @@ -71,11 +69,11 @@ nebula> MATCH p=(v:player{name:"Tim Duncan"})--(v2) \ +----------------------------------------------------------------------------------------------------------------------+ | collect(r) | +----------------------------------------------------------------------------------------------------------------------+ -| [("player100" :player{age: 42, name: "Tim Duncan"}), ("player101" :player{age: 36, name: "Tony Parker"}), -("team204" :team{name: "Spurs"}), ("player102" :player{age: 33, name: "LaMarcus Aldridge"}), -("player125" :player{age: 41, name: "Manu Ginobili"}), ("player104" :player{age: 32, name: "Marco Belinelli"}), -("player144" :player{age: 47, name: "Shaquile O'Neal"}), ("player105" :player{age: 31, name: "Danny Green"}), -("player113" :player{age: 29, name: "Dejounte Murray"}), ("player107" :player{age: 32, name: "Aron Baynes"}), +| [("player100" :player{age: 42, name: "Tim Duncan"}), ("player101" :player{age: 36, name: "Tony Parker"}), +("team204" :team{name: "Spurs"}), ("player102" :player{age: 33, name: "LaMarcus Aldridge"}), +("player125" :player{age: 41, name: "Manu Ginobili"}), ("player104" :player{age: 32, name: "Marco Belinelli"}), +("player144" :player{age: 47, name: "Shaquile O'Neal"}), ("player105" :player{age: 31, name: "Danny Green"}), +("player113" :player{age: 29, name: "Dejounte Murray"}), ("player107" :player{age: 32, name: "Aron Baynes"}), ("player109" :player{age: 34, name: "Tiago Splitter"}), ("player108" :player{age: 36, name: "Boris Diaw"})] | +----------------------------------------------------------------------------------------------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md index 72ba5bb8e50..0d241814653 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/group-by.md @@ -14,13 +14,9 @@ nebula> MATCH (v:player)<-[:follow]-(:player) RETURN v.name AS Name, count(*) a | Name | cnt | +----------------------+-----+ | "Tim Duncan" | 10 | -+----------------------+-----+ | "LeBron James" | 6 | -+----------------------+-----+ | "Tony Parker" | 5 | -+----------------------+-----+ | "Chris Paul" | 4 | -+----------------------+-----+ | "Manu Ginobili" | 4 | +----------------------+-----+ ... diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md index 01b19f40ba7..02c84cbbffd 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/limit.md @@ -26,10 +26,10 @@ In native nGQL, the general `LIMIT` syntax works the same as in `SQL`. The `LIM ... | LIMIT [,] ; ``` -|Parameter|Description| -|:--|:--| -|`offset`|The offset value. It defines the row from which to start returning. The offset starts from `0`. The default value is `0`, which returns from the first row.| -|`number_rows`|It constrains the total number of returned rows.| +| Parameter | Description | +| :-- | :-- | +| `offset` | The offset value. It defines the row from which to start returning. The offset starts from `0`. The default value is `0`, which returns from the first row. | +| `number_rows` | It constrains the total number of returned rows. | For example: @@ -54,9 +54,7 @@ nebula> GO FROM "player100" OVER follow REVERSELY \ | Friend | Age | +-------------------+-----+ | "Danny Green" | 31 | -+-------------------+-----+ | "Aron Baynes" | 32 | -+-------------------+-----+ | "Marco Belinelli" | 32 | +-------------------+-----+ ``` @@ -103,10 +101,10 @@ In openCypher compatible statements such as `MATCH`, there is no need to use a p ... [SKIP ] [LIMIT ]; ``` -|Parameter|Description| -|:--|:--| -|`offset`|The offset value. It defines the row from which to start returning. The offset starts from `0`. The default value is `0`, which returns from the first row.| -|`number_rows`|It constrains the total number of returned rows.| +| Parameter | Description | +| :-- | :-- | +| `offset` | The offset value. It defines the row from which to start returning. The offset starts from `0`. The default value is `0`, which returns from the first row. | +| `number_rows` | It constrains the total number of returned rows. | Both `offset` and `number_rows` accept expressions, but the result of the expression must be a non-negative integer. @@ -125,13 +123,9 @@ nebula> MATCH (v:player) RETURN v.name AS Name, v.age AS Age \ | Name | Age | +-------------------------+-----+ | "Luka Doncic" | 20 | -+-------------------------+-----+ | "Ben Simmons" | 22 | -+-------------------------+-----+ | "Kristaps Porzingis" | 23 | -+-------------------------+-----+ | "Giannis Antetokounmpo" | 24 | -+-------------------------+-----+ | "Kyle Anderson" | 25 | +-------------------------+-----+ @@ -141,11 +135,8 @@ nebula> MATCH (v:player) RETURN v.name AS Name, v.age AS Age \ | Name | Age | +-------------------------+-----+ | "Luka Doncic" | 20 | -+-------------------------+-----+ | "Ben Simmons" | 22 | -+-------------------------+-----+ | "Kristaps Porzingis" | 23 | -+-------------------------+-----+ | "Giannis Antetokounmpo" | 24 | +-------------------------+-----+ ``` @@ -162,7 +153,6 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) --> (v2) \ | Name | Age | +-----------------+-----+ | "Manu Ginobili" | 41 | -+-----------------+-----+ | "Tony Parker" | 36 | +-----------------+-----+ diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md index 249371ef7ab..ed80cda1925 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/order-by.md @@ -32,11 +32,8 @@ nebula> FETCH PROP ON player "player100", "player101", "player102", "player103" | VertexID | age | name | +-------------+-----+---------------------+ | "player103" | 32 | "Rudy Gay" | -+-------------+-----+---------------------+ | "player102" | 33 | "LaMarcus Aldridge" | -+-------------+-----+---------------------+ | "player101" | 36 | "Tony Parker" | -+-------------+-----+---------------------+ | "player100" | 42 | "Tim Duncan" | +-------------+-----+---------------------+ @@ -47,7 +44,6 @@ nebula> $var = GO FROM "player100" OVER follow \ | dst | +-------------+ | "player125" | -+-------------+ | "player101" | +-------------+ ``` @@ -68,13 +64,9 @@ nebula> MATCH (v:player) RETURN v.name AS Name, v.age AS Age \ | Name | Age | +-----------------+-----+ | "Yao Ming" | 38 | -+-----------------+-----+ | "Vince Carter" | 42 | -+-----------------+-----+ | "Tracy McGrady" | 39 | -+-----------------+-----+ | "Tony Parker" | 36 | -+-----------------+-----+ | "Tim Duncan" | 42 | +-----------------+-----+ ... @@ -86,11 +78,8 @@ nebula> MATCH (v:player) RETURN v.age AS Age, v.name AS Name \ | Age | Name | +-----+-------------------+ | 47 | "Shaquille O'Neal" | -+-----+-------------------+ | 46 | "Grant Hill" | -+-----+-------------------+ | 45 | "Jason Kidd" | -+-----+-------------------+ | 45 | "Steve Nash" | +-----+-------------------+ ... diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md index 2775dcd8ddd..04cfe4c6694 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md @@ -63,13 +63,9 @@ nebula> MATCH (v:player) \ | v | +---------------------------------------------------------------+ | ("player104" :player{age: 32, name: "Marco Belinelli"}) | -+---------------------------------------------------------------+ | ("player107" :player{age: 32, name: "Aron Baynes"}) | -+---------------------------------------------------------------+ | ("player116" :player{age: 34, name: "LeBron James"}) | -+---------------------------------------------------------------+ | ("player120" :player{age: 29, name: "James Harden"}) | -+---------------------------------------------------------------+ | ("player125" :player{age: 41, name: "Manu Ginobili"}) | +---------------------------------------------------------------+ ... @@ -84,13 +80,9 @@ nebula> MATCH (v:player)-[e]->() \ | e | +------------------------------------------------------------------------------+ | [:follow "player104"->"player100" @0 {degree: 55}] | -+------------------------------------------------------------------------------+ | [:follow "player104"->"player101" @0 {degree: 50}] | -+------------------------------------------------------------------------------+ | [:follow "player104"->"player105" @0 {degree: 60}] | -+------------------------------------------------------------------------------+ | [:serve "player104"->"team200" @0 {end_year: 2009, start_year: 2007}] | -+------------------------------------------------------------------------------+ | [:serve "player104"->"team208" @0 {end_year: 2016, start_year: 2015}] | +------------------------------------------------------------------------------+ ... @@ -108,9 +100,7 @@ nebula> MATCH (v:player) \ | v.name | v.age | +-------------------+-------+ | "Rajon Rondo" | 33 | -+-------------------+-------+ | "Rudy Gay" | 32 | -+-------------------+-------+ | "Dejounte Murray" | 29 | +-------------------+-------+ ``` @@ -134,9 +124,7 @@ nebula> MATCH (v:player{name:"Tim Duncan"})-[e]->(v2) \ | v | e | v2 | +----------------------------------------------------+-----------------------------------------------------------------------+-------------------------------------------------------+ | ("player100" :player{age: 42, name: "Tim Duncan"}) | [:follow "player100"->"player101" @0 {degree: 95}] | ("player101" :player{age: 36, name: "Tony Parker"}) | -+----------------------------------------------------+-----------------------------------------------------------------------+-------------------------------------------------------+ | ("player100" :player{age: 42, name: "Tim Duncan"}) | [:follow "player100"->"player125" @0 {degree: 95}] | ("player125" :player{age: 41, name: "Manu Ginobili"}) | -+----------------------------------------------------+-----------------------------------------------------------------------+-------------------------------------------------------+ | ("player100" :player{age: 42, name: "Tim Duncan"}) | [:serve "player100"->"team204" @0 {end_year: 2016, start_year: 1997}] | ("team204" :team{name: "Spurs"}) | +----------------------------------------------------+-----------------------------------------------------------------------+-------------------------------------------------------+ ``` @@ -189,9 +177,7 @@ nebula> MATCH (v:player{name:"Tony Parker"})-->(v2:player) \ | v2.name | (Hello+ graphs!) | (v2.age>35) | +---------------------+------------------+-------------+ | "Tim Duncan" | "Hello graphs!" | true | -+---------------------+------------------+-------------+ | "LaMarcus Aldridge" | "Hello graphs!" | false | -+---------------------+------------------+-------------+ | "Manu Ginobili" | "Hello graphs!" | true | +---------------------+------------------+-------------+ @@ -229,19 +215,12 @@ nebula> MATCH (v:player{name:"Tony Parker"})--(v2:player) \ | v2.name | v2.age | +---------------------+--------+ | "Tim Duncan" | 42 | -+---------------------+--------+ | "LaMarcus Aldridge" | 33 | -+---------------------+--------+ | "Marco Belinelli" | 32 | -+---------------------+--------+ | "Boris Diaw" | 36 | -+---------------------+--------+ | "Dejounte Murray" | 29 | -+---------------------+--------+ | "Tim Duncan" | 42 | -+---------------------+--------+ | "LaMarcus Aldridge" | 33 | -+---------------------+--------+ | "Manu Ginobili" | 41 | +---------------------+--------+ @@ -252,15 +231,10 @@ nebula> MATCH (v:player{name:"Tony Parker"})--(v2:player) \ | v2.name | v2.age | +---------------------+--------+ | "Tim Duncan" | 42 | -+---------------------+--------+ | "LaMarcus Aldridge" | 33 | -+---------------------+--------+ | "Marco Belinelli" | 32 | -+---------------------+--------+ | "Boris Diaw" | 36 | -+---------------------+--------+ | "Dejounte Murray" | 29 | -+---------------------+--------+ | "Manu Ginobili" | 41 | +---------------------+--------+ ``` diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md index 2c4b0c06ed2..e91ce1a79b2 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/where.md @@ -33,13 +33,9 @@ nebula> MATCH (v:player) \ | v.name | v.age | +-------------------------+-------+ | "Marco Belinelli" | 32 | -+-------------------------+-------+ | "Aron Baynes" | 32 | -+-------------------------+-------+ | "LeBron James" | 34 | -+-------------------------+-------+ | "James Harden" | 29 | -+-------------------------+-------+ | "Manu Ginobili" | 41 | +-------------------------+-------+ ... @@ -73,9 +69,7 @@ Use vertex or edge properties to define conditions in `WHERE` clauses. | v2.name | v2.age | +----------------------+--------+ | "Luka Doncic" | 20 | - +----------------------+--------+ | "Kristaps Porzingis" | 23 | - +----------------------+--------+ | "Ben Simmons" | 22 | +----------------------+--------+ ``` @@ -88,7 +82,6 @@ Use vertex or edge properties to define conditions in `WHERE` clauses. | follow._dst | +-------------+ | "player101" | - +-------------+ | "player125" | +-------------+ ``` @@ -103,13 +96,9 @@ Use vertex or edge properties to define conditions in `WHERE` clauses. | v.name | v.age | +--------------------+-------+ | "Shaquille O'Neal" | 47 | - +--------------------+-------+ | "Steve Nash" | 45 | - +--------------------+-------+ | "Ray Allen" | 43 | - +--------------------+-------+ | "Grant Hill" | 46 | - +--------------------+-------+ | "Tony Parker" | 36 | +--------------------+-------+ ... @@ -123,7 +112,6 @@ Use vertex or edge properties to define conditions in `WHERE` clauses. | follow._dst | +-------------+ | "player101" | - +-------------+ | "player125" | +-------------+ ``` @@ -151,7 +139,6 @@ nebula> MATCH (v:player) \ | v.name | v.age | +-------------------------+-------+ | "Boris Diaw" | 36 | -+-------------------------+-------+ | "DeAndre Jordan" | 30 | +-------------------------+-------+ ``` @@ -186,11 +173,8 @@ nebula> GO FROM "1" \ | src(EDGE) | dst(EDGE) | Rank | properties(EDGE).p1 | +-----------+-----------+------+---------------------+ | "1" | "2" | 6 | 16 | -+-----------+-----------+------+---------------------+ | "1" | "2" | 5 | 15 | -+-----------+-----------+------+---------------------+ | "1" | "2" | 4 | 14 | -+-----------+-----------+------+---------------------+ | "1" | "2" | 3 | 13 | +-----------+-----------+------+---------------------+ ``` @@ -213,11 +197,8 @@ nebula> MATCH (v:player) \ | v.name | v.age | +------------------+-------+ | "Tracy McGrady" | 39 | -+------------------+-------+ | "Tony Parker" | 36 | -+------------------+-------+ | "Tim Duncan" | 42 | -+------------------+-------+ | "Tiago Splitter" | 34 | +------------------+-------+ ``` @@ -245,9 +226,7 @@ nebula> MATCH (v:player) \ | v.name | v.age | +------------------+-------+ | "Vince Carter" | 42 | -+------------------+-------+ | "Tony Parker" | 36 | -+------------------+-------+ | "Tiago Splitter" | 34 | +------------------+-------+ ``` @@ -266,11 +245,8 @@ nebula> MATCH (v:player) \ | v.name | v.age | +---------------+-------+ | "Paul George" | 28 | -+---------------+-------+ | "Tony Parker" | 36 | -+---------------+-------+ | "Paul Gasol" | 38 | -+---------------+-------+ | "Chris Paul" | 33 | +---------------+-------+ ``` @@ -287,13 +263,9 @@ nebula> MATCH (v:player) \ | v.name | v.age | +-------------------------+-------+ | "Rajon Rondo" | 33 | -+-------------------------+-------+ | "Rudy Gay" | 32 | -+-------------------------+-------+ | "Dejounte Murray" | 29 | -+-------------------------+-------+ | "Chris Paul" | 33 | -+-------------------------+-------+ | "Carmelo Anthony" | 34 | +-------------------------+-------+ ... @@ -327,15 +299,10 @@ nebula> MATCH (v:player) \ | v.name | v.age | +-------------------------+-------+ | "Ben Simmons" | 22 | -+-------------------------+-------+ | "Kristaps Porzingis" | 23 | -+-------------------------+-------+ | "Luka Doncic" | 20 | -+-------------------------+-------+ | "Kyle Anderson" | 25 | -+-------------------------+-------+ | "Giannis Antetokounmpo" | 24 | -+-------------------------+-------+ | "Joel Embiid" | 25 | +-------------------------+-------+ @@ -346,13 +313,9 @@ nebula> LOOKUP ON player \ | VertexID | properties(VERTEX).name | properties(VERTEX).age | +-------------+-------------------------+------------------------+ | "player106" | "Kyle Anderson" | 25 | -+-------------+-------------------------+------------------------+ | "player135" | "Damian Lillard" | 28 | -+-------------+-------------------------+------------------------+ | "player130" | "Joel Embiid" | 25 | -+-------------+-------------------------+------------------------+ | "player131" | "Paul George" | 28 | -+-------------+-------------------------+------------------------+ | "player123" | "Ricky Rubio" | 28 | +-------------+-------------------------+------------------------+ ``` @@ -370,13 +333,9 @@ nebula> MATCH (v:player) \ | Name | Age | +---------------------+-----+ | "Kyrie Irving" | 26 | -+---------------------+-----+ | "Cory Joseph" | 27 | -+---------------------+-----+ | "Damian Lillard" | 28 | -+---------------------+-----+ | "Paul George" | 28 | -+---------------------+-----+ | "Ricky Rubio" | 28 | +---------------------+-----+ ... diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md index ea6810fb316..e87f8b53641 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/with.md @@ -65,9 +65,7 @@ nebula> MATCH (v) \ | tags_f | +----------+ | "star" | -+----------+ | "player" | -+----------+ | "person" | +----------+ ``` @@ -86,9 +84,7 @@ nebula> MATCH (v:player)-->(v2:player) \ | Name | Age | +----------------------+-----+ | "Luka Doncic" | 20 | -+----------------------+-----+ | "Ben Simmons" | 22 | -+----------------------+-----+ | "Kristaps Porzingis" | 23 | +----------------------+-----+ ``` diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/yield.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/yield.md index 04a52a6d100..4b1858cf33a 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/yield.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/yield.md @@ -33,11 +33,11 @@ This topic applies to native nGQL only. For the openCypher syntax, use [`RETURN` YIELD [DISTINCT] [AS ] [, [AS ] ...]; ``` -|Parameter|Description| -|:---|:---| -|`DISTINCT`|Aggregates the output and makes the statement return a distinct result set.| -|`col`|A field to be returned. If no alias is set, `col` will be a column name in the output.| -|`alias`|An alias for `col`. It is set after the keyword `AS` and will be a column name in the output.| +| Parameter | Description | +| :--- | :--- | +| `DISTINCT` | Aggregates the output and makes the statement return a distinct result set. | +| `col` | A field to be returned. If no alias is set, `col` will be a column name in the output. | +| `alias` | An alias for `col`. It is set after the keyword `AS` and will be a column name in the output. | ### Use a YIELD clause in a statement @@ -50,7 +50,6 @@ YIELD [DISTINCT] [AS ] [, [AS ] ...]; | Friend | Age | +-----------------+-----+ | "Tony Parker" | 36 | - +-----------------+-----+ | "Manu Ginobili" | 41 | +-----------------+-----+ ``` @@ -88,12 +87,12 @@ YIELD [DISTINCT] [AS ] [, [AS ] ...] [WHERE ]; ``` -|Parameter|Description| -|-|-| -|`DISTINCT`|Aggregates the output and makes the statement return a distinct result set.| -|`col`|A field to be returned. If no alias is set, `col` will be a column name in the output.| -|`alias`|An alias for `col`. It is set after the keyword `AS` and will be a column name in the output.| -|`conditions`|Conditions set in a `WHERE` clause to filter the output. For more information, see [`WHERE`](where.md).| +| Parameter | Description | +|--------------+---------------------------------------------------------------------------------------------------------| +| `DISTINCT` | Aggregates the output and makes the statement return a distinct result set. | +| `col` | A field to be returned. If no alias is set, `col` will be a column name in the output. | +| `alias` | An alias for `col`. It is set after the keyword `AS` and will be a column name in the output. | +| `conditions` | Conditions set in a `WHERE` clause to filter the output. For more information, see [`WHERE`](where.md). | ### Use a YIELD statement in a composite query @@ -124,7 +123,6 @@ nebula> $var1 = GO FROM "player101" OVER follow \ | ID | +-------------+ | "player100" | -+-------------+ | "player125" | +-------------+ ``` diff --git a/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md b/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md index 8a48797f304..014c8f204ff 100644 --- a/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md +++ b/docs-2.0/3.ngql-guide/9.space-statements/1.create-space.md @@ -12,7 +12,7 @@ Only the God role can use the `CREATE SPACE` statement. For more information, se ```ngql CREATE SPACE [IF NOT EXISTS] ( - [partition_num = ,] + [partition_num = ,] [replica_factor = ,] vid_type = {FIXED_STRING() | INT[64]} ) @@ -37,9 +37,9 @@ CREATE SPACE [IF NOT EXISTS] ( !!! caution Restrictions on VID type change and VID length - + 1. In Nebula Graph 1.x, the VID type can only be `INT64` and does not support string. In Nebula Graph 2.x, the VID type can be both `INT64` and `FIXED_STRING()`. You should specify the VID type when creating a graph space and keep consistency when using the `INSERT` statement. Otherwise, Nebula Graph throws `Wrong vertex id type: 1001`. - + 2. The length of the VID should not be longer than `N` characters. If it exceeds `N`, Nebula Graph throws `The VID must be a 64-bit integer or a string fitting space vertex id length limit.`. !!! compatibility "Legacy version compatibility" @@ -56,22 +56,22 @@ CREATE SPACE [IF NOT EXISTS] ( CREATE SPACE AS ; ``` -|Parameter|Description| -|:---|:---| -|``|The name of the graph space that is newly created. The name of the graph space is case-sensitive and allows letters, numbers, or underlines. [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md) are not allowed. When a new graph space is created, the schema of the old graph space `` will be cloned, including its parameters (the number of partitions and replicas, etc.), Tag, Edge type, and native indexes.| -|``|The name of the graph space that already exists.| +| Parameter | Description | +| :--- | :--- | +| `` | The name of the graph space that is newly created. The name of the graph space is case-sensitive and allows letters, numbers, or underlines. [Keywords and reserved words](../../3.ngql-guide/1.nGQL-overview/keywords-and-reserved-words.md) are not allowed. When a new graph space is created, the schema of the old graph space `` will be cloned, including its parameters (the number of partitions and replicas, etc.), Tag, Edge type, and native indexes. | +| `` | The name of the graph space that already exists. | ## Examples ```ngql # The following example creates a graph space with a specified VID type and the maximum length. Other fields still use the default values. -nebula> CREATE SPACE my_space_1 (vid_type=FIXED_STRING(30)); +nebula> CREATE SPACE my_space_1 (vid_type=FIXED_STRING(30)); # The following example creates a graph space with a specified partition number, replica number, and VID type. nebula> CREATE SPACE my_space_2 (partition_num=15, replica_factor=1, vid_type=FIXED_STRING(30)); # The following example creates a graph space with a specified partition number, replica number, and VID type, and adds a comment on it. -nebula> CREATE SPACE my_space_3 (partition_num=15, replica_factor=1, vid_type=FIXED_STRING(30)) comment="Test the graph space"; +nebula> CREATE SPACE my_space_3 (partition_num=15, replica_factor=1, vid_type=FIXED_STRING(30)) comment="Test the graph space"; # Clone a graph space. nebula> CREATE SPACE my_space_4 as my_space_3; @@ -88,7 +88,7 @@ nebula> SHOW CREATE SPACE my_space_4; !!! caution Trying to use a newly created graph space may fail because the creation is implemented asynchronously. - + Nebula Graph implements the creation in the next heartbeat cycle. To make sure the creation is successful, take one of the following approaches: - Find the new graph space in the result of [`SHOW SPACES`](3.show-spaces.md) or [`DESCRIBE SPACE`](4.describe-space.md). If you cannot, wait a few seconds and try again. @@ -107,11 +107,8 @@ nebula> SHOW HOSTS; | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "storaged0" | 9779 | "ONLINE" | 8 | "basketballplayer:3, test:5" | "basketballplayer:10, test:10" | -+-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "storaged1" | 9779 | "ONLINE" | 9 | "basketballplayer:4, test:5" | "basketballplayer:10, test:10" | -+-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "storaged2" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:10, test:10" | -+-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "Total" | | | 20 | "basketballplayer:10, test:10" | "basketballplayer:30, test:30" | +-------------+------+----------+--------------+--------------------------------+--------------------------------+ ``` @@ -124,11 +121,8 @@ nebula> BALANCE LEADER; | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "storaged0" | 9779 | "ONLINE" | 7 | "basketballplayer:3, test:4" | "basketballplayer:10, test:10" | -+-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "storaged1" | 9779 | "ONLINE" | 7 | "basketballplayer:4, test:3" | "basketballplayer:10, test:10" | -+-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "storaged2" | 9779 | "ONLINE" | 6 | "basketballplayer:3, test:3" | "basketballplayer:10, test:10" | -+-------------+------+----------+--------------+--------------------------------+--------------------------------+ | "Total" | | | 20 | "basketballplayer:10, test:10" | "basketballplayer:30, test:30" | +-------------+------+----------+--------------+--------------------------------+--------------------------------+ ``` diff --git a/docs-2.0/3.ngql-guide/9.space-statements/3.show-spaces.md b/docs-2.0/3.ngql-guide/9.space-statements/3.show-spaces.md index 775f111400d..cb5beb6cdc4 100644 --- a/docs-2.0/3.ngql-guide/9.space-statements/3.show-spaces.md +++ b/docs-2.0/3.ngql-guide/9.space-statements/3.show-spaces.md @@ -16,7 +16,6 @@ nebula> SHOW SPACES; | Name | +--------------------+ | "cba" | -+--------------------+ | "basketballplayer" | +--------------------+ ``` diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md index bcdd8e87673..f8d46d3b207 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md @@ -98,11 +98,8 @@ Using Docker Compose can quickly deploy Nebula Graph services based on the prepa | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+------+----------+--------------+----------------------+------------------------+ | "storaged0" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | - +-------------+------+----------+--------------+----------------------+------------------------+ | "storaged1" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | - +-------------+------+----------+--------------+----------------------+------------------------+ | "storaged2" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | - +-------------+------+----------+--------------+----------------------+------------------------+ | "Total" | | | 0 | | | +-------------+------+----------+--------------+----------------------+------------------------+ ``` diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster.md index b9ee3120c33..fd100ffe538 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/deploy-nebula-graph-cluster.md @@ -4,13 +4,13 @@ For now, Nebula Graph does not provide an official deployment tool. Users can de ## Deployment -| Machine name |IP address | Number of graphd | Number of storaged | Number of metad | -| :----- |:---------------|:------------- | :----------------- | :---------------- | -| A | 192.168.10.111 |1 | 1 | 1 | -| B | 192.168.10.112 |1 | 1 | 1 | -| C | 192.168.10.113 |1 | 1 | 1 | -| D | 192.168.10.114 |1 | 1 | None | -| E | 192.168.10.115 |1 | 1 | None | +| Machine name | IP address | Number of graphd | Number of storaged | Number of metad | +| :----- | :--------------- | :------------- | :----------------- | :---------------- | +| A | 192.168.10.111 | 1 | 1 | 1 | +| B | 192.168.10.112 | 1 | 1 | 1 | +| C | 192.168.10.113 | 1 | 1 | 1 | +| D | 192.168.10.114 | 1 | 1 | None | +| E | 192.168.10.115 | 1 | 1 | None | ## Prerequisites @@ -32,13 +32,13 @@ To deploy Nebula Graph according to your requirements, you have to modify the co All the configuration files for Nebula Graph, including `nebula-graphd.conf`, `nebula-metad.conf`, and `nebula-storaged.conf`, are stored in the `etc` directory in the installation path. You only need to modify the configuration for the corresponding service on the machines. The configurations that need to be modified for each machine are as follows. -| Machine name | The configuration to be modified | -| :----- |:---------------| -| A | `nebula-graphd.conf`, `nebula-storaged.conf`, `nebula-metad.conf`| -| B | `nebula-graphd.conf`, `nebula-storaged.conf`, `nebula-metad.conf`| -| C | `nebula-graphd.conf`, `nebula-storaged.conf`, `nebula-metad.conf`| -| D | `nebula-graphd.conf`, `nebula-storaged.conf` | -| E | `nebula-graphd.conf`, `nebula-storaged.conf` | +| Machine name | The configuration to be modified | +| :----- | :--------------- | +| A | `nebula-graphd.conf`, `nebula-storaged.conf`, `nebula-metad.conf` | +| B | `nebula-graphd.conf`, `nebula-storaged.conf`, `nebula-metad.conf` | +| C | `nebula-graphd.conf`, `nebula-storaged.conf`, `nebula-metad.conf` | +| D | `nebula-graphd.conf`, `nebula-storaged.conf` | +| E | `nebula-graphd.conf`, `nebula-storaged.conf` | Users can refer to the content of the following configurations, which only show part of the cluster settings. The hidden content uses the default setting so that users can better understand the relationship between the servers in the Nebula Graph cluster. @@ -71,7 +71,7 @@ Users can refer to the content of the following configurations, which only show ``` - `nebula-storaged.conf` - + ```bash ########## networking ########## # Comma separated Meta server addresses @@ -258,13 +258,13 @@ Users can refer to the content of the following configurations, which only show Start the corresponding service on each machine. Descriptions are as follows. -| Machine name |The process to be started | -| :----- |:---------------| -| A | graphd, storaged, metad| -| B | graphd, storaged, metad| -| C | graphd, storaged, metad | -| D | graphd, storaged | -| E | graphd, storaged | +| Machine name | The process to be started | +| :----- | :--------------- | +| A | graphd, storaged, metad | +| B | graphd, storaged, metad | +| C | graphd, storaged, metad | +| D | graphd, storaged | +| E | graphd, storaged | The command to start the Nebula Graph services is as follows. @@ -293,15 +293,10 @@ Welcome to Nebula Graph! | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +------------------+------+----------+--------------+----------------------+------------------------+ | "192.168.10.111" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+------------------+------+----------+--------------+----------------------+------------------------+ | "192.168.10.112" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+------------------+------+----------+--------------+----------------------+------------------------+ | "192.168.10.113" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+------------------+------+----------+--------------+----------------------+------------------------+ | "192.168.10.114" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+------------------+------+----------+--------------+----------------------+------------------------+ | "192.168.10.115" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | -+------------------+------+----------+--------------+----------------------+------------------------+ | "Total" | | | 0 | | | +------------------+------+----------+--------------+----------------------+------------------------+ ``` diff --git a/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/2.deploy-es.md b/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/2.deploy-es.md index 3cdb178c8cb..38f4cfe617a 100644 --- a/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/2.deploy-es.md +++ b/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/2.deploy-es.md @@ -108,9 +108,7 @@ nebula> SHOW TEXT SEARCH CLIENTS; | Host | Port | +-------------+------+ | "127.0.0.1" | 9200 | -+-------------+------+ | "127.0.0.1" | 9200 | -+-------------+------+ | "127.0.0.1" | 9200 | +-------------+------+ ``` diff --git a/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/3.deploy-listener.md b/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/3.deploy-listener.md index 8ae2d6b8c3c..4be1be9d7e1 100644 --- a/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/3.deploy-listener.md +++ b/docs-2.0/4.deployment-and-installation/6.deploy-text-based-index/3.deploy-listener.md @@ -30,21 +30,21 @@ You have to prepare a corresponding configuration file on the machine that you w Most configurations are the same as the configurations of [Storage Service](../../5.configurations-and-logs/1.configurations/4.storage-config.md). This topic only introduces the differences. -| Name | Default value | Description | -| :----------- | :----------------------- | :------------------| -| `daemonize` | `true` | When set to `true`, the process is a daemon process. | -| `pid_file` | `pids_listener/nebula-storaged.pid` | The file that records the process ID. | -| `meta_server_addrs` | - | IP addresses and ports of all Meta services. Multiple Meta services are separated by commas. | -| `local_ip` | - | The local IP address of the Listener service. | -| `port` | - | The listening port of the RPC daemon of the Listener service. | -| `heartbeat_interval_secs` | `10` | The heartbeat interval of the Meta service. The unit is second (s). | -| `listener_path` | `data/listener` | The WAL directory of the Listener. Only one directory is allowed. | -| `data_path` | `data` | For compatibility reasons, this parameter can be ignored. Fill in the default value `data`. | -| `part_man_type` | `memory` | The type of the part manager. Optional values ​​are `memory` and `meta`. | -| `rocksdb_batch_size` | `4096` | The default reserved bytes for batch operations. | -| `rocksdb_block_cache` | `4` | The default block cache size of BlockBasedTable. The unit is Megabyte (MB). | -| `engine_type` | `rocksdb` | The type of the Storage engine, such as `rocksdb`, `memory`, etc. | -| `part_type` | `simple`| The type of the part, such as `simple`, `consensus`, etc. | +| Name | Default value | Description | +| :----------- | :----------------------- | :------------------ | +| `daemonize` | `true` | When set to `true`, the process is a daemon process. | +| `pid_file` | `pids_listener/nebula-storaged.pid` | The file that records the process ID. | +| `meta_server_addrs` | - | IP addresses and ports of all Meta services. Multiple Meta services are separated by commas. | +| `local_ip` | - | The local IP address of the Listener service. | +| `port` | - | The listening port of the RPC daemon of the Listener service. | +| `heartbeat_interval_secs` | `10` | The heartbeat interval of the Meta service. The unit is second (s). | +| `listener_path` | `data/listener` | The WAL directory of the Listener. Only one directory is allowed. | +| `data_path` | `data` | For compatibility reasons, this parameter can be ignored. Fill in the default value `data`. | +| `part_man_type` | `memory` | The type of the part manager. Optional values ​​are `memory` and `meta`. | +| `rocksdb_batch_size` | `4096` | The default reserved bytes for batch operations. | +| `rocksdb_block_cache` | `4` | The default block cache size of BlockBasedTable. The unit is Megabyte (MB). | +| `engine_type` | `rocksdb` | The type of the Storage engine, such as `rocksdb`, `memory`, etc. | +| `part_type` | `simple` | The type of the part, such as `simple`, `consensus`, etc. | !!! note @@ -90,9 +90,7 @@ nebula> SHOW LISTENER; | PartId | Type | Host | Status | +--------+-----------------+-----------------------+----------+ | 1 | "ELASTICSEARCH" | "[192.168.8.5:46780]" | "ONLINE" | -+--------+-----------------+-----------------------+----------+ | 2 | "ELASTICSEARCH" | "[192.168.8.5:46780]" | "ONLINE" | -+--------+-----------------+-----------------------+----------+ | 3 | "ELASTICSEARCH" | "[192.168.8.5:46780]" | "ONLINE" | +--------+-----------------+-----------------------+----------+ ``` diff --git a/docs-2.0/7.data-security/1.authentication/2.management-user.md b/docs-2.0/7.data-security/1.authentication/2.management-user.md index c5abeb24a0d..4958a9fdb6a 100644 --- a/docs-2.0/7.data-security/1.authentication/2.management-user.md +++ b/docs-2.0/7.data-security/1.authentication/2.management-user.md @@ -149,9 +149,7 @@ The `root` user with the **GOD** role can run `SHOW USERS` to list all the users | Account | +-----------+ | "test1" | - +-----------+ | "test2" | - +-----------+ | "test3" | +-----------+ ``` diff --git a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md index fec6d93369f..90b900e129c 100644 --- a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md @@ -63,20 +63,20 @@ To restore data with the BR, do a check of these: ``` [root]# ./bin/br restore full --meta "192.168.*.*:9559" --storage "local:///home/test/backup" --name "BACKUP_2021_07_29_07_55_08" --user "root" ``` - + If the following information is returned, the data is restored successfully. ```bash restore successed ``` The parameters are as follows. - - | Parameter | Required | Default value | Description | Data type | - | --- | --- | --- | --- | --- | - | --concurrent | No | 5 | The maximum number of concurrency for Alibaba Cloud OSS. | int | - | --extra_args | No | None | The parameters of backup storage tools (OSS/HDFS/S3) for backup. | string | - | -h,-help | No | None | Checks help for restoration. | - | - | --meta | Yes | None | The IP address and port of the meta service. | string | - | --name | Yes | None | The backup name. | string | - | --storage | Yes | None | The target storage url of BR backup data. | string | - | --user | Yes | None | The username to login into the hosts where meta/storage service is located. | string | + + | Parameter | Required | Default value | Description | Data type | + | --- | --- | --- | --- | --- | + | --concurrent | No | 5 | The maximum number of concurrency for Alibaba Cloud OSS. | int | + | --extra_args | No | None | The parameters of backup storage tools (OSS/HDFS/S3) for backup. | string | + | -h,-help | No | None | Checks help for restoration. | - | + | --meta | Yes | None | The IP address and port of the meta service. | string | + | --name | Yes | None | The backup name. | string | + | --storage | Yes | None | The target storage url of BR backup data. | string | + | --user | Yes | None | The username to login into the hosts where meta/storage service is located. | string | diff --git a/docs-2.0/7.data-security/3.manage-snapshot.md b/docs-2.0/7.data-security/3.manage-snapshot.md index 64e876b1571..6e892143dd2 100644 --- a/docs-2.0/7.data-security/3.manage-snapshot.md +++ b/docs-2.0/7.data-security/3.manage-snapshot.md @@ -54,18 +54,17 @@ nebula> SHOW SNAPSHOTS; | Name | Status | Hosts | +--------------------------------+---------+------------------+ | "SNAPSHOT_2021_03_09_08_43_12" | "VALID" | "127.0.0.1:9779" | -+--------------------------------+---------+------------------+ | "SNAPSHOT_2021_03_09_09_10_52" | "VALID" | "127.0.0.1:9779" | +--------------------------------+---------+------------------+ ``` The parameters in the return information are described as follows. -|Parameter|Description| -|-|-| -|`Name`|The name of the snapshot directory. The prefix `SNAPSHOT` indicates that the file is a snapshot file, and the suffix indicates the time the snapshot was created (UTC).| -|`Status`|The status of the snapshot. `VALID` indicates that the creation succeeded, while `INVALID` indicates that it failed.| -|`Hosts`|IP addresses and ports of all Storage servers at the time the snapshot was created.| +| Parameter | Description | +|-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `Name` | The name of the snapshot directory. The prefix `SNAPSHOT` indicates that the file is a snapshot file, and the suffix indicates the time the snapshot was created (UTC). | +| `Status` | The status of the snapshot. `VALID` indicates that the creation succeeded, while `INVALID` indicates that it failed. | +| `Hosts` | IP addresses and ports of all Storage servers at the time the snapshot was created. | ## Delete snapshots diff --git a/docs-2.0/8.service-tuning/compaction.md b/docs-2.0/8.service-tuning/compaction.md index 721af63a6fd..64857681e67 100644 --- a/docs-2.0/8.service-tuning/compaction.md +++ b/docs-2.0/8.service-tuning/compaction.md @@ -32,9 +32,7 @@ nebula> SHOW CONFIGS STORAGE; | module | name | type | mode | value | +-----------+-------------------------------------+-------+-----------+------------------------------------------------------------------------------------------------------+ | "STORAGE" | "v" | "int" | "MUTABLE" | 0 | -+-----------+-------------------------------------+-------+-----------+------------------------------------------------------------------------------------------------------+ ... -+-----------+-------------------------------------+-------+-----------+------------------------------------------------------------------------------------------------------+ | "STORAGE" | "rocksdb_column_family_options" | "map" | "MUTABLE" | {max_bytes_for_level_base: "268435456", max_write_buffer_number: "4", write_buffer_size: "67108864"} | +-----------+-------------------------------------+-------+-----------+------------------------------------------------------------------------------------------------------+ ... @@ -48,9 +46,7 @@ nebula> SHOW CONFIGS STORAGE; | module | name | type | mode | value | +-----------+-------------------------------------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+ | "STORAGE" | "v" | "int" | "MUTABLE" | 0 | -+-----------+-------------------------------------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+ ... -+-----------+-------------------------------------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+ | "STORAGE" | "rocksdb_column_family_options" | "map" | "MUTABLE" | {disable_auto_compactions: true, max_bytes_for_level_base: "268435456", max_write_buffer_number: "4", write_buffer_size: "67108864"} | +-----------+-------------------------------------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------------------+ ... diff --git a/docs-2.0/8.service-tuning/improve-query-by-tag-index.md b/docs-2.0/8.service-tuning/improve-query-by-tag-index.md index e63ca267e59..0b7afbde024 100644 --- a/docs-2.0/8.service-tuning/improve-query-by-tag-index.md +++ b/docs-2.0/8.service-tuning/improve-query-by-tag-index.md @@ -23,19 +23,17 @@ nebula> INSERT VERTEX shareholder() VALUES "player101":(); //This example queries all the shareholders. nebula> MATCH (v:shareholder) RETURN v; -+---------------------------------------------------------------------+ -| v | -+---------------------------------------------------------------------+ ++--------------------------------------------------------------------+ +| v | ++--------------------------------------------------------------------+ | ("player100" :player{age: 42, name: "Tim Duncan"} :shareholder{}) | -+---------------------------------------------------------------------+ | ("player101" :player{age: 36, name: "Tony Parker"} :shareholder{}) | -+---------------------------------------------------------------------+ ++--------------------------------------------------------------------+ nebula> LOOKUP ON shareholder; +-------------+ | VertexID | +-------------+ | "player100" | -+-------------+ | "player101" | +-------------+ diff --git a/docs-2.0/8.service-tuning/load-balance.md b/docs-2.0/8.service-tuning/load-balance.md index 0690a409feb..2cb01145ea2 100644 --- a/docs-2.0/8.service-tuning/load-balance.md +++ b/docs-2.0/8.service-tuning/load-balance.md @@ -22,15 +22,10 @@ After you add new storage hosts into the cluster, no partition is deployed on th | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged0" | 9779 | "ONLINE" | 4 | "basketballplayer:4" | "basketballplayer:15" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged1" | 9779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:15" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged2" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:15" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged3" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged4" | 9779 | "ONLINE" | 0 | "No valid partition" | "No valid partition" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "Total" | | | 15 | "basketballplayer:15" | "basketballplayer:45" | +-------------+------+----------+--------------+-----------------------------------+------------------------+ ``` @@ -54,13 +49,9 @@ After you add new storage hosts into the cluster, no partition is deployed on th | balanceId, spaceId:partId, src->dst | status | +--------------------------------------------------------------+-------------------+ | "[1614237867, 11:1, storaged1:9779->storaged3:9779]" | "SUCCEEDED" | - +--------------------------------------------------------------+-------------------+ | "[1614237867, 11:1, storaged2:9779->storaged4:9779]" | "SUCCEEDED" | - +--------------------------------------------------------------+-------------------+ | "[1614237867, 11:2, storaged1:9779->storaged3:9779]" | "SUCCEEDED" | - +--------------------------------------------------------------+-------------------+ ... - +--------------------------------------------------------------+-------------------+ | "Total:22, Succeeded:22, Failed:0, In Progress:0, Invalid:0" | 100 | +--------------------------------------------------------------+-------------------+ ``` @@ -77,15 +68,10 @@ After you add new storage hosts into the cluster, no partition is deployed on th | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged0" | 9779 | "ONLINE" | 4 | "basketballplayer:4" | "basketballplayer:9" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged1" | 9779 | "ONLINE" | 8 | "basketballplayer:8" | "basketballplayer:9" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged2" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:9" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged3" | 9779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:9" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged4" | 9779 | "ONLINE" | 0 | "No valid partition" | "basketballplayer:9" | - +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "Total" | | | 15 | "basketballplayer:15" | "basketballplayer:45" | +-------------+------+----------+--------------+-----------------------------------+------------------------+ ``` @@ -155,15 +141,10 @@ nebula> SHOW HOSTS; | Host | Port | Status | Leader count | Leader distribution | Partition distribution | +-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged0" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:9" | -+-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged1" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:9" | -+-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged2" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:9" | -+-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged3" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:9" | -+-------------+------+----------+--------------+-----------------------------------+------------------------+ | "storaged4" | 9779 | "ONLINE" | 3 | "basketballplayer:3" | "basketballplayer:9" | -+-------------+------+----------+--------------+-----------------------------------+------------------------+ | "Total" | | | 15 | "basketballplayer:15" | "basketballplayer:45" | +-------------+------+----------+--------------+-----------------------------------+------------------------+ ``` diff --git a/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-hive.md b/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-hive.md index 8caaff19af3..c3ef7e03f9f 100644 --- a/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-hive.md +++ b/docs-2.0/nebula-exchange/use-exchange/ex-ug-import-from-hive.md @@ -92,12 +92,12 @@ Analyze the data to create a Schema in Nebula Graph by following these steps: 1. Identify the Schema elements. The Schema elements in the Nebula Graph are shown in the following table. - | Element | Name | Property | - | :--- | :--- | :--- | - | Tag | `player` | `name string, age int` | - | Tag | `team` | `name string` | - | Edge Type | `follow` | `degree int` | - | Edge Type | `serve` | `start_year int, end_year int` | + | Element | Name | Property | + | :--- | :--- | :--- | + | Tag | `player` | `name string, age int` | + | Tag | `team` | `name string` | + | Edge Type | `follow` | `degree int` | + | Edge Type | `serve` | `start_year int, end_year int` | 2. Create a graph space **basketballplayer** in the Nebula Graph and create a Schema as shown below. @@ -107,16 +107,16 @@ Analyze the data to create a Schema in Nebula Graph by following these steps: (partition_num = 10, \ replica_factor = 1, \ vid_type = FIXED_STRING(30)); - + ## Use the graph space basketballplayer nebula> USE basketballplayer; - + ## Create the Tag player nebula> CREATE TAG player(name string, age int); - + ## Create the Tag team nebula> CREATE TAG team(name string); - + ## Create the Edge type follow nebula> CREATE EDGE follow(degree int); diff --git a/docs-2.0/reuse/source_connect-to-nebula-graph.md b/docs-2.0/reuse/source_connect-to-nebula-graph.md index 0e435574de7..be66883cdbc 100644 --- a/docs-2.0/reuse/source_connect-to-nebula-graph.md +++ b/docs-2.0/reuse/source_connect-to-nebula-graph.md @@ -80,7 +80,7 @@ You can find more details in the [Nebula Console Repository](https://github.com/ ## Nebula Console commands -Nebula Console can export CSV file, DOT file, and import too. +Nebula Console can export CSV file, DOT file, and import too. !!! note @@ -129,7 +129,7 @@ nebula> PROFILE FORMAT="dot" GO FROM "player100" OVER follow; ### Importing a testing dataset -The testing dataset is named `nba`. Details about schema and data can be seen by commands `SHOW`. +The testing dataset is named `nba`. Details about schema and data can be seen by commands `SHOW`. Using the following command to import the testing dataset, @@ -154,7 +154,6 @@ nebula> GO FROM "player100" OVER follow; | follow._dst | +-------------+ | "player101" | -+-------------+ | "player125" | +-------------+ Got 2 rows (time spent 2602/3214 us) @@ -165,7 +164,6 @@ Fri, 20 Aug 2021 06:36:05 UTC | follow._dst | +-------------+ | "player101" | -+-------------+ | "player125" | +-------------+ Got 2 rows (time spent 583/849 us) @@ -176,7 +174,6 @@ Fri, 20 Aug 2021 06:36:05 UTC | follow._dst | +-------------+ | "player101" | -+-------------+ | "player125" | +-------------+ Got 2 rows (time spent 496/671 us) @@ -188,7 +185,7 @@ Executed 3 times, (total time spent 3681/4734 us), (average time spent 1227/1578 ### Sleep to wait -Sleep N seconds. +Sleep N seconds. It is usually used when altering schema. Since schema is altered in async way, and take effects in the next heartbeat cycle.