From 3603e886b82c0f5c6c8c28c24abe011694012283 Mon Sep 17 00:00:00 2001 From: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com> Date: Thu, 12 May 2022 10:03:12 +0800 Subject: [PATCH] optimize explorer (#1352) * optimize explorer * Update docs-2.0/nebula-explorer/ex-ug-query-exploration.md * Update docs-2.0/nebula-explorer/node-filtering.md Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com> --- docs-2.0/nebula-explorer/10.create-schema.md | 2 +- .../nebula-explorer/13.choose-graphspace.md | 4 +-- .../deploy-connect/ex-ug-connect.md | 4 +-- .../nebula-explorer/ex-ug-page-overview.md | 4 +-- .../ex-ug-query-exploration.md | 32 ++++++++++--------- docs-2.0/nebula-explorer/node-filtering.md | 19 ++++------- 6 files changed, 30 insertions(+), 35 deletions(-) diff --git a/docs-2.0/nebula-explorer/10.create-schema.md b/docs-2.0/nebula-explorer/10.create-schema.md index 641612152b4..2442d7ef66c 100644 --- a/docs-2.0/nebula-explorer/10.create-schema.md +++ b/docs-2.0/nebula-explorer/10.create-schema.md @@ -1,6 +1,6 @@ # Create a schema -Before using Nebula Graph to query data, you must have a schema. Explorer allows you to create a schema both using GUI and using commands. +Explorer allows you to create a schema both using GUI and using commands. At the upper right corner of the page, click ![schema](https://docs-cdn.nebula-graph.com.cn/figures/studio-nav-schema.png) to enter the schema creation page. diff --git a/docs-2.0/nebula-explorer/13.choose-graphspace.md b/docs-2.0/nebula-explorer/13.choose-graphspace.md index b5f4639566b..ec7ec207441 100644 --- a/docs-2.0/nebula-explorer/13.choose-graphspace.md +++ b/docs-2.0/nebula-explorer/13.choose-graphspace.md @@ -12,7 +12,7 @@ After connecting to Explorer, the system automatically displays the graph space ![Create_graphspace](https://docs-cdn.nebula-graph.com.cn/figures/create-graphspace_en.png) -If you do not choose a graph space in time after connecting to Explorer, follow the below steps to choose one. +If you want to select a graph space again, follow the below steps to choose one. 1. In the navigation bar on the left side of the Explorer page, click the graph space icon ![graphSpace](https://docs-cdn.nebula-graph.com.cn/figures/nav-graphSpace.png). @@ -20,4 +20,4 @@ If you do not choose a graph space in time after connecting to Explorer, follow !!! note - You can select the same or different graph spaces multiple times, and each selection creates a canvas for the corresponding graph space. \ No newline at end of file + You can select the same or different graph spaces multiple times, and each selection creates a new canvas. diff --git a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md index 729615f49ec..744ad558ee1 100644 --- a/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md +++ b/docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md @@ -41,9 +41,9 @@ To connect Explorer to Nebula Graph, follow these steps: !!! note One session continues for up to 30 minutes. If you do not operate Explorer within 30 minutes, the active session will time out and you must connect to Nebula Graph again. -# Clear connection -When Explorer is still connected to a Nebula Graph database, in the navigation bar on the left side of the page, select **Settings** ![icon](https://docs-cdn.nebula-graph.com.cn/figures/nav-setup.png) > **Clear Connect**. +## Clear connection +When Explorer is still connected to a Nebula Graph database, on the upper right corner of the page, select ![icon](https://docs-cdn.nebula-graph.com.cn/figures/nav-setup.png) > **Clear Connect**. After that, if the **configuration database** page is displayed on the browser, it means that Explorer has successfully disconnected from the Nebula Graph. diff --git a/docs-2.0/nebula-explorer/ex-ug-page-overview.md b/docs-2.0/nebula-explorer/ex-ug-page-overview.md index c21a7e9b062..219cb026f2e 100644 --- a/docs-2.0/nebula-explorer/ex-ug-page-overview.md +++ b/docs-2.0/nebula-explorer/ex-ug-page-overview.md @@ -19,7 +19,6 @@ The Nebula Explorer page consists of three modules top navigation bar, left-side | ![help](https://docs-cdn.nebula-graph.com.cn/figures/navbar-help.png) | Guide and help you in using Nebula Graph. | | ![clear_connection](https://docs-cdn.nebula-graph.com.cn/figures/image-icon10.png) | Show the Nebula Graph version and allow you to disconnect from Nebula Explorer. | - ## Left-side navigation bar !!! note @@ -39,8 +38,7 @@ Click the icons in the left-side navigation bar to import, analyze, and explore | ![snapshot](https://docs-cdn.nebula-graph.com.cn/figures/snapshot-history.png) | View historical snapshots. For more information, see [Canvas snapshots](canvas-operations/canvas-snapshot.md). | | ![graphSpace](https://docs-cdn.nebula-graph.com.cn/figures/nav-graphSpace.png) | View all graph spaces. Click a graph space to create a canvas corresponding to it. For more information, see [Choose graph spaces](13.choose-graphspace.md). | | ![Help](https://docs-cdn.nebula-graph.com.cn/figures/nav-help.png) | View Explorer documents and Nebula Graph forum. | -| ![Setup](https://docs-cdn.nebula-graph.com.cn/figures/nav-setup2.png) | View your account and shortcuts, edit languages, limit returned results, and clear connection.| - +| ![Setup](https://docs-cdn.nebula-graph.com.cn/figures/nav-setup2.png) | View your account, explorer version and shortcuts, limit returned results.| ## Canvas diff --git a/docs-2.0/nebula-explorer/ex-ug-query-exploration.md b/docs-2.0/nebula-explorer/ex-ug-query-exploration.md index 7c3668437f0..51e2ee484a8 100644 --- a/docs-2.0/nebula-explorer/ex-ug-query-exploration.md +++ b/docs-2.0/nebula-explorer/ex-ug-query-exploration.md @@ -1,55 +1,57 @@ # Start querying -!!! note +To explore graph data, users need to query some initial data, and based on these initial data, can further analysis and filtering. This topic describes how to query initial data. + +## Prerequisites - Select and click a target graph space before querying data. For more information, see [Choose graph spaces](13.choose-graphspace.md). +Select a target graph space before querying data. For more information, see [Choose graph spaces](13.choose-graphspace.md). !!! compatibility "Legacy version compatibility" For versions of Nebula Graph below 3.0.0, you need to create an index before querying data. For more information, see [Create an index](../3.ngql-guide/14.native-index-statements/1.create-native-index.md). -Click the **Start** ![query](https://docs-cdn.nebula-graph.com.cn/figures/nav-query2.png) icon to query target data on the Explorer page. The queried data will be displayed on the canvas. You have the following ways to query data: +## Steps + +Click the **Start** ![query](https://docs-cdn.nebula-graph.com.cn/figures/nav-query2.png) icon to query target data on the `Explorer` page. The queried data will be displayed on the canvas. You have the following ways to query data: - Query by VID - Query by Tag - Query Subgraph -## Query by VID +### Query by VID -You can enter VIDs to query the target vertices and then start data exploration and analysis based on the vertices. +You can enter VIDs to query the target vertices. There are three ways to generate VIDs: Manual input, Random import, and File import. !!! note - - The VIDs entered or imported must exist in the graph space you have selected. - - Only one VID per row is supported in the querying area. + Only one VID per row is supported in the querying area. Press `Enter` to separate the VIDs. The following GIF shows how to query data using the `basketballplayer` graph space and related data. ![VID QUERY](https://docs-cdn.nebula-graph.com.cn/figures/vid-query-22-04-06_en.gif) -## Query by Tag +### Query by Tag + +You can select the tag and corresponding index to query the target vertices, and set the number of results limit or filter conditions. !!! note Make sure that the corresponding tags and indexes exist in the graph space when querying by tag. For more information, [Create tags](../3.ngql-guide/10.tag-statements/1.create-tag.md) and [Create indexes](../3.ngql-guide/14.native-index-statements/1.create-native-index.md). -You can limit the number of results and filter the results. - The following example queries 10 players whose age is greater than 30 years old and not equal to 40 years old. ![tag](https://docs-cdn.nebula-graph.com.cn/figures/query_tag.png) -## Query Subgraph - -When querying subgraphs, you must enter one or more VIDs. You can specify the number of steps, edge types, and the direction of inflow and outflow of the subgraph. +### Query Subgraph -The following is an example of VIDs `Kings` and `Suns`, step number `2`, and incoming edge types with a VID value of 101, the number of steps of 4, and edge types of `server` and `like`. +When querying subgraphs, you can specify the number of steps, edge types, and the direction of inflow and outflow of the subgraph. VID is mandatory. The default value of optional steps is 1, and the default value of optional edge type is all. !!! note When multiple VIDs are entered, the VIDs are separated by the Enter key. -![tag](https://docs-cdn.nebula-graph.com.cn/figures/query_subgraph.png) +The following is an example of VIDs `Kings` and `Suns`, step number `2`, and incoming edge types with a VID value of 101, the number of steps of 4, and edge types of `server` and `like`. +![tag](https://docs-cdn.nebula-graph.com.cn/figures/query_subgraph.png) \ No newline at end of file diff --git a/docs-2.0/nebula-explorer/node-filtering.md b/docs-2.0/nebula-explorer/node-filtering.md index 7a84e3957ba..9d90d884c5a 100644 --- a/docs-2.0/nebula-explorer/node-filtering.md +++ b/docs-2.0/nebula-explorer/node-filtering.md @@ -20,11 +20,13 @@ Make sure that there are vertices on the canvas. For more information, see [Star - When filtering vertices and associated edges by **filter conditions**. - - Each set of filter conditions is only for the data with the target tag. The filtering conditions include Tag, Property, Operator, and Value. If the conditions are met, and the corresponding vertices will be automatically selected. If the conditions are not met, the corresponding vertices can be set to be **hidden** or **turning gray**. The vertices with other tags are not affected. + - Each set of filter conditions is only for the data with the target tag. The filtering conditions include Tag, Property, Operator, and Value. If the conditions are met, and the corresponding vertices will be automatically selected. If the conditions are not met, the corresponding vertices can be set to be **hidden** or **turning gray**. The vertices with other tags are not affected. - - If the filter conditions include a selected tag (in gray), the corresponding data will not be displayed on the canvas. + - The filtering priority by **Tag** is the highest. If the filter conditions include a selected tag (in gray), the corresponding data will not be displayed on the canvas. -- Each time you perform **Vertex Filter**, only one tag can be selected. If you want to filter data based on more tags, conduct **Add New Filter** multiple times. + - Each time you perform **Vertex Filter**, only one tag can be selected. If you want to filter data based on more tags, conduct **Add New Filter** multiple times. + + - The same tag cannot be filtered multiple times. Only the result of the first filtering is displayed. ## Example @@ -46,15 +48,8 @@ Make sure that there are vertices on the canvas. For more information, see [Star 2. Click **Add New Filter**, and set filter conditions (The values in the example are `player`, `age`, `>`, and `33`). -3. (Optional) Repeat the second step to add more sets of filtering conditions (This example adds only one set of filter conditions). - -4. Click **Hide** to hide the vertices or click **Grayscale** to gray the vertices that do not meet the filter conditions (**Grayscale** is set in this example). - -2. Click **Add New Filter** and then fill in the following values as shown below. - -3. (Optional) Repeat the second step to add multiple filtering conditions. +3. Click **Grayscale** to gray the vertices that do not meet the filter conditions. 4. Turn on the **Apply Filter** button. - ![vertex filtering](https://docs-cdn.nebula-graph.com.cn/figures/vertex-filtering-example2_en.png) - + ![vertex filtering](https://docs-cdn.nebula-graph.com.cn/figures/vertex-filtering-example2_en.png) \ No newline at end of file