Skip to content

Commit

Permalink
optimize explorer (#1352)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
cooper-lzy and abby-cyber committed May 12, 2022
1 parent 5ab42d0 commit 3603e88
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 35 deletions.
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/10.create-schema.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs-2.0/nebula-explorer/13.choose-graphspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ 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).

2. Choose the target graph space.

!!! note

You can select the same or different graph spaces multiple times, and each selection creates a canvas for the corresponding graph space.
You can select the same or different graph spaces multiple times, and each selection creates a new canvas.
4 changes: 2 additions & 2 deletions docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 1 addition & 3 deletions docs-2.0/nebula-explorer/ex-ug-page-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
32 changes: 17 additions & 15 deletions docs-2.0/nebula-explorer/ex-ug-query-exploration.md
Original file line number Diff line number Diff line change
@@ -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)
19 changes: 7 additions & 12 deletions docs-2.0/nebula-explorer/node-filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

0 comments on commit 3603e88

Please sign in to comment.