diff --git a/docs-2.0/nebula-explorer/ex-ug-query-exploration.md b/docs-2.0/nebula-explorer/ex-ug-query-exploration.md new file mode 100644 index 00000000000..94490489d7f --- /dev/null +++ b/docs-2.0/nebula-explorer/ex-ug-query-exploration.md @@ -0,0 +1,55 @@ +# Start querying + +!!! note + + Select and click a target graph space before querying data. + +!!! 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](figs/nav-query2.png) icon to query target data. 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 + +You can enter VIDs to query the target vertices and then start data exploration and analysis based on the 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. + +The following GIF shows how to query data using the `nba` graph space and related data. + +![VID QUERY](figs/vid_query.gif) + +## Query by Tag + +!!! 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](figs/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. + +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`. + +!!! note + + When multiple VIDs are entered, the VIDs are separated by the Enter key. + +![tag](figs/query_subgraph.png) + diff --git a/docs-2.0/nebula-explorer/operation-guide/ex-ug-query-exploration.md b/docs-2.0/nebula-explorer/operation-guide/ex-ug-query-exploration.md deleted file mode 100644 index ba92e70fed8..00000000000 --- a/docs-2.0/nebula-explorer/operation-guide/ex-ug-query-exploration.md +++ /dev/null @@ -1,26 +0,0 @@ -# Start query - -In Explorer, you can choose the following query methods to display data: - -- VID -- Tag -- Subgraph - -## Query by VID - -You can query data by entering the VIDs or other data for VID generation, and a row only supports one data. It also supports random import of data and file import of data. After confirming the addition, the data will be displayed in the canvas. An example is given below: - -![VID](../figs/ex-ug-009.png) - - -## Query by Tag - -The required values are Tag and Index. You can limit the number of output results and filter the results. The following query 10 players whose age is greater than 30 years old and not equal to 40 years old, examples are as follows: - -![Tag](../figs/ex-ug-011.png) - -## Query by Subgraph - -The required value is VID. You can view the subgraph of one or more vertexes, and you can specify the number of steps, edge types, and the direction of inflow and outflow of the subgraph. The following is an example of an incoming edge with a VID value of 101, the number of steps of 4, and edge types of `server` and `like`: - -![Query](../figs/ex-ug-012.png) \ No newline at end of file