Expand Vertices Using Smart Expand

Smart Expand allows you to expand vertices based on specified conditions for properties of navigation and destination vertices or edges.

You can configure Smart Expand on a graph visualization as described in the following steps:

  1. Click Settings on the Visualization panel.
    This opens the Settings dialog.
  2. Click the Smart Explorer tab and click New Smart Explorer.
    The New Smart Explorer window opens.
  3. Set the Conditions for field to Smart Expand.
  4. Enter a Name.
  5. Optionally, select the Maximum Hops count.
    This value determines the maximum path length. Smart Expand does not return vertices or edges that are in any path longer than this path length. The default value is infinite.
  6. Optionally, click add icon to add Destination Conditions to identify the destination vertices or edges when expanding a selected vertex.

    Destination conditions are conditions that you apply to the last vertex or edge in the path. It does not apply to the vertices selected for expand.

    A row to create a new condition appears as shown:

    Description of smart_expand.png follows
    Description of the illustration smart_expand.png

    Each condition includes the following options:

    • target vertex or edge element that the navigation condition applies to
    • property of the target element
    • operator to apply (such as, =, <, > and so on)
    • value to be fulfilled for the operator and property

    It uses numeric comparison if the property value is convertible to number and lexicographic comparison otherwise.

    Repeat this step to add as many destination conditions as required.

  7. Optionally, if there are multiple destination conditions, then join your conditions by clicking Match All or Match Any as required.
  8. Optionally, click add icon to add one or more Navigation Conditions that need to be fulfilled when expanding a vertex.

    Note the following:

    • Navigation conditions are conditions applied to the vertices or edges that are not the origin vertex or the destination vertex, but those that are on a path that connects the origin and destination vertex.
    • The conditions that you specify are applied to the vertices or edges that are on the path of your expand. It does not apply to the vertices selected for expand.
    The options for adding a navigation condition and joining multiple conditions is same as described in the preceding steps for destination conditions.
  9. Click Create.
  10. Click X on the top-right to close the Settings dialog.
  11. Click the Expand drop-down list in the Exploration toolbar to view the list of Smart Expand names.
  12. Select the required Smart Expand Name.
  13. Select a specific vertex or multiple vertices on the graph and click the Expand action on the graph manipulation toolbar.

    Tip:

    Alternatively, you can apply Smart Expand from the tool tip. You can display the tool tip by using a right-click on the selected vertex.
    Smart Expand fetches a shortest path to the vertex or vertices that are within the specified maximum path length, fulfilling the navigation and destination conditions for the selected vertex or vertices.

    For instance, consider the following simple graph visualization which shows all outgoing transactions from account_id=1. The example then applies the Smart Expand configuration shown in the figure in step-6 on the vertex account 644. As per the configuration, Smart Expand fetches all vertices within one hop that meet the destination condition ACCOUNT_ID > 100 and the navigation edge condition AMOUNT > 1000 .

    Description of smart_expand_graph.png follows
    Description of the illustration smart_expand_graph.png

    Note:

    If you do not configure the maximum hop count, navigation or destination conditions for Smart Expand, then the graph expands on the default infinite hop count value.