我要评分
获取效率
正确性
完整性
易理解

SaveGraph

API Definition

int SaveGraph(const char *path) const;

Function

Saves a graph index to a specified path in a single process.

Parameters

Parameter

Description

Data Type

Value Range

path

Path for storing the graph index.

const char *

The length must be less than 199 characters.

Return Value

Data Type

Description

int

If the parameter value exceeds the value range or an I/O problem such as incorrect save path occurs, -1 is returned. If this API is called before the Add API is called, -1 is returned. If this API is called after BuildSearcher or Load/Deserialize/LoadGraph is called, -1 is returned. Otherwise, 0 is returned.