Updated on 2024-01-04 GMT+08:00

Subgraph Matching

Table 1 Parameter description

Parameter

Mandatory

Description

Type

Value Range

edges

Yes

Edge set of the subgraph to be matched. The vertex ID must be of the size_t type.

String

The value is in standard CSV format. The start and end vertices of an edge are separated by a comma (,), and edges are separated by a newline character (\n). For example, 1,2\n2,3.

vertices

Yes

Label of each vertex on the subgraph to be matched.

String

The value is in standard CSV format. Vertices and their labels are separated by commas (,), and labels are separated by newline characters (\n). For example, 1,BP\n2,FBP\n3,CP.

directed

No

Whether to consider the direction of the graph

Boolean

The value can be true or false. The default value is true.

n

No

Maximum number of subgraphs to be searched for

Integer

The value range is [1,100000]. The default value is 100.

batch_number

No

Number of queries processed in batches each time

Integer

The value range is [1,1000000]. The default value is 10000.

statistics

No

Whether to display the number of all subgraphs that meet the conditions

Boolean

The value can be true or false. The default value is false.

Table 2 response_data parameter description

Parameter

Mandatory

Type

Description

subgraphs

Yes

List

Subgraphs with the same pattern of the pattern_graph. The value is in the [[subgraph1],[subgraph2], ...] format. Each subgraph is in the [vertex1,vertex2, ...] format, where vertex is of the string type. The vertices of each subgraph correspond to those of pattern_graph.

pattern_graph

Yes

List

Graph pattern. The value is in the [vertex1,vertex2, ...] format, where vertex is of the string type.

subgraph_number

No

Integer

Number of matched graphs. When statistics is set to true, the total number of graphs that meet query conditions is displayed.