Skip to content

Manage graphs

This topic introduces how to manage graphs in NebulaGraph Studio.

  1. On the Database page, click the name of the database that you created to view the database details.
  2. On the left-side navigation pane of the database details page, click Graph under Data.
  3. Follow the steps below to create, delete, manage indexes on graphs, and view statistics about graphs.

Prerequisites

A graph type is created. For more information, see Create a graph type.

Create a graph

  1. In the top navigation bar, click the SCHEMA tab.
  2. In the left-side navigation pane, select the schema where you want to create the graph and click Graph.
  3. In the upper-right corner, click the Create Graph button.
  4. In the dialog box that appears, select a graph type from the drop-down list and enter a name for the graph.
  5. Click OK. The newly created graph is displayed on the Graph List page.

Delete a graph

  1. In the top navigation bar, click the SCHEMA tab.
  2. In the left-side navigation pane, select the schema where the graph you want to delete is located and then click Graph.
  3. On the Graph List page that appears on the right, select the graph you want to delete.
  4. Click more actions icon at the right of the graph and select Delete.
  5. In the confirmation dialog box that appears, click Delete.

Manage indexes on graphs

NebulaGraph Studio allows you to manage indexes on graphs, including creating, deleting, and rebuilding indexes.

Create an index

  1. In the top navigation bar, click the SCHEMA tab.
  2. In the left-side navigation pane, select the schema where the graph you want to create an index on is located and then click Graph.
  3. On the Graph List page that appears on the right, select and click the target graph.
  4. On the Index tab, click the Create Index button. For each index, specify the following information:
    • Index Name: The name of the index.
    • On: The node type or edge type on which the index is created.
    • Index Properties: The list of properties based on which the index is created. Specify at least one property. For each property, specify the following information:
      • Property Name: The name of the property.
      • Sort: The sorting order of property values in the index. Valid values: ASC and DESC.
  5. Click OK to create the index.

Create an index

For more information about the GQL syntax for creating indexes, see CREATE INDEX. (Initial password: Nebula.123)

Delete an index

  1. In the top navigation bar, click the SCHEMA tab.
  2. In the left-side navigation pane, select the schema where the graph you want to delete an index for is located and then click Graph.
  3. On the Graph List page that appears on the right, select and click the target graph.
  4. On the Index tab, select the index you want to delete.
  5. Click the delete icon at the right of the index to delete it.

Rebuild an index

  1. In the top navigation bar, click the SCHEMA tab.
  2. In the left-side navigation pane, select the schema where the graph you want to rebuild an index for is located and then click Graph.
  3. On the Graph List page that appears on the right, select and click the target graph.
  4. On the Index tab, select the index you want to rebuild.
  5. Click the Repair button to rebuild the index data.

View statistics about a graph

  1. In the top navigation bar, click the SCHEMA tab.
  2. In the left-side navigation pane, select the schema where the graph you want to view statistics about is located and then click Graph.
  3. On the Graph List page that appears on the right, select and click the target graph.
  4. Click the Statistic tab.
  5. To view the latest statistics, click the Execute Stats button to update the statistics about the graph. The statistics provide information about the number of nodes and edges in the graph.