imbajin commented on code in PR #415:
URL:
https://github.com/apache/incubator-hugegraph-doc/pull/415#discussion_r2444619529
##########
content/cn/docs/clients/hugegraph-client.md:
##########
@@ -455,6 +456,39 @@ Edge knows1 = marko.addEdge("knows", vadas, "city",
"Beijing");
**注意:当 frequency 为 multiple 时必须要设置 sortKeys 对应属性类型的值。**
-### 4 简单示例
+### 4 图管理
+client支持一个物理部署中多个 GraphSpace,每个 GraphSpace 下可以含多个图(graph)。
+- 兼容:不指定 GraphSpace 时,默认使用 "DEFAULT" 空间
-简单示例见[HugeGraph-Client](/cn/docs/quickstart/client/hugegraph-client)
+#### 4.1 创建GraphSpace
+
+```java
+GraphSpaceManager spaceManager = hugeClient.graphSpace();
+
+// 定义 GraphSpace 配置
+GraphSpace graphSpace = new GraphSpace();
+graphSpace.setName("myGraphSpace");
+graphSpace.setDescription("Business data graph space");
+graphSpace.setMaxGraphNumber(10); // 最大图数量
+graphSpace.setMaxRoleNumber(100); // 最大角色数量
+
+// 创建 GraphSpace
+spaceManager.createGraphSpace(graphSpace);
+```
+#### 4.2 GraphSpace 接口汇总
+
+| category | interface | description
|
+|----------|------------------------|------------------------------------------|
+| 查询 | listGraphSpace() | 获取所有 GraphSpace 列表 |
+| | getGraphSpace(String name) | 获取指定 GraphSpace
|
+| | space.getName() | 获取 GraphSpace 名称 |
+| 更新 | space.setDescription(String description) | 修改 GraphSpace 描述信息
|
Review Comment:
‼️ **中英文接口不一致**: 英文版的接口表格更完整,中文版缺少以下接口:
- `space.getDescription()` - 获取 GraphSpace 描述
- `space.getGraphNumber()` - 获取 GraphSpace 下的图数量
- `removeGraphSpace(String name, boolean force)` - 强制删除 GraphSpace
建议补充这些接口以保持中英文文档一致性。
##########
content/cn/docs/quickstart/client/hugegraph-client.md:
##########
@@ -78,7 +78,8 @@ public class SingleExample {
public static void main(String[] args) throws IOException {
// If connect failed will throw a exception.
- HugeClient hugeClient = HugeClient.builder("http://localhost:8080",
+ HugeClient hugeClient = HugeClient.builder("http://127.0.0.1:8080",
Review Comment:
⚠️ **地址格式不一致**: 这里改成了 `127.0.0.1`,但中文版的 BatchExample 仍使用 `localhost`。
建议统一使用 `localhost` 以保持文档一致性,因为它更易读且是通用的写法。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]