-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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 <[email protected]>
- Loading branch information
1 parent
5ab42d0
commit 3603e88
Showing
6 changed files
with
30 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters