图引擎服务 GES-批量新建索引:请求示例

时间:2023-11-27 16:21:08

请求示例

一次性新建多个复合索引,索引名称分别为vertexIndex,edgeIndex,useridIndex。

POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/indices/action?action_id=batch-build
{
    "indices": [
        {
            "indexName": "vertexIndex",
            "indexType": "GlobalCompositeVertexIndex",
            "hasLabel": true,
            "indexProperty": []
        },
        {
            "indexName": "edgeIndex",
            "indexType": "GlobalCompositeEdgeIndex",
            "hasLabel": true,
            "indexProperty": []
        },
	{
            "indexName": "useridIndex",
            "indexType": "GlobalCompositeEdgeIndex",
            "hasLabel": true,
            "indexProperty": ["userid"]
        }
    ]
}

SERVER_URL:图的访问地址,取值请参考业务面API使用限制

support.huaweicloud.com/api-ges/ges_03_0490.html