From f0a27b36302a97f80aacd6d28c49fd3770998a26 Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Thu, 7 Apr 2022 16:04:01 +0800 Subject: [PATCH 1/2] visual query config updates --- docs-2.0/nebula-explorer/12.query-visually.md | 53 ++++++++++++++----- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/docs-2.0/nebula-explorer/12.query-visually.md b/docs-2.0/nebula-explorer/12.query-visually.md index e086956b4c2..712eadc191d 100644 --- a/docs-2.0/nebula-explorer/12.query-visually.md +++ b/docs-2.0/nebula-explorer/12.query-visually.md @@ -33,6 +33,35 @@ On the page, the descriptions of other icons are as follows. | nGQL | Click **nGQL** to view the statement corresponding to the query pattern. | | Run Query | Click **Run Query** to display the query results visually on the canvas. | +## Configurations + +### Vertex configurations + +![vertex_confi](https://docs-cdn.nebula-graph.com.cn/figures/vertex-config_en.png) + +- In the **Tag Name** dialog box, set multiple tags to query for multi-tag vertices. + +- In the **Filter** section, add one or more sets of filter conditions, including vertex properties, operators, and property values. + +!!! enterpriseonly + + When setting multiple tags in the **Tag Name** dialog box, only the Nebula Graph Enterprise Edition supports setting **filter conditions** to query data. + +### Edge configurations + +![vertex_confi](https://docs-cdn.nebula-graph.com.cn/figures/edge-config_en.png) + +- In the **Edge Type** dialog box, you can set one or multiple edge types to query for vertices linked with the edge types. + +- In the **Direction** dialog box, set the edge direction between two vertices, including Outgoing, Incoming, and Bidirect. + +- Select **Single** to set a fixed-length path; Select **Range** to set a variable-length. + +- In the **Filter** section, add one or more sets of filter conditions, including edge properties, operators, and property values. + +!!! enterpriseonly + + When setting multiple edge types in the **Edge Type** dialog box, only the Nebula Graph Enterprise Edition supports setting **filter conditions** to query data. ## Examples @@ -46,12 +75,12 @@ Find out players who follow each other with Yao Ming and older than 35, and whic 2. Configure filter conditions. - 1. Set the filter condition for the first player to `player.name == Yao Ming`. - 2. Set the edge type of the edge between the first and second players to `follow`, set the direction to `Bidirect`, and the steps to `1`. - 3. Set the filter condition for the second player to `player.age > 35`. - 4. Set the edge type of the edge between the second player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. - 5. Click ![Output](https://docs-cdn.nebula-graph.com.cn/figures/visual-nav-output.png) to select the second player, the team, and the serve edge between them. - 6. Click the **Query Pattern** frame, and set the **Limit Number** to `6`. + 1. Set the filter condition for the first player to `player.name == Yao Ming`. + 2. Set the edge type of the edge between the first and second players to `follow`, set the direction to `Bidirect`, and the steps to `1`. + 3. Set the filter condition for the second player to `player.age > 35`. + 4. Set the edge type of the edge between the second player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. + 5. Click ![Output](https://docs-cdn.nebula-graph.com.cn/figures/visual-nav-output.png) to select the second player, the team, and the serve edge between them. + 6. Click the **Query Pattern** frame, and set the **Limit Number** to `6`. 3. Click **Run Query**, and the system displays 6 query patterns on the canvas. @@ -65,11 +94,11 @@ Find out what teams two mutually-following players are loyal to and query for al 1. Create a query pattern by dragging and dropping Tags to the panel (3 players and 1 team). 2. Configure filter conditions. - 1. Set the edge type of the edge between the first and second players to `follow`, set the direction to `Bidirect`, and the steps to `1`. - 2. Set the edge type of the edge between the first player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. - 3. Set the edge type of the edge between the second player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. - 4. Set the filter conditions for the third player to `player.age > 30`. - 5. Set the edge type of the edge between the third player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. - 6. Click ![Output](https://docs-cdn.nebula-graph.com.cn/figures/visual-nav-output.png) to select the third player, the team, and the serve edge between them. + 1. Set the edge type of the edge between the first and second players to `follow`, set the direction to `Bidirect`, and the steps to `1`. + 2. Set the edge type of the edge between the first player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. + 3. Set the edge type of the edge between the second player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. + 4. Set the filter conditions for the third player to `player.age > 30`. + 5. Set the edge type of the edge between the third player and the team to `serve`, the direction to `Outgoing`, and the steps to `1`. + 6. Click ![Output](https://docs-cdn.nebula-graph.com.cn/figures/visual-nav-output.png) to select the third player, the team, and the serve edge between them. 3. Click **Run Query**. From c1fa90f60a33754bbfd386eecc1ba84a66d49a9e Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Fri, 15 Apr 2022 18:11:18 +0800 Subject: [PATCH 2/2] add beta desc & other changes --- docs-2.0/nebula-explorer/12.query-visually.md | 44 ++++++++++++++----- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/docs-2.0/nebula-explorer/12.query-visually.md b/docs-2.0/nebula-explorer/12.query-visually.md index 712eadc191d..2c7f4b20dff 100644 --- a/docs-2.0/nebula-explorer/12.query-visually.md +++ b/docs-2.0/nebula-explorer/12.query-visually.md @@ -2,14 +2,20 @@ The Visual Query feature uses a visual representation to express related requests. It allows you to create query scenarios to look up the desired data and view the corresponding statements. You can construct visual query statements by simply dragging and dropping, and then the system displays the query results on the query panel. +!!! compatibility + + The Visual Query feature is not compatible with Nebula Graph versions below 3.0.0. + + +!!! note + + Currently, the Visual Query feature is still in beta. + ## Prerequisite - You have choosen a graph space. For details, see [Choose graph spaces](13.choose-graphspace.md). - You have created indexes for particular queries. For details, see [Note](../3.ngql-guide/7.general-query-statements/2.match.md) and [CREATE INDEX](../3.ngql-guide/14.native-index-statements/1.create-native-index.md). -!!! compatibility - - The Visual Query feature is not compatible with Nebula Graph versions below 3.0.0. ## Steps @@ -17,7 +23,7 @@ At the top of the Explorer page, click **Visual Query** to enter the visual quer ## Page elements -![visual_overview](https://docs-cdn.nebula-graph.com.cn/figures/visual-overview_en.png) +![visual_overview](https://docs-cdn.nebula-graph.com.cn/figures/visual-query-beta_2022-04-15_15-40-07_en.png) On the left side of the **Visual Query** page, all the Tag(s) corresponding to the graph space (e.g.player and team) and the Tag named **Any Tag** are displayed. You can query vertices without tags by the Tag named **Any Tag**. @@ -39,9 +45,17 @@ On the page, the descriptions of other icons are as follows. ![vertex_confi](https://docs-cdn.nebula-graph.com.cn/figures/vertex-config_en.png) -- In the **Tag Name** dialog box, set multiple tags to query for multi-tag vertices. +- **Tag Name**: Set zero, one, or multiple tags. + + !!! note + + One vertex can have zero or multiple tags: -- In the **Filter** section, add one or more sets of filter conditions, including vertex properties, operators, and property values. + - When 0 tag is set, query the vertex without tags. + - When 1 tag is set, query the vertex with that tag. + - When multiple tags are set, query the vertex that has all the tags you set. + +- **Filter**: Add one or more sets of filter conditions, including vertex properties, operators, and property values. !!! enterpriseonly @@ -51,13 +65,23 @@ On the page, the descriptions of other icons are as follows. ![vertex_confi](https://docs-cdn.nebula-graph.com.cn/figures/edge-config_en.png) -- In the **Edge Type** dialog box, you can set one or multiple edge types to query for vertices linked with the edge types. +- **Edge Type**: Set one or multiple edge types. + + !!! note + + One edge have one and only one edge type: + + - When one edge type is set, query the edge with that edge type. + + - When multiple edge types are set, query the edge that has any of the edge types you set. + +- **Direction**: Set the edge direction between two vertices, including Outgoing, Incoming, and Bidirect. -- In the **Direction** dialog box, set the edge direction between two vertices, including Outgoing, Incoming, and Bidirect. +- **Single**: Set a fixed-length path. -- Select **Single** to set a fixed-length path; Select **Range** to set a variable-length. +- **Range**: Set a variable-length. -- In the **Filter** section, add one or more sets of filter conditions, including edge properties, operators, and property values. +- **Filter**: Add one or more sets of filter conditions, including edge properties, operators, and property values. !!! enterpriseonly