Skip to content
Permalink
Browse files
Merge "hugegraph-1153 batch query vertices by ids"
  • Loading branch information
zhoney authored and iCode committed Mar 12, 2018
2 parents f1d870f + 3138b91 commit fdf394875f36711327c25ed2e394da33b9d28860
Showing 1 changed file with 40 additions and 1 deletion.
@@ -1531,7 +1531,10 @@ localhost:8080/graphs/hugegraph/traversers/shortestpath?source=1&target=12345&ma

### 4.2 K-out

功能:根据起始顶点、方向、边的类型(可选)和深度depth,查找从起始顶点出发恰好depth步可达的顶点
功能:根据起始顶点、方向、边的类型(可选)和深度depth,查找从起始顶点出发恰好depth步可达的顶点.

> 参数nearest,默认为true,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;
nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环)
#### 方法

@@ -1620,4 +1623,40 @@ localhost:8080/graphs/hugegraph/traversers/kneighbor?source=1&depth=5&direction=
......
]
}
```

### 4.4 批量查询顶点

功能:根据顶点的id列表,批量查询顶点

#### 方法

```
GET
```

#### Url

```
localhost:8080/graphs/hugegraph/traversers/vertices?ids="5:java-1"&ids="5:java-2"&ids="5:java-3"&ids="5:java-4"&ids="5:java-5"
```

##### Response Status

```
200
```

##### Response Body

```
{
"vertices":[
{"id": "5:java-1", "label": "book", "type": "vertex", "properties":{"name":[{"id": "5:java-1>name",…},
{"id": "5:java-2", "label": "book", "type": "vertex", "properties":{"name":[{"id": "5:java-2>name",…},
{"id": "5:java-3", "label": "book", "type": "vertex", "properties":{"name":[{"id": "5:java-3>name",…},
{"id": "5:java-4", "label": "book", "type": "vertex", "properties":{"name":[{"id": "5:java-4>name",…},
{"id": "5:java-5", "label": "book", "type": "vertex", "properties":{"name":[{"id": "5:java-5>name",…}
]
}
```

0 comments on commit fdf3948

Please sign in to comment.