Use Live Search in Graph Visualization

Using the Live Search feature in Graph Studio, you can search the currently displayed graph and add live fuzzy search score to each item. You can then create a Highlight which visually shows the results of the search in the graph immediately.

Perform the following steps to configure and apply Live Search in your graph visualization. The steps assume that a graph is displayed in the visualization panel.
  1. Click Settings on the Visualization panel.
    This opens the Settings dialog.
  2. Switch ON the Enable Live Search toggle.
    This enables the search, adds the search input to the visualization, and allows you to further customize the search. It is important to note that you can only search the graph that is currently displayed in the visualization panel, and not the entire graph as stored in the database.
  3. Select whether you want to search the properties of either Vertices or Edges, or both under Enable Search In.
  4. Select one or more Properties To Search based on what you selected in the previous step.
    Note that if you disable search for any graph element (vertices or edges) for which you already had selected the properties, then those properties will be stored and added back when you enable search again for that graph element.

    The following figure shows an example of configuring Live Search. As seen, Live Search is enabled for the vertex property, country_name.



  5. Optionally, enable Advanced Settings if you wish to fine-tune the search even more and configure one or more of the following options:
    • Location: This determines approximately where in the text property the pattern is expected to be found. For instance, location value 0 indicates that the pattern is matched from the beginning of the text. Location value 1 indicates that the pattern will be matched from the second letter of the text and so on.
    • Distance: This determines how close the match must be to the fuzzy location (specified by location). An exact letter match which is distance characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified, a distance of 1000 would require a perfect match to be within 800 characters of the location to be found using a threshold of 0.8.
    • Min Char Match: The minimum length of the pattern that needs to match.
  6. Close the Settings dialog and rerun the visualization query.

    The search input will be displayed towards the right side of the graph visualization. If you start typing the search keyword, the search will add a score to every vertex or edge, based on the settings and the search match. The Live search score can be viewed inside the tooltip, that can be triggered by right-clicking a vertex or edge. For example:



  7. Add a highlight (in the Highlights tab in the Settings dialog) with interpolation set to Live Search score and other required settings (such as Size, Color, and so on).
    For example:


    Description of live_search_highlight.png follows
    Description of the illustration live_search_highlight.png

    By adding a highlight you can see that the search score affects the vertices (or edges) appearance in the graph as shown in the following example. All vertices that match the search pattern entered in the search input are highlighted as per the configured Highlight settings. Those vertices that have no match (Live search score = zero) are shown grayed out.


    Description of live_search_viz.png follows
    Description of the illustration live_search_viz.png