Graph Exploration
Handful graph exploration tools facilitate your analysis.
Multi-label graphs do not support graph exploration.
Path Extension
Filters are added to query APIs to search for the desired k-hop vertices or edges. For details about APIs for filtered queries, see Filtered Query V2.
In the Path Extension area on the left of the GES graph editor, set the following parameters:
- Start Vertex: IDs of start vertices. You can use any of the following methods to query the vertices:
- Press and hold Shift and drag a rectangle using the left mouse button to select desired vertices, right-click a vertex, and choose Set as Path Start from the shortcut menu. The Path Extension will be displayed. The IDs of the selected vertices are automatically filled in the Start Vertex box. In this box, you can add or delete vertex IDs. After you finish selecting, click . The query result is displayed on the canvas.
Figure 1 Selecting start vertices
- Random selection: Click Random next to the start vertex box. The system automatically selects vertices in the graph and enters vertex IDs. You can add or delete vertex IDs in the box. After you finish selecting, click . The query result is displayed on the canvas.
- Specifying one start vertex: Enter the ID of a vertex in the text box and press Enter.
- Specifying a batch of start vertices: Enter IDs of desired vertices in the text box and separate them with commas (,). Then, press Enter. A window is displayed when you enter many vertex IDs so you can view them clearly.
Do not enter the same vertex ID repeatedly or an empty value. If the entered vertex ID name contains commas (,), replace the commas with ",".
- Press and hold Shift and drag a rectangle using the left mouse button to select desired vertices, right-click a vertex, and choose Set as Path Start from the shortcut menu. The Path Extension will be displayed. The IDs of the selected vertices are automatically filled in the Start Vertex box. In this box, you can add or delete vertex IDs. After you finish selecting, click . The query result is displayed on the canvas.
- Search Criteria: Each row in the list corresponds to a query type and criterion of each hop. If there are more hops than criteria, the criteria will be repeated.
Figure 2 Search criteria
Refer to the following description to set the search criteria:- Hop count: Number of search criteria.
- Search criterion: Each hop has a search criterion. Click a search statement text box. The Search Settings window is displayed. Enter a search statement.
The following search criteria operators are available:
has: A property key or the value of a property key must be contained.
hasLabel: The label value must be one of the specified values.
and: Conditions A and B (can be nested) must be met.
or: Either condition A or B (can be nested) must be met.
Figure 3 Search settings
- To view a sample criterion, double-click a blank text box. Regular search statements are as follows:
has(PropertyName): Search for a vertex that has PropertyName.
has(PropertyName, PropertyValue): Search for a vertex that has a property whose name is PropertyValue.
hasLabel(LabelName1,LabelName2): Search for a vertex that has a label whose value is LabelName1 or LabelName2
or(has('name', 'peter'), has('age', '30')): Search for a vertex whose name is Peter or age is 30.
and(has('person'),or(has('name','peter'),has('age','30')): Search for a vertex whose name is peter and age is 30.
- If there is only one search criterion, the delete, up, and down buttons are grayed out. The first criterion cannot be upshifted, and the last criterion cannot be downshifted. The maximum number of search criteria is 20 (that is, the maximum number of hops).
- To view a sample criterion, double-click a blank text box. Regular search statements are as follows:
- Show path process: Whether the vertices that are not on the final path will be displayed. This is disabled by default.
- Advanced Settings: You can set the expansion strategy here.
Currently the following traversal methods are available for graph expansion:
- ShortestPath: This method traverses all the shortest paths from the start vertex to every vertex in the graph. This effectively suppresses the exponential growth of the query volume in multi-hop queries.
- Walk: Duplicate vertices are not filtered during traversal.
As shown in the figure, the third-hop neighbor of vertex a is queried.
If you use the walk method, the paths are: a->c->a->b, a->c->d->f, a->c->d->c, and a->c->a->c.
Vertices a and c appear repeatedly in the paths such as a->c->a->b and a->c->d->c. Using ShortestPath can reduce duplicate paths, speed up the query process, and reduce the number of queries in this process.
For ShortestPath, the query process generates the a->c->d->f path only.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot