From e396cc1b03500660b392e34d533f4bffa1542b20 Mon Sep 17 00:00:00 2001 From: imbajin Date: Fri, 15 Sep 2023 03:16:39 +0000 Subject: [PATCH] doc: update content about kout & kneighbor new feature (#283) - kout & kneighbor: filtering for edge & vertex - kout: traverse mode bfs & dfs - kout & kneighbor: with_edge params --------- Co-authored-by: imbajin 66cf8ef15b54b9e1904ca3ce0f02b649ac58c9e9 --- cn/docs/_print/index.html | 252 ++++++++++------ cn/docs/clients/_print/index.html | 252 ++++++++++------ cn/docs/clients/restful-api/_print/index.html | 252 ++++++++++------ cn/docs/clients/restful-api/index.xml | 280 +++++++++++++----- .../clients/restful-api/traverser/index.html | 260 ++++++++++------ cn/docs/index.xml | 280 +++++++++++++----- cn/sitemap.xml | 2 +- docs/_print/index.html | 251 +++++++++++----- docs/clients/_print/index.html | 251 +++++++++++----- docs/clients/restful-api/_print/index.html | 251 +++++++++++----- docs/clients/restful-api/index.xml | 274 ++++++++++++----- docs/clients/restful-api/traverser/index.html | 257 ++++++++++------ docs/index.xml | 274 ++++++++++++----- en/sitemap.xml | 2 +- sitemap.xml | 2 +- 15 files changed, 2180 insertions(+), 960 deletions(-) diff --git a/cn/docs/_print/index.html b/cn/docs/_print/index.html index 5fbbda74d..d475374d4 100644 --- a/cn/docs/_print/index.html +++ b/cn/docs/_print/index.html @@ -3243,7 +3243,7 @@
Response Status
204
 

根据 label + id 删除边

通过指定 label 参数和 id 来删除边时,一般来说其性能比仅根据 id 删除会更好

Method & Url
DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko>1>>S1:vadas?label=knows
 
Response Status
204
-

5.1.9 - Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
+

5.1.9 - Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -3370,29 +3370,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
      • label:边类型
      • properties:边属性
    • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
      • label:顶点类型
      • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
  • traverse_mode: 遍历方式,可选择“breadth_first_search”或“depth_first_search”作为参数,默认为“breadth_first_search”
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
-    "kout": [
-        "1:josh",
+    "size": 2,
+	"kout": [
         "1:vadas",
         "2:lop"
     ],
@@ -3400,7 +3422,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -3408,12 +3430,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -3428,16 +3444,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -3457,6 +3463,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 适用场景

参见3.2.1.3

3.2.3 K-neighbor(GET,基础版)

3.2.3.1 功能介绍

根据起始顶点、方向、边的类型(可选)和深度depth,查找包括起始顶点在内、depth步之内可达的所有顶点

相当于:起始顶点、K-out(1)、K-out(2)、… 、K-out(max_depth)的并集

Params
  • source: 起始顶点id,必填项
  • direction:起始顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • max_depth:步数,必填项
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的顶点的最大数目,也即遍历过程中最大的访问的顶点数目,选填项,默认为10000000
3.2.3.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -3471,70 +3505,76 @@
         "2:lop"
     ]
 }
-
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • 从起始点出发的Steps,必填项,结构如下:
      • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
      • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
        • label:边类型
        • properties:边属性
      • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
        • label:顶点类型
        • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
-    },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+  	"source": "1:marko",
+  	"steps": {
+  	  	"direction": "BOTH",
+  	  	"edge_steps": [
+  	  	    {
+  	  	        "label": "knows",
+  	  	        "properties": {}
+  	  	    },
+  	  	    {
+  	  	        "label": "created",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"vertex_steps": [
+  	  	    {
+  	  	        "label": "person",
+  	  	        "properties": {
+  	  	            "age": "P.gt(28)"
+  	  	        }
+  	  	    },
+  	  	    {
+  	  	        "label": "software",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"max_degree": 10000,
+  	  	"skip_degree": 100000
+  	},
+  	"max_depth": 3,
+  	"limit": 10000,
+  	"with_vertex": true,
+  	"with_path": true,
+  	"with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
-    "kneighbor": [
-        "2:ripple",
-        "1:marko",
+    "size": 4,
+	"kneighbor": [
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -3570,16 +3610,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -3599,6 +3629,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 适用场景

参见3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 功能介绍

查询两个点的共同邻居

Params
  • vertex:一个顶点id,必填项
  • other:另一个顶点id,必填项
  • direction:顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的共同邻居的最大数目,选填项,默认为10000000
3.2.5.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
diff --git a/cn/docs/clients/_print/index.html b/cn/docs/clients/_print/index.html
index 8744b0e49..7e0dcc531 100644
--- a/cn/docs/clients/_print/index.html
+++ b/cn/docs/clients/_print/index.html
@@ -1460,7 +1460,7 @@
 
Response Status
204
 

根据 label + id 删除边

通过指定 label 参数和 id 来删除边时,一般来说其性能比仅根据 id 删除会更好

Method & Url
DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko>1>>S1:vadas?label=knows
 
Response Status
204
-

1.9 - Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
+

1.9 - Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -1587,29 +1587,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
      • label:边类型
      • properties:边属性
    • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
      • label:顶点类型
      • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
  • traverse_mode: 遍历方式,可选择“breadth_first_search”或“depth_first_search”作为参数,默认为“breadth_first_search”
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
-    "kout": [
-        "1:josh",
+    "size": 2,
+	"kout": [
         "1:vadas",
         "2:lop"
     ],
@@ -1617,7 +1639,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -1625,12 +1647,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -1645,16 +1661,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -1674,6 +1680,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 适用场景

参见3.2.1.3

3.2.3 K-neighbor(GET,基础版)

3.2.3.1 功能介绍

根据起始顶点、方向、边的类型(可选)和深度depth,查找包括起始顶点在内、depth步之内可达的所有顶点

相当于:起始顶点、K-out(1)、K-out(2)、… 、K-out(max_depth)的并集

Params
  • source: 起始顶点id,必填项
  • direction:起始顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • max_depth:步数,必填项
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的顶点的最大数目,也即遍历过程中最大的访问的顶点数目,选填项,默认为10000000
3.2.3.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -1688,70 +1722,76 @@
         "2:lop"
     ]
 }
-
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • 从起始点出发的Steps,必填项,结构如下:
      • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
      • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
        • label:边类型
        • properties:边属性
      • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
        • label:顶点类型
        • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
-    },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+  	"source": "1:marko",
+  	"steps": {
+  	  	"direction": "BOTH",
+  	  	"edge_steps": [
+  	  	    {
+  	  	        "label": "knows",
+  	  	        "properties": {}
+  	  	    },
+  	  	    {
+  	  	        "label": "created",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"vertex_steps": [
+  	  	    {
+  	  	        "label": "person",
+  	  	        "properties": {
+  	  	            "age": "P.gt(28)"
+  	  	        }
+  	  	    },
+  	  	    {
+  	  	        "label": "software",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"max_degree": 10000,
+  	  	"skip_degree": 100000
+  	},
+  	"max_depth": 3,
+  	"limit": 10000,
+  	"with_vertex": true,
+  	"with_path": true,
+  	"with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
-    "kneighbor": [
-        "2:ripple",
-        "1:marko",
+    "size": 4,
+	"kneighbor": [
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -1787,16 +1827,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -1816,6 +1846,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 适用场景

参见3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 功能介绍

查询两个点的共同邻居

Params
  • vertex:一个顶点id,必填项
  • other:另一个顶点id,必填项
  • direction:顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的共同邻居的最大数目,选填项,默认为10000000
3.2.5.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
diff --git a/cn/docs/clients/restful-api/_print/index.html b/cn/docs/clients/restful-api/_print/index.html
index 2fa50673c..2b3e6da74 100644
--- a/cn/docs/clients/restful-api/_print/index.html
+++ b/cn/docs/clients/restful-api/_print/index.html
@@ -1462,7 +1462,7 @@
 
Response Status
204
 

根据 label + id 删除边

通过指定 label 参数和 id 来删除边时,一般来说其性能比仅根据 id 删除会更好

Method & Url
DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko>1>>S1:vadas?label=knows
 
Response Status
204
-

9 - Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
+

9 - Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -1589,29 +1589,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
      • label:边类型
      • properties:边属性
    • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
      • label:顶点类型
      • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
  • traverse_mode: 遍历方式,可选择“breadth_first_search”或“depth_first_search”作为参数,默认为“breadth_first_search”
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
-    "kout": [
-        "1:josh",
+    "size": 2,
+	"kout": [
         "1:vadas",
         "2:lop"
     ],
@@ -1619,7 +1641,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -1627,12 +1649,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -1647,16 +1663,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -1676,6 +1682,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 适用场景

参见3.2.1.3

3.2.3 K-neighbor(GET,基础版)

3.2.3.1 功能介绍

根据起始顶点、方向、边的类型(可选)和深度depth,查找包括起始顶点在内、depth步之内可达的所有顶点

相当于:起始顶点、K-out(1)、K-out(2)、… 、K-out(max_depth)的并集

Params
  • source: 起始顶点id,必填项
  • direction:起始顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • max_depth:步数,必填项
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的顶点的最大数目,也即遍历过程中最大的访问的顶点数目,选填项,默认为10000000
3.2.3.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -1690,70 +1724,76 @@
         "2:lop"
     ]
 }
-
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • 从起始点出发的Steps,必填项,结构如下:
      • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
      • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
        • label:边类型
        • properties:边属性
      • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
        • label:顶点类型
        • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
-    },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+  	"source": "1:marko",
+  	"steps": {
+  	  	"direction": "BOTH",
+  	  	"edge_steps": [
+  	  	    {
+  	  	        "label": "knows",
+  	  	        "properties": {}
+  	  	    },
+  	  	    {
+  	  	        "label": "created",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"vertex_steps": [
+  	  	    {
+  	  	        "label": "person",
+  	  	        "properties": {
+  	  	            "age": "P.gt(28)"
+  	  	        }
+  	  	    },
+  	  	    {
+  	  	        "label": "software",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"max_degree": 10000,
+  	  	"skip_degree": 100000
+  	},
+  	"max_depth": 3,
+  	"limit": 10000,
+  	"with_vertex": true,
+  	"with_path": true,
+  	"with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
-    "kneighbor": [
-        "2:ripple",
-        "1:marko",
+    "size": 4,
+	"kneighbor": [
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -1789,16 +1829,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -1818,6 +1848,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 适用场景

参见3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 功能介绍

查询两个点的共同邻居

Params
  • vertex:一个顶点id,必填项
  • other:另一个顶点id,必填项
  • direction:顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的共同邻居的最大数目,选填项,默认为10000000
3.2.5.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
diff --git a/cn/docs/clients/restful-api/index.xml b/cn/docs/clients/restful-api/index.xml
index 1bc8a2ed8..c63fb70c7 100644
--- a/cn/docs/clients/restful-api/index.xml
+++ b/cn/docs/clients/restful-api/index.xml
@@ -2087,7 +2087,7 @@
 <li>高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
 <ul>
 <li>支持只统计邻居数量</li>
-<li>支持边属性过滤</li>
+<li>支持顶点和边属性过滤</li>
 <li>支持返回到达邻居的最短路径</li>
 </ul>
 </li>
@@ -2099,7 +2099,7 @@
 <li>高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
 <ul>
 <li>支持只统计邻居数量</li>
-<li>支持边属性过滤</li>
+<li>支持顶点和边属性过滤</li>
 <li>支持返回到达邻居的最短路径</li>
 </ul>
 </li>
@@ -2316,11 +2316,21 @@
 <h6 id="params-1">Params</h6>
 <ul>
 <li>source:起始顶点id,必填项</li>
-<li>从起始点出发的Step,必填项,结构如下:
+<li>steps: 从起始点出发的Steps,必填项,结构如下:
 <ul>
 <li>direction:表示边的方向(OUT,IN,BOTH),默认是BOTH</li>
-<li>labels:边的类型列表</li>
-<li>properties:通过属性的值过滤边</li>
+<li>edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
+<ul>
+<li>label:边类型</li>
+<li>properties:边属性</li>
+</ul>
+</li>
+<li>vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
+<ul>
+<li>label:顶点类型</li>
+<li>properties:顶点属性</li>
+</ul>
+</li>
 <li>max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)</li>
 <li>skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 <code>skip_degree &gt;= max_degree</code> 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)</li>
 </ul>
@@ -2329,19 +2339,31 @@
 <li>nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true</li>
 <li>count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false</li>
 <li>with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false</li>
+<li>with_edge,选填项,默认为false:
+<ul>
+<li>如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
+<ul>
+<li>当with_path为true时,将返回所有路径中的边的完整信息</li>
+<li>当with_path为false时,不返回任何信息</li>
+</ul>
+</li>
+<li>如果设置为false,则仅返回边的id</li>
+</ul>
+</li>
 <li>with_vertex,选填项,默认为false:
 <ul>
-<li>true表示返回结果包含完整的顶点信息(路径中的全部顶点)
+<li>如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
 <ul>
-<li>with_path为true时,返回所有路径中的顶点的完整信息</li>
-<li>with_path为false时,返回所有邻居的完整信息</li>
+<li>当with_path为true时,将返回所有路径中的顶点的完整信息</li>
+<li>当with_path为false时,返回所有邻居顶点的完整信息</li>
 </ul>
 </li>
-<li>false时表示只返回顶点id</li>
+<li>如果设置为false,则仅返回顶点的id</li>
 </ul>
 </li>
 <li>capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000</li>
 <li>limit:返回的顶点的最大数目,选填项,默认为10000000</li>
+<li>traverse_mode: 遍历方式,可选择“breadth_first_search”或“depth_first_search”作为参数,默认为“breadth_first_search”</li>
 </ul>
 <h5 id="3222-使用方法">3.2.2.2 使用方法</h5>
 <h6 id="method--url-1">Method &amp; Url</h6>
@@ -2349,12 +2371,34 @@
 </span></span></code></pre></div><h6 id="request-body">Request Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.lt(32)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
@@ -2362,15 +2406,15 @@
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;nearest&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h6 id="response-status-1">Response Status</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span>
 </span></span></code></pre></div><h6 id="response-body-1">Response Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">2</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kout&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
@@ -2378,7 +2422,7 @@
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
@@ -2386,12 +2430,6 @@
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertices&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
@@ -2406,16 +2444,6 @@
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">32</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Beijing&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
@@ -2435,6 +2463,34 @@
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.5</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20160110&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h5 id="3223-适用场景">3.2.2.3 适用场景</h5>
@@ -2490,11 +2546,26 @@
 <h6 id="params-3">Params</h6>
 <ul>
 <li>source:起始顶点id,必填项</li>
-<li>从起始点出发的Step,必填项,结构如下:
+<li>steps: 从起始点出发的Steps,必填项,结构如下:
 <ul>
 <li>direction:表示边的方向(OUT,IN,BOTH),默认是BOTH</li>
-<li>labels:边的类型列表</li>
-<li>properties:通过属性的值过滤边</li>
+<li>从起始点出发的Steps,必填项,结构如下:
+<ul>
+<li>direction:表示边的方向(OUT,IN,BOTH),默认是BOTH</li>
+<li>edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
+<ul>
+<li>label:边类型</li>
+<li>properties:边属性</li>
+</ul>
+</li>
+<li>vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
+<ul>
+<li>label:顶点类型</li>
+<li>properties:顶点属性</li>
+</ul>
+</li>
+</ul>
+</li>
 <li>max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)</li>
 <li>skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 <code>skip_degree &gt;= max_degree</code> 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)</li>
 </ul>
@@ -2502,15 +2573,26 @@
 <li>max_depth:步数,必填项</li>
 <li>count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false</li>
 <li>with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false</li>
+<li>with_edge,选填项,默认为false:
+<ul>
+<li>如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
+<ul>
+<li>当with_path为true时,将返回所有路径中的边的完整信息</li>
+<li>当with_path为false时,不返回任何信息</li>
+</ul>
+</li>
+<li>如果设置为false,则仅返回边的id</li>
+</ul>
+</li>
 <li>with_vertex,选填项,默认为false:
 <ul>
-<li>true表示返回结果包含完整的顶点信息(路径中的全部顶点)
+<li>如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
 <ul>
-<li>with_path为true时,返回所有路径中的顶点的完整信息</li>
-<li>with_path为false时,返回所有邻居的完整信息</li>
+<li>当with_path为true时,将返回所有路径中的顶点的完整信息</li>
+<li>当with_path为false时,返回所有邻居顶点的完整信息</li>
 </ul>
 </li>
-<li>false时表示只返回顶点id</li>
+<li>如果设置为false,则仅返回顶点的id</li>
 </ul>
 </li>
 <li>limit:返回的顶点的最大数目,选填项,默认为10000000</li>
@@ -2521,69 +2603,75 @@
 </span></span></code></pre></div><h6 id="request-body-1">Request Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(28)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_depth&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h6 id="response-status-3">Response Status</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span>
 </span></span></code></pre></div><h6 id="response-body-3">Response Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">6</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">4</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kneighbor&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;paths&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
@@ -2619,16 +2707,6 @@
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">27</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Hongkong&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
@@ -2648,6 +2726,60 @@
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20130220&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.2</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20170324&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h5 id="3243-适用场景">3.2.4.3 适用场景</h5>
diff --git a/cn/docs/clients/restful-api/traverser/index.html b/cn/docs/clients/restful-api/traverser/index.html
index c30def2cd..30e7b31a5 100644
--- a/cn/docs/clients/restful-api/traverser/index.html
+++ b/cn/docs/clients/restful-api/traverser/index.html
@@ -1,17 +1,17 @@
 Traverser API | HugeGraph
+K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版: 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于: 支持只统计邻居数量 支持顶点和边属性过滤 支持返回到达邻居的最短路径 K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版: 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于: 支持只统计邻居数量 支持顶点和边属性过滤 支持返回到达邻居的最短路径 Same Neighbors, 查询两个顶点的共同邻居 Jaccard Similarity API,计算jaccard相似度,包括两种: 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比) 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点 Shortest Path API,查找两个顶点之间的最短路径 All Shortest Paths,查找两个顶点间的全部最短路径 Weighted Shortest Path,查找起点到目标点的带权最短路径 Single Source Shortest Path,查找一个点到其他各个点的加权最短路径 Multi Node Shortest Path,查找指定顶点集之间两两最短路径 Paths API,查找两个顶点间的全部路径,分为基础版和高级版: 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径 Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径 Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径 Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙) Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点 Rings API,从起始顶点出发,可到达的环路路径 Rays API,从起始顶点出发,可到达边界的路径(即无环路径) Fusiform Similarity API,查找一个顶点的梭形相似点 Vertices API 按ID批量查询顶点; 获取顶点的分区; 按分区查询顶点; Edges API 按ID批量查询边; 获取边的分区; 按分区查询边; 3.">
 

Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
+ Print entire section

Traverser API

3.1 traverser API概述

HugeGraphServer为HugeGraph图数据库提供了RESTful API接口。除了顶点和边的CRUD基本操作以外,还提供了一些遍历(traverser)方法,我们称为traverser API。这些遍历方法实现了一些复杂的图算法,方便用户对图进行分析和挖掘。

HugeGraph支持的Traverser API包括:

  • K-out API,根据起始顶点,查找恰好N步可达的邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找恰好N步可达的邻居
    • 高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • K-neighbor API,根据起始顶点,查找N步以内可达的所有邻居,分为基础版和高级版:
    • 基础版使用GET方法,根据起始顶点,查找N步以内可达的所有邻居
    • 高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于:
      • 支持只统计邻居数量
      • 支持顶点和边属性过滤
      • 支持返回到达邻居的最短路径
  • Same Neighbors, 查询两个顶点的共同邻居
  • Jaccard Similarity API,计算jaccard相似度,包括两种:
    • 一种是使用GET方法,计算两个顶点的邻居的相似度(交并比)
    • 一种是使用POST方法,在全图中查找与起点的jaccard similarity最高的N个点
  • Shortest Path API,查找两个顶点之间的最短路径
  • All Shortest Paths,查找两个顶点间的全部最短路径
  • Weighted Shortest Path,查找起点到目标点的带权最短路径
  • Single Source Shortest Path,查找一个点到其他各个点的加权最短路径
  • Multi Node Shortest Path,查找指定顶点集之间两两最短路径
  • Paths API,查找两个顶点间的全部路径,分为基础版和高级版:
    • 基础版使用GET方法,根据起点和终点,查找两个顶点间的全部路径
    • 高级版使用POST方法,根据一组起点和一组终点,查找两个集合间符合条件的全部路径
  • Customized Paths API,从一批顶点出发,按(一种)模式遍历经过的全部路径
  • Template Path API,指定起点和终点以及起点和终点间路径信息,查找符合的路径
  • Crosspoints API,查找两个顶点的交点(共同祖先或者共同子孙)
  • Customized Crosspoints API,从一批顶点出发,按多种模式遍历,最后一步到达的顶点的交点
  • Rings API,从起始顶点出发,可到达的环路路径
  • Rays API,从起始顶点出发,可到达边界的路径(即无环路径)
  • Fusiform Similarity API,查找一个顶点的梭形相似点
  • Vertices API
    • 按ID批量查询顶点;
    • 获取顶点的分区;
    • 按分区查询顶点;
  • Edges API
    • 按ID批量查询边;
    • 获取边的分区;
    • 按分区查询边;

3.2. traverser API详解

使用方法中的例子,都是基于TinkerPop官网给出的图:

tinkerpop示例图

数据导入程序如下:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -138,29 +138,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 适用场景

查找恰好N步关系可达的顶点。两个例子:

  • 家族关系中,查找一个人的所有孙子,person A通过连续的两条“儿子”边到达的顶点集合。
  • 社交关系中发现潜在好友,例如:与目标用户相隔两层朋友关系的用户,可以通过连续两条“朋友”边到达的顶点。

3.2.2 K-out API(POST,高级版)

3.2.2.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发恰好depth步可达的顶点。

与K-out基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
      • label:边类型
      • properties:边属性
    • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
      • label:顶点类型
      • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000
  • limit:返回的顶点的最大数目,选填项,默认为10000000
  • traverse_mode: 遍历方式,可选择“breadth_first_search”或“depth_first_search”作为参数,默认为“breadth_first_search”
3.2.2.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
-    "kout": [
-        "1:josh",
+    "size": 2,
+	"kout": [
         "1:vadas",
         "2:lop"
     ],
@@ -168,7 +190,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -176,12 +198,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -196,16 +212,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -225,6 +231,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 适用场景

参见3.2.1.3

3.2.3 K-neighbor(GET,基础版)

3.2.3.1 功能介绍

根据起始顶点、方向、边的类型(可选)和深度depth,查找包括起始顶点在内、depth步之内可达的所有顶点

相当于:起始顶点、K-out(1)、K-out(2)、… 、K-out(max_depth)的并集

Params
  • source: 起始顶点id,必填项
  • direction:起始顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • max_depth:步数,必填项
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的顶点的最大数目,也即遍历过程中最大的访问的顶点数目,选填项,默认为10000000
3.2.3.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -239,70 +273,76 @@
         "2:lop"
     ]
 }
-
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • 从起始点出发的Step,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • labels:边的类型列表
    • properties:通过属性的值过滤边
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_vertex,选填项,默认为false:
    • true表示返回结果包含完整的顶点信息(路径中的全部顶点)
      • with_path为true时,返回所有路径中的顶点的完整信息
      • with_path为false时,返回所有邻居的完整信息
    • false时表示只返回顶点id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 适用场景

查找N步以内可达的所有顶点,例如:

  • 家族关系中,查找一个人五服以内所有子孙,person A通过连续的5条“亲子”边到达的顶点集合。
  • 社交关系中发现好友圈子,例如目标用户通过1条、2条、3条“朋友”边可到达的用户可以组成目标用户的朋友圈子

3.2.4 K-neighbor API(POST,高级版)

3.2.4.1 功能介绍

根据起始顶点、步骤(包括方向、边类型和过滤属性)和深度depth,查找从起始顶点出发depth步内可达的所有顶点。

与K-neighbor基础版的不同在于:

  • 支持只统计邻居数量
  • 支持边属性过滤
  • 支持返回到达邻居的最短路径
Params
  • source:起始顶点id,必填项
  • steps: 从起始点出发的Steps,必填项,结构如下:
    • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
    • 从起始点出发的Steps,必填项,结构如下:
      • direction:表示边的方向(OUT,IN,BOTH),默认是BOTH
      • edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤
        • label:边类型
        • properties:边属性
      • vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤
        • label:顶点类型
        • properties:顶点属性
    • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)
    • skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 skip_degree >= max_degree 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)
  • max_depth:步数,必填项
  • count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false
  • with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false
  • with_edge,选填项,默认为false:
    • 如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边
      • 当with_path为true时,将返回所有路径中的边的完整信息
      • 当with_path为false时,不返回任何信息
    • 如果设置为false,则仅返回边的id
  • with_vertex,选填项,默认为false:
    • 如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点
      • 当with_path为true时,将返回所有路径中的顶点的完整信息
      • 当with_path为false时,返回所有邻居顶点的完整信息
    • 如果设置为false,则仅返回顶点的id
  • limit:返回的顶点的最大数目,选填项,默认为10000000
3.2.4.2 使用方法
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
-    },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+  	"source": "1:marko",
+  	"steps": {
+  	  	"direction": "BOTH",
+  	  	"edge_steps": [
+  	  	    {
+  	  	        "label": "knows",
+  	  	        "properties": {}
+  	  	    },
+  	  	    {
+  	  	        "label": "created",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"vertex_steps": [
+  	  	    {
+  	  	        "label": "person",
+  	  	        "properties": {
+  	  	            "age": "P.gt(28)"
+  	  	        }
+  	  	    },
+  	  	    {
+  	  	        "label": "software",
+  	  	        "properties": {}
+  	  	    }
+  	  	],
+  	  	"max_degree": 10000,
+  	  	"skip_degree": 100000
+  	},
+  	"max_depth": 3,
+  	"limit": 10000,
+  	"with_vertex": true,
+  	"with_path": true,
+  	"with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
-    "kneighbor": [
-        "2:ripple",
-        "1:marko",
+    "size": 4,
+	"kneighbor": [
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -338,16 +378,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -367,6 +397,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 适用场景

参见3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 功能介绍

查询两个点的共同邻居

Params
  • vertex:一个顶点id,必填项
  • other:另一个顶点id,必填项
  • direction:顶点向外发散的方向(OUT,IN,BOTH),选填项,默认是BOTH
  • label:边的类型,选填项,默认代表所有edge label
  • max_degree:查询过程中,单个顶点遍历的最大邻接边数目,选填项,默认为10000
  • limit:返回的共同邻居的最大数目,选填项,默认为10000000
3.2.5.2 使用方法
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
@@ -1720,7 +1804,7 @@
         }
     ]
 }
-
3.2.23.4 适用场景
  • 按id列表查询边,可用于批量查询边
  • 获取分片和按分片查询边,可以用来遍历全部边

Last modified April 17, 2022: rebuild doc (ef365444)
+
3.2.23.4 适用场景
  • 按id列表查询边,可用于批量查询边
  • 获取分片和按分片查询边,可以用来遍历全部边

diff --git a/cn/docs/index.xml b/cn/docs/index.xml index 944de3636..d21175b27 100644 --- a/cn/docs/index.xml +++ b/cn/docs/index.xml @@ -12155,7 +12155,7 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> <li>高级版使用POST方法,根据起始顶点,查找恰好N步可达的邻居,与基础版的不同在于: <ul> <li>支持只统计邻居数量</li> -<li>支持边属性过滤</li> +<li>支持顶点和边属性过滤</li> <li>支持返回到达邻居的最短路径</li> </ul> </li> @@ -12167,7 +12167,7 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> <li>高级版使用POST方法,根据起始顶点,查找N步以内可达的所有邻居,与基础版的不同在于: <ul> <li>支持只统计邻居数量</li> -<li>支持边属性过滤</li> +<li>支持顶点和边属性过滤</li> <li>支持返回到达邻居的最短路径</li> </ul> </li> @@ -12384,11 +12384,21 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> <h6 id="params-1">Params</h6> <ul> <li>source:起始顶点id,必填项</li> -<li>从起始点出发的Step,必填项,结构如下: +<li>steps: 从起始点出发的Steps,必填项,结构如下: <ul> <li>direction:表示边的方向(OUT,IN,BOTH),默认是BOTH</li> -<li>labels:边的类型列表</li> -<li>properties:通过属性的值过滤边</li> +<li>edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤 +<ul> +<li>label:边类型</li> +<li>properties:边属性</li> +</ul> +</li> +<li>vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤 +<ul> +<li>label:顶点类型</li> +<li>properties:顶点属性</li> +</ul> +</li> <li>max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)</li> <li>skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 <code>skip_degree &gt;= max_degree</code> 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)</li> </ul> @@ -12397,19 +12407,31 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> <li>nearest:nearest为true时,代表起始顶点到达结果顶点的最短路径长度为depth,不存在更短的路径;nearest为false时,代表起始顶点到结果顶点有一条长度为depth的路径(未必最短且可以有环),选填项,默认为true</li> <li>count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false</li> <li>with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false</li> +<li>with_edge,选填项,默认为false: +<ul> +<li>如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边 +<ul> +<li>当with_path为true时,将返回所有路径中的边的完整信息</li> +<li>当with_path为false时,不返回任何信息</li> +</ul> +</li> +<li>如果设置为false,则仅返回边的id</li> +</ul> +</li> <li>with_vertex,选填项,默认为false: <ul> -<li>true表示返回结果包含完整的顶点信息(路径中的全部顶点) +<li>如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点 <ul> -<li>with_path为true时,返回所有路径中的顶点的完整信息</li> -<li>with_path为false时,返回所有邻居的完整信息</li> +<li>当with_path为true时,将返回所有路径中的顶点的完整信息</li> +<li>当with_path为false时,返回所有邻居顶点的完整信息</li> </ul> </li> -<li>false时表示只返回顶点id</li> +<li>如果设置为false,则仅返回顶点的id</li> </ul> </li> <li>capacity:遍历过程中最大的访问的顶点数目,选填项,默认为10000000</li> <li>limit:返回的顶点的最大数目,选填项,默认为10000000</li> +<li>traverse_mode: 遍历方式,可选择“breadth_first_search”或“depth_first_search”作为参数,默认为“breadth_first_search”</li> </ul> <h5 id="3222-使用方法">3.2.2.2 使用方法</h5> <h6 id="method--url-1">Method &amp; Url</h6> @@ -12417,12 +12439,34 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span></code></pre></div><h6 id="request-body">Request Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.lt(32)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> @@ -12430,15 +12474,15 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;nearest&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h6 id="response-status-1">Response Status</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span> </span></span></code></pre></div><h6 id="response-body-1">Response Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">2</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kout&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> @@ -12446,7 +12490,7 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> @@ -12454,12 +12498,6 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertices&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> @@ -12474,16 +12512,6 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">32</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Beijing&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> @@ -12503,6 +12531,34 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.5</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20160110&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h5 id="3223-适用场景">3.2.2.3 适用场景</h5> @@ -12558,11 +12614,26 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> <h6 id="params-3">Params</h6> <ul> <li>source:起始顶点id,必填项</li> -<li>从起始点出发的Step,必填项,结构如下: +<li>steps: 从起始点出发的Steps,必填项,结构如下: <ul> <li>direction:表示边的方向(OUT,IN,BOTH),默认是BOTH</li> -<li>labels:边的类型列表</li> -<li>properties:通过属性的值过滤边</li> +<li>从起始点出发的Steps,必填项,结构如下: +<ul> +<li>direction:表示边的方向(OUT,IN,BOTH),默认是BOTH</li> +<li>edge_steps:边Step集合,支持对单边的类型和属性过滤,如果为空,则不过滤 +<ul> +<li>label:边类型</li> +<li>properties:边属性</li> +</ul> +</li> +<li>vertex_steps:顶点Step集合,支持对单点的类型和属性过滤,如果为空,则不过滤 +<ul> +<li>label:顶点类型</li> +<li>properties:顶点属性</li> +</ul> +</li> +</ul> +</li> <li>max_degree:查询过程中,单个顶点遍历的最大邻接边数目,默认为 10000 (注: 0.12版之前 step 内仅支持 degree 作为参数名, 0.12开始统一使用 max_degree, 并向下兼容 degree 写法)</li> <li>skip_degree:用于设置查询过程中舍弃超级顶点的最小边数,即当某个顶点的邻接边数目大于 skip_degree 时,完全舍弃该顶点。选填项,如果开启时,需满足 <code>skip_degree &gt;= max_degree</code> 约束,默认为0 (不启用),表示不跳过任何点 (注意: 开启此配置后,遍历时会尝试访问一个顶点的 skip_degree 条边,而不仅仅是 max_degree 条边,这样有额外的遍历开销,对查询性能影响可能有较大影响,请确认理解后再开启)</li> </ul> @@ -12570,15 +12641,26 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> <li>max_depth:步数,必填项</li> <li>count_only:Boolean值,true表示只统计结果的数目,不返回具体结果;false表示返回具体的结果,默认为false</li> <li>with_path:true表示返回起始点到每个邻居的最短路径,false表示不返回起始点到每个邻居的最短路径,选填项,默认为false</li> +<li>with_edge,选填项,默认为false: +<ul> +<li>如果设置为true,则结果将包含所有边的完整信息,即路径中的所有边 +<ul> +<li>当with_path为true时,将返回所有路径中的边的完整信息</li> +<li>当with_path为false时,不返回任何信息</li> +</ul> +</li> +<li>如果设置为false,则仅返回边的id</li> +</ul> +</li> <li>with_vertex,选填项,默认为false: <ul> -<li>true表示返回结果包含完整的顶点信息(路径中的全部顶点) +<li>如果设置为true,则结果将包含所有顶点的完整信息,即路径中的所有顶点 <ul> -<li>with_path为true时,返回所有路径中的顶点的完整信息</li> -<li>with_path为false时,返回所有邻居的完整信息</li> +<li>当with_path为true时,将返回所有路径中的顶点的完整信息</li> +<li>当with_path为false时,返回所有邻居顶点的完整信息</li> </ul> </li> -<li>false时表示只返回顶点id</li> +<li>如果设置为false,则仅返回顶点的id</li> </ul> </li> <li>limit:返回的顶点的最大数目,选填项,默认为10000000</li> @@ -12589,69 +12671,75 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span></code></pre></div><h6 id="request-body-1">Request Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(28)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_depth&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h6 id="response-status-3">Response Status</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span> </span></span></code></pre></div><h6 id="response-body-3">Response Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">6</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">4</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kneighbor&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;paths&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> @@ -12687,16 +12775,6 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">27</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Hongkong&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> @@ -12716,6 +12794,60 @@ HugeGraph Toolchain 版本: toolchain-1.0.0</p> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20130220&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.2</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20170324&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h5 id="3243-适用场景">3.2.4.3 适用场景</h5> diff --git a/cn/sitemap.xml b/cn/sitemap.xml index 7cd00db1e..fbfb69184 100644 --- a/cn/sitemap.xml +++ b/cn/sitemap.xml @@ -1 +1 @@ -/cn/docs/guides/architectural/2023-06-25T21:06:07+08:00/cn/docs/config/config-guide/2023-06-21T14:48:04+08:00/cn/docs/language/hugegraph-gremlin/2023-01-01T16:16:43+08:00/cn/docs/performance/hugegraph-benchmark-0.5.6/2022-09-15T15:16:23+08:00/cn/docs/quickstart/hugegraph-server/2023-09-12T12:18:04+08:00/cn/docs/introduction/readme/2023-06-18T14:57:33+08:00/cn/docs/changelog/hugegraph-1.0.0-release-notes/2023-01-09T07:41:46+08:00/cn/docs/clients/restful-api/2023-07-31T23:55:30+08:00/cn/docs/clients/restful-api/schema/2023-05-14T19:35:13+08:00/cn/docs/performance/api-preformance/hugegraph-api-0.5.6-rocksdb/2023-01-01T16:16:43+08:00/cn/docs/contribution-guidelines/contribute/2023-09-09T20:50:32+08:00/cn/docs/config/config-option/2023-02-08T20:56:09+08:00/cn/docs/guides/desgin-concept/2022-04-17T11:36:55+08:00/cn/docs/download/download/2023-06-17T14:43:04+08:00/cn/docs/language/hugegraph-example/2023-02-02T01:21:10+08:00/cn/docs/clients/hugegraph-client/2022-09-15T15:16:23+08:00/cn/docs/performance/api-preformance/2023-06-17T14:43:04+08:00/cn/docs/quickstart/hugegraph-loader/2023-05-17T23:12:35+08:00/cn/docs/clients/restful-api/propertykey/2023-05-19T05:15:56-05:00/cn/docs/changelog/hugegraph-0.11.2-release-notes/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.12.0-release-notes/2023-01-01T16:16:43+08:00/cn/docs/performance/api-preformance/hugegraph-api-0.5.6-cassandra/2023-01-01T16:16:43+08:00/cn/docs/contribution-guidelines/subscribe/2023-06-17T14:43:04+08:00/cn/docs/config/config-authentication/2022-04-17T11:36:55+08:00/cn/docs/clients/gremlin-console/2023-06-12T23:52:07+08:00/cn/docs/guides/custom-plugin/2022-09-15T15:16:23+08:00/cn/docs/performance/hugegraph-loader-performance/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-tools/2023-05-09T21:27:34+08:00/cn/docs/quickstart/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.10.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/vertexlabel/2022-04-17T11:36:55+08:00/cn/docs/contribution-guidelines/validate-release/2023-02-15T16:14:21+08:00/cn/docs/guides/backup-restore/2022-04-17T11:36:55+08:00/cn/docs/config/2022-04-17T11:36:55+08:00/cn/docs/config/config-https/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/edgelabel/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.9.2-release-notes/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-hubble/2023-09-12T12:18:04+08:00/cn/docs/contribution-guidelines/hugegraph-server-idea-setup/2023-06-25T21:06:07+08:00/cn/docs/clients/2022-04-17T11:36:55+08:00/cn/docs/config/config-computer/2023-01-01T16:16:43+08:00/cn/docs/guides/faq/2023-01-04T22:59:07+08:00/cn/docs/clients/restful-api/indexlabel/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.8.0-release-notes/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-client/2023-05-18T11:09:55+08:00/cn/docs/guides/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/rebuild/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.7.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-computer/2023-06-25T21:06:46+08:00/cn/docs/language/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.6.1-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/vertex/2023-06-04T23:04:47+08:00/cn/docs/clients/restful-api/edge/2023-06-29T10:17:29+08:00/cn/docs/performance/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.5.6-release-notes/2022-04-17T11:36:55+08:00/cn/docs/changelog/2022-04-17T11:36:55+08:00/cn/docs/contribution-guidelines/2022-12-30T19:57:48+08:00/cn/docs/changelog/hugegraph-0.4.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/traverser/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/rank/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.3.3-release-notes/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.2-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/variable/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/graphs/2022-05-27T09:27:37+08:00/cn/docs/changelog/hugegraph-0.2.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/task/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/gremlin/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/cypher/2023-07-31T23:55:30+08:00/cn/docs/clients/restful-api/auth/2023-07-31T23:55:30+08:00/cn/docs/clients/restful-api/other/2023-07-31T23:55:30+08:00/cn/docs/2022-12-30T19:57:48+08:00/cn/blog/news/2022-04-17T11:36:55+08:00/cn/blog/releases/2022-04-17T11:36:55+08:00/cn/blog/2018/10/06/easy-documentation-with-docsy/2022-04-17T11:36:55+08:00/cn/blog/2018/10/06/the-second-blog-post/2022-04-17T11:36:55+08:00/cn/blog/2018/01/04/another-great-release/2022-04-17T11:36:55+08:00/cn/docs/cla/2022-04-17T11:36:55+08:00/cn/docs/performance/hugegraph-benchmark-0.4.4/2022-09-15T15:16:23+08:00/cn/docs/summary/2023-07-31T23:55:30+08:00/cn/blog/2022-04-17T11:36:55+08:00/cn/categories//cn/community/2022-04-17T11:36:55+08:00/cn/2023-01-04T22:59:07+08:00/cn/search/2022-04-17T11:36:55+08:00/cn/tags/ \ No newline at end of file +/cn/docs/guides/architectural/2023-06-25T21:06:07+08:00/cn/docs/config/config-guide/2023-06-21T14:48:04+08:00/cn/docs/language/hugegraph-gremlin/2023-01-01T16:16:43+08:00/cn/docs/performance/hugegraph-benchmark-0.5.6/2022-09-15T15:16:23+08:00/cn/docs/quickstart/hugegraph-server/2023-09-12T12:18:04+08:00/cn/docs/introduction/readme/2023-06-18T14:57:33+08:00/cn/docs/changelog/hugegraph-1.0.0-release-notes/2023-01-09T07:41:46+08:00/cn/docs/clients/restful-api/2023-07-31T23:55:30+08:00/cn/docs/clients/restful-api/schema/2023-05-14T19:35:13+08:00/cn/docs/performance/api-preformance/hugegraph-api-0.5.6-rocksdb/2023-01-01T16:16:43+08:00/cn/docs/contribution-guidelines/contribute/2023-09-09T20:50:32+08:00/cn/docs/config/config-option/2023-02-08T20:56:09+08:00/cn/docs/guides/desgin-concept/2022-04-17T11:36:55+08:00/cn/docs/download/download/2023-06-17T14:43:04+08:00/cn/docs/language/hugegraph-example/2023-02-02T01:21:10+08:00/cn/docs/clients/hugegraph-client/2022-09-15T15:16:23+08:00/cn/docs/performance/api-preformance/2023-06-17T14:43:04+08:00/cn/docs/quickstart/hugegraph-loader/2023-05-17T23:12:35+08:00/cn/docs/clients/restful-api/propertykey/2023-05-19T05:15:56-05:00/cn/docs/changelog/hugegraph-0.11.2-release-notes/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.12.0-release-notes/2023-01-01T16:16:43+08:00/cn/docs/performance/api-preformance/hugegraph-api-0.5.6-cassandra/2023-01-01T16:16:43+08:00/cn/docs/contribution-guidelines/subscribe/2023-06-17T14:43:04+08:00/cn/docs/config/config-authentication/2022-04-17T11:36:55+08:00/cn/docs/clients/gremlin-console/2023-06-12T23:52:07+08:00/cn/docs/guides/custom-plugin/2022-09-15T15:16:23+08:00/cn/docs/performance/hugegraph-loader-performance/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-tools/2023-05-09T21:27:34+08:00/cn/docs/quickstart/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.10.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/vertexlabel/2022-04-17T11:36:55+08:00/cn/docs/contribution-guidelines/validate-release/2023-02-15T16:14:21+08:00/cn/docs/guides/backup-restore/2022-04-17T11:36:55+08:00/cn/docs/config/2022-04-17T11:36:55+08:00/cn/docs/config/config-https/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/edgelabel/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.9.2-release-notes/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-hubble/2023-09-12T12:18:04+08:00/cn/docs/contribution-guidelines/hugegraph-server-idea-setup/2023-06-25T21:06:07+08:00/cn/docs/clients/2022-04-17T11:36:55+08:00/cn/docs/config/config-computer/2023-01-01T16:16:43+08:00/cn/docs/guides/faq/2023-01-04T22:59:07+08:00/cn/docs/clients/restful-api/indexlabel/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.8.0-release-notes/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-client/2023-05-18T11:09:55+08:00/cn/docs/guides/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/rebuild/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.7.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/quickstart/hugegraph-computer/2023-06-25T21:06:46+08:00/cn/docs/language/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.6.1-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/vertex/2023-06-04T23:04:47+08:00/cn/docs/clients/restful-api/edge/2023-06-29T10:17:29+08:00/cn/docs/performance/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.5.6-release-notes/2022-04-17T11:36:55+08:00/cn/docs/changelog/2022-04-17T11:36:55+08:00/cn/docs/contribution-guidelines/2022-12-30T19:57:48+08:00/cn/docs/changelog/hugegraph-0.4.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/traverser/2023-09-15T11:15:58+08:00/cn/docs/clients/restful-api/rank/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.3.3-release-notes/2022-04-17T11:36:55+08:00/cn/docs/changelog/hugegraph-0.2-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/variable/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/graphs/2022-05-27T09:27:37+08:00/cn/docs/changelog/hugegraph-0.2.4-release-notes/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/task/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/gremlin/2022-04-17T11:36:55+08:00/cn/docs/clients/restful-api/cypher/2023-07-31T23:55:30+08:00/cn/docs/clients/restful-api/auth/2023-07-31T23:55:30+08:00/cn/docs/clients/restful-api/other/2023-07-31T23:55:30+08:00/cn/docs/2022-12-30T19:57:48+08:00/cn/blog/news/2022-04-17T11:36:55+08:00/cn/blog/releases/2022-04-17T11:36:55+08:00/cn/blog/2018/10/06/easy-documentation-with-docsy/2022-04-17T11:36:55+08:00/cn/blog/2018/10/06/the-second-blog-post/2022-04-17T11:36:55+08:00/cn/blog/2018/01/04/another-great-release/2022-04-17T11:36:55+08:00/cn/docs/cla/2022-04-17T11:36:55+08:00/cn/docs/performance/hugegraph-benchmark-0.4.4/2022-09-15T15:16:23+08:00/cn/docs/summary/2023-07-31T23:55:30+08:00/cn/blog/2022-04-17T11:36:55+08:00/cn/categories//cn/community/2022-04-17T11:36:55+08:00/cn/2023-01-04T22:59:07+08:00/cn/search/2022-04-17T11:36:55+08:00/cn/tags/ \ No newline at end of file diff --git a/docs/_print/index.html b/docs/_print/index.html index 854bb85ef..0d7b84f6d 100644 --- a/docs/_print/index.html +++ b/docs/_print/index.html @@ -3248,7 +3248,7 @@
Response Status
204
 

Deleting Edge by Label + ID

In general, specifying the Label parameter along with the ID to delete an edge will provide better performance compared to deleting by ID only.

Method & Url
DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko>1>>S1:vadas?label=knows
 
Response Status
204
-

5.1.9 - Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
+

5.1.9 - Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -3375,29 +3375,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • labels: List of edge types.
    • properties: Filters edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_vertex: Optional, default is false:
    • When true, the results include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
  • traverse_mode: Traversal mode. There are two options: “breadth_first_search” and “depth_first_search”, default is “breadth_first_search”.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
+    "size": 2,
     "kout": [
-        "1:josh",
         "1:vadas",
         "2:lop"
     ],
@@ -3405,7 +3427,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -3413,12 +3435,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -3433,16 +3449,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -3462,6 +3468,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 Use Cases

Refer to 3.2.1.3.

3.2.3 K-neighbor (GET, Basic Version)

3.2.3.1 Function Introduction

Find all vertices that are reachable within depth steps, including the starting vertex, based on the starting vertex, direction, edge type (optional), and depth.

Equivalent to the union of: starting vertex, K-out(1), K-out(2), …, K-out(max_depth).

Params
  • source: ID of the starting vertex, required.
  • direction: Direction in which the starting vertex’s edges extend (OUT, IN, BOTH). Optional, default is BOTH.
  • max_depth: Number of steps, required.
  • label: Edge type, optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for a single vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of vertices to return, also represents the maximum number of vertices to visit during traversal. Optional, default is 10000000.
3.2.3.2 Usage
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -3476,70 +3510,81 @@
         "2:lop"
     ]
 }
-
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of edges (OUT, IN, BOTH). Default is BOTH.
    • labels: List of edge types.
    • properties: Filter edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_vertex: Optional parameter, default is false:
    • If true, the results include complete vertex information (all vertices in the path).
      • When with_path is true, it returns complete information of all vertices in the paths.
      • When with_path is false, it returns complete information of all neighbors.
    • If false, only the vertex ID is returned.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
+    "size": 4,
     "kneighbor": [
-        "2:ripple",
-        "1:marko",
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -3575,16 +3620,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -3604,6 +3639,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 Use Cases

See 3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 Function Introduction

Retrieve the common neighbors of two vertices.

Params
  • vertex: ID of one vertex, required.
  • other: ID of another vertex, required.
  • direction: Direction in which the vertex expands outward (OUT, IN, BOTH). Optional, default is BOTH.
  • label: Edge type. Optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of common neighbors to be returned. Optional, default is 10000000.
3.2.5.2 Usage Method
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
diff --git a/docs/clients/_print/index.html b/docs/clients/_print/index.html
index e8e22e18e..3ce418637 100644
--- a/docs/clients/_print/index.html
+++ b/docs/clients/_print/index.html
@@ -1459,7 +1459,7 @@
 
Response Status
204
 

Deleting Edge by Label + ID

In general, specifying the Label parameter along with the ID to delete an edge will provide better performance compared to deleting by ID only.

Method & Url
DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko>1>>S1:vadas?label=knows
 
Response Status
204
-

1.9 - Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
+

1.9 - Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -1586,29 +1586,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • labels: List of edge types.
    • properties: Filters edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_vertex: Optional, default is false:
    • When true, the results include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
  • traverse_mode: Traversal mode. There are two options: “breadth_first_search” and “depth_first_search”, default is “breadth_first_search”.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
+    "size": 2,
     "kout": [
-        "1:josh",
         "1:vadas",
         "2:lop"
     ],
@@ -1616,7 +1638,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -1624,12 +1646,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -1644,16 +1660,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -1673,6 +1679,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 Use Cases

Refer to 3.2.1.3.

3.2.3 K-neighbor (GET, Basic Version)

3.2.3.1 Function Introduction

Find all vertices that are reachable within depth steps, including the starting vertex, based on the starting vertex, direction, edge type (optional), and depth.

Equivalent to the union of: starting vertex, K-out(1), K-out(2), …, K-out(max_depth).

Params
  • source: ID of the starting vertex, required.
  • direction: Direction in which the starting vertex’s edges extend (OUT, IN, BOTH). Optional, default is BOTH.
  • max_depth: Number of steps, required.
  • label: Edge type, optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for a single vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of vertices to return, also represents the maximum number of vertices to visit during traversal. Optional, default is 10000000.
3.2.3.2 Usage
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -1687,70 +1721,81 @@
         "2:lop"
     ]
 }
-
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of edges (OUT, IN, BOTH). Default is BOTH.
    • labels: List of edge types.
    • properties: Filter edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_vertex: Optional parameter, default is false:
    • If true, the results include complete vertex information (all vertices in the path).
      • When with_path is true, it returns complete information of all vertices in the paths.
      • When with_path is false, it returns complete information of all neighbors.
    • If false, only the vertex ID is returned.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
+    "size": 4,
     "kneighbor": [
-        "2:ripple",
-        "1:marko",
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -1786,16 +1831,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -1815,6 +1850,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 Use Cases

See 3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 Function Introduction

Retrieve the common neighbors of two vertices.

Params
  • vertex: ID of one vertex, required.
  • other: ID of another vertex, required.
  • direction: Direction in which the vertex expands outward (OUT, IN, BOTH). Optional, default is BOTH.
  • label: Edge type. Optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of common neighbors to be returned. Optional, default is 10000000.
3.2.5.2 Usage Method
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
diff --git a/docs/clients/restful-api/_print/index.html b/docs/clients/restful-api/_print/index.html
index f0f22df24..71e90f311 100644
--- a/docs/clients/restful-api/_print/index.html
+++ b/docs/clients/restful-api/_print/index.html
@@ -1459,7 +1459,7 @@
 
Response Status
204
 

Deleting Edge by Label + ID

In general, specifying the Label parameter along with the ID to delete an edge will provide better performance compared to deleting by ID only.

Method & Url
DELETE http://localhost:8080/graphs/hugegraph/graph/edges/S1:marko>1>>S1:vadas?label=knows
 
Response Status
204
-

9 - Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
+

9 - Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -1586,29 +1586,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • labels: List of edge types.
    • properties: Filters edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_vertex: Optional, default is false:
    • When true, the results include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
  • traverse_mode: Traversal mode. There are two options: “breadth_first_search” and “depth_first_search”, default is “breadth_first_search”.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
+    "size": 2,
     "kout": [
-        "1:josh",
         "1:vadas",
         "2:lop"
     ],
@@ -1616,7 +1638,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -1624,12 +1646,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -1644,16 +1660,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -1673,6 +1679,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 Use Cases

Refer to 3.2.1.3.

3.2.3 K-neighbor (GET, Basic Version)

3.2.3.1 Function Introduction

Find all vertices that are reachable within depth steps, including the starting vertex, based on the starting vertex, direction, edge type (optional), and depth.

Equivalent to the union of: starting vertex, K-out(1), K-out(2), …, K-out(max_depth).

Params
  • source: ID of the starting vertex, required.
  • direction: Direction in which the starting vertex’s edges extend (OUT, IN, BOTH). Optional, default is BOTH.
  • max_depth: Number of steps, required.
  • label: Edge type, optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for a single vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of vertices to return, also represents the maximum number of vertices to visit during traversal. Optional, default is 10000000.
3.2.3.2 Usage
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -1687,70 +1721,81 @@
         "2:lop"
     ]
 }
-
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of edges (OUT, IN, BOTH). Default is BOTH.
    • labels: List of edge types.
    • properties: Filter edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_vertex: Optional parameter, default is false:
    • If true, the results include complete vertex information (all vertices in the path).
      • When with_path is true, it returns complete information of all vertices in the paths.
      • When with_path is false, it returns complete information of all neighbors.
    • If false, only the vertex ID is returned.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
+    "size": 4,
     "kneighbor": [
-        "2:ripple",
-        "1:marko",
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -1786,16 +1831,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -1815,6 +1850,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 Use Cases

See 3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 Function Introduction

Retrieve the common neighbors of two vertices.

Params
  • vertex: ID of one vertex, required.
  • other: ID of another vertex, required.
  • direction: Direction in which the vertex expands outward (OUT, IN, BOTH). Optional, default is BOTH.
  • label: Edge type. Optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of common neighbors to be returned. Optional, default is 10000000.
3.2.5.2 Usage Method
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
diff --git a/docs/clients/restful-api/index.xml b/docs/clients/restful-api/index.xml
index cb3005a06..55c5c0b0a 100644
--- a/docs/clients/restful-api/index.xml
+++ b/docs/clients/restful-api/index.xml
@@ -2087,7 +2087,7 @@
 <li>The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
 <ul>
 <li>Supports counting the number of neighbors only</li>
-<li>Supports filtering by edge properties</li>
+<li>Supports filtering by edge and vertex properties</li>
 <li>Supports returning the shortest path to reach the neighbor</li>
 </ul>
 </li>
@@ -2099,7 +2099,7 @@
 <li>The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
 <ul>
 <li>Supports counting the number of neighbors only</li>
-<li>Supports filtering by edge properties</li>
+<li>Supports filtering by edge and vertex properties</li>
 <li>Supports returning the shortest path to reach the neighbor</li>
 </ul>
 </li>
@@ -2320,11 +2320,21 @@
 <h6 id="params-1">Params</h6>
 <ul>
 <li>source: The ID of the starting vertex, required.</li>
-<li>Step from the starting point, required, with the following structure:
+<li>steps: Steps from the starting point, required, with the following structure:
 <ul>
 <li>direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.</li>
-<li>labels: List of edge types.</li>
-<li>properties: Filters edges based on property values.</li>
+<li>edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
+<ul>
+<li>label: Edge types.</li>
+<li>properties: Filter edges based on property values.</li>
+</ul>
+</li>
+<li>vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
+<ul>
+<li>label: Vertex types.</li>
+<li>properties: Filter vertices based on property values.</li>
+</ul>
+</li>
 <li>max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was &ldquo;degree&rdquo; instead of &ldquo;max_degree&rdquo;. Starting from version 0.12, &ldquo;max_degree&rdquo; is used uniformly, while still supporting the &ldquo;degree&rdquo; syntax for backward compatibility).</li>
 <li>skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint <code>skip_degree &gt;= max_degree</code>. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).</li>
 </ul>
@@ -2333,9 +2343,20 @@
 <li>nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.</li>
 <li>count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.</li>
 <li>with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.</li>
-<li>with_vertex: Optional, default is false:
+<li>with_edge: Optional parameter, default is false:
+<ul>
+<li>When true, the result will include complete edge information (all edges in the path):
+<ul>
+<li>When with_path is true, it returns complete information of all edges in all paths.</li>
+<li>When with_path is false, no information is returned.</li>
+</ul>
+</li>
+<li>When false, it only returns edge IDs.</li>
+</ul>
+</li>
+<li>with_vertex: Optional parameter, default is false:
 <ul>
-<li>When true, the results include complete vertex information (all vertices in the path):
+<li>When true, the result will include complete vertex information (all vertices in the path):
 <ul>
 <li>When with_path is true, it returns complete information of all vertices in all paths.</li>
 <li>When with_path is false, it returns complete information of all neighbors.</li>
@@ -2346,6 +2367,7 @@
 </li>
 <li>capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.</li>
 <li>limit: Maximum number of vertices to return. Optional, default is 10000000.</li>
+<li>traverse_mode: Traversal mode. There are two options: &ldquo;breadth_first_search&rdquo; and &ldquo;depth_first_search&rdquo;, default is &ldquo;breadth_first_search&rdquo;.</li>
 </ul>
 <h5 id="3222-usage">3.2.2.2 Usage</h5>
 <h6 id="method--url-1">Method &amp; Url</h6>
@@ -2353,12 +2375,34 @@
 </span></span></code></pre></div><h6 id="request-body">Request Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.lt(32)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
@@ -2366,15 +2410,15 @@
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;nearest&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h6 id="response-status-1">Response Status</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span>
 </span></span></code></pre></div><h6 id="response-body-1">Response Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">2</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kout&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
@@ -2382,7 +2426,7 @@
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
@@ -2390,12 +2434,6 @@
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertices&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
@@ -2410,16 +2448,6 @@
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">32</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Beijing&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
@@ -2439,6 +2467,34 @@
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.5</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20160110&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h5 id="3223-use-cases">3.2.2.3 Use Cases</h5>
@@ -2494,11 +2550,21 @@
 <h6 id="params-3">Params</h6>
 <ul>
 <li>source: Starting vertex ID, required.</li>
-<li>Step from the starting point, required, with the following structure:
+<li>steps: Steps from the starting point, required, with the following structure:
 <ul>
-<li>direction: Represents the direction of edges (OUT, IN, BOTH). Default is BOTH.</li>
-<li>labels: List of edge types.</li>
+<li>direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.</li>
+<li>edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
+<ul>
+<li>label: Edge types.</li>
 <li>properties: Filter edges based on property values.</li>
+</ul>
+</li>
+<li>vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
+<ul>
+<li>label: Vertex types.</li>
+<li>properties: Filter vertices based on property values.</li>
+</ul>
+</li>
 <li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported &ldquo;degree.&rdquo; Starting from version 0.12, it is unified as &ldquo;max_degree&rdquo; and is backward compatible with the &ldquo;degree&rdquo; notation.)</li>
 <li>skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint <code>skip_degree &gt;= max_degree</code>. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)</li>
 </ul>
@@ -2506,15 +2572,26 @@
 <li>max_depth: Number of steps, required.</li>
 <li>count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.</li>
 <li>with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.</li>
+<li>with_edge: Optional parameter, default is false:
+<ul>
+<li>When true, the result will include complete edge information (all edges in the path):
+<ul>
+<li>When with_path is true, it returns complete information of all edges in all paths.</li>
+<li>When with_path is false, no information is returned.</li>
+</ul>
+</li>
+<li>When false, it only returns edge IDs.</li>
+</ul>
+</li>
 <li>with_vertex: Optional parameter, default is false:
 <ul>
-<li>If true, the results include complete vertex information (all vertices in the path).
+<li>When true, the result will include complete vertex information (all vertices in the path):
 <ul>
-<li>When with_path is true, it returns complete information of all vertices in the paths.</li>
+<li>When with_path is true, it returns complete information of all vertices in all paths.</li>
 <li>When with_path is false, it returns complete information of all neighbors.</li>
 </ul>
 </li>
-<li>If false, only the vertex ID is returned.</li>
+<li>When false, it only returns vertex IDs.</li>
 </ul>
 </li>
 <li>limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.</li>
@@ -2525,69 +2602,80 @@
 </span></span></code></pre></div><h6 id="request-body-1">Request Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.lt(32)&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_depth&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_depth&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;nearest&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h6 id="response-status-3">Response Status</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span>
 </span></span></code></pre></div><h6 id="response-body-3">Response Body</h6>
 <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">6</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">4</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kneighbor&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;paths&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
 </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
@@ -2623,16 +2711,6 @@
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vadas&#34;</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">27</span><span style="color:#000;font-weight:bold">,</span>
-</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Hongkong&#34;</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
-</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span>
@@ -2652,6 +2730,60 @@
 </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20130220&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.2</span><span style="color:#000;font-weight:bold">,</span>
+</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20170324&#34;</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
+</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span>
 </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span>
 </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span>
 </span></span></code></pre></div><h5 id="3243-use-cases">3.2.4.3 Use Cases</h5>
diff --git a/docs/clients/restful-api/traverser/index.html b/docs/clients/restful-api/traverser/index.html
index f55c371bc..ce1bf8800 100644
--- a/docs/clients/restful-api/traverser/index.html
+++ b/docs/clients/restful-api/traverser/index.html
@@ -1,9 +1,9 @@
 Traverser API | HugeGraph
 

Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
+ Print entire section

Traverser API

3.1 Overview of Traverser API

HugeGraphServer provides a RESTful API interface for the HugeGraph graph database. In addition to the basic CRUD operations for vertices and edges, it also offers several traversal methods, which we refer to as the traverser API. These traversal methods implement various complex graph algorithms, making it convenient for users to analyze and explore the graph.

The Traverser API supported by HugeGraph includes:

  • K-out API: It finds neighbors that are exactly N steps away from a given starting vertex. There are two versions:
    • The basic version uses the GET method to find neighbors that are exactly N steps away from a given starting vertex.
    • The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • K-neighbor API: It finds all neighbors that are within N steps of a given starting vertex. There are two versions:
    • The basic version uses the GET method to find all neighbors that are within N steps of a given starting vertex.
    • The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways:
      • Supports counting the number of neighbors only
      • Supports filtering by edge and vertex properties
      • Supports returning the shortest path to reach the neighbor
  • Same Neighbors: It queries the common neighbors of two vertices.
  • Jaccard Similarity API: It calculates the Jaccard similarity, which includes two types:
    • One type uses the GET method to calculate the similarity (intersection over union) of neighbors between two vertices.
    • The other type uses the POST method to find the top N vertices with the highest Jaccard similarity to a given starting vertex in the entire graph.
  • Shortest Path API: It finds the shortest path between two vertices.
  • All Shortest Paths: It finds all shortest paths between two vertices.
  • Weighted Shortest Path: It finds the shortest weighted path from a starting vertex to a target vertex.
  • Single Source Shortest Path: It finds the weighted shortest path from a single source vertex to all other vertices.
  • Multi Node Shortest Path: It finds the shortest path between every pair of specified vertices.
  • Paths API: It finds all paths between two vertices. There are two versions:
    • The basic version uses the GET method to find all paths between a given starting vertex and an ending vertex.
    • The advanced version uses the POST method to find all paths that meet certain conditions between a set of starting vertices and a set of ending vertices.

3.2 Detailed Explanation of Traverser API

In the following, we provide a detailed explanation of the Traverser API:

  • Customized Paths API: It traverses all paths that pass through a batch of vertices according to a specific pattern.
  • Template Path API: It specifies a starting point, an ending point, and the path information between them to find matching paths.
  • Crosspoints API: It finds the intersection (common ancestors or common descendants) between two vertices.
  • Customized Crosspoints API: It traverses multiple patterns starting from a batch of vertices and finds the intersections with the vertices reached in the final step.
  • Rings API: It finds the cyclic paths that can be reached from a starting vertex.
  • Rays API: It finds the paths from a starting vertex that reach the boundaries (i.e., paths without cycles).
  • Fusiform Similarity API: It finds the fusiform similar vertices to a given vertex.
  • Vertices API:
    • Batch querying vertices by ID.
    • Getting the partitions of vertices.
    • Querying vertices by partition.
  • Edges API:
    • Batch querying edges by ID.
    • Getting the partitions of edges.
    • Querying edges by partition.

3.2 Detailed Explanation of Traverser API

The usage examples provided in this section are based on the graph presented on the TinkerPop official website:

tinkerpop example graph

The data import program is as follows:

public class Loader {
     public static void main(String[] args) {
         HugeClient client = new HugeClient("http://127.0.0.1:8080", "hugegraph");
         SchemaManager schema = client.schema();
@@ -138,29 +138,51 @@
         "1:peter"
     ]
 }
-
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • labels: List of edge types.
    • properties: Filters edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_vertex: Optional, default is false:
    • When true, the results include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
+
3.2.1.3 Use Cases

Finding vertices that are exactly N steps away in a relationship. Two examples:

  • In a family relationship, finding all grandchildren of a person. The set of vertices that can be reached by person A through two consecutive “son” edges.
  • Discovering potential friends in a social network. For example, finding users who are two degrees of friendship away from the target user, reachable through two consecutive “friend” edges.

3.2.2 K-out API (POST, Advanced Version)

3.2.2.1 Functionality Overview

The K-out API allows you to find vertices that are exactly “depth” steps away from a given starting vertex, considering the specified steps (including direction, edge type, and attribute filtering).

The advanced version differs from the basic version of K-out API in the following aspects:

  • Supports counting the number of neighbors only
  • Supports edge attribute filtering
  • Supports returning the shortest path to the neighbor
Params
  • source: The ID of the starting vertex, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was “degree” instead of “max_degree”. Starting from version 0.12, “max_degree” is used uniformly, while still supporting the “degree” syntax for backward compatibility).
    • skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).
  • max_depth: Number of steps, required.
  • nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.
  • count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.
  • with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.
  • limit: Maximum number of vertices to return. Optional, default is 10000000.
  • traverse_mode: Traversal mode. There are two options: “breadth_first_search” and “depth_first_search”, default is “breadth_first_search”.
3.2.2.2 Usage
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kout
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 1,
-  "nearest": true,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 3,
+    "size": 2,
     "kout": [
-        "1:josh",
         "1:vadas",
         "2:lop"
     ],
@@ -168,7 +190,7 @@
         {
             "objects": [
                 "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
@@ -176,12 +198,6 @@
                 "1:marko",
                 "1:vadas"
             ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "2:lop"
-            ]
         }
     ],
     "vertices": [
@@ -196,16 +212,6 @@
             }
         },
         {
-            "id": "1:josh",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "josh",
-                "age": 32,
-                "city": "Beijing"
-            }
-        },
-        {
             "id": "1:vadas",
             "label": "person",
             "type": "vertex",
@@ -225,6 +231,34 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:marko>1>20160110>S1:vadas",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:vadas",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 0.5,
+                "date": "20160110"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        }
     ]
 }
 
3.2.2.3 Use Cases

Refer to 3.2.1.3.

3.2.3 K-neighbor (GET, Basic Version)

3.2.3.1 Function Introduction

Find all vertices that are reachable within depth steps, including the starting vertex, based on the starting vertex, direction, edge type (optional), and depth.

Equivalent to the union of: starting vertex, K-out(1), K-out(2), …, K-out(max_depth).

Params
  • source: ID of the starting vertex, required.
  • direction: Direction in which the starting vertex’s edges extend (OUT, IN, BOTH). Optional, default is BOTH.
  • max_depth: Number of steps, required.
  • label: Edge type, optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for a single vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of vertices to return, also represents the maximum number of vertices to visit during traversal. Optional, default is 10000000.
3.2.3.2 Usage
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/kneighbor?source=“1:marko”&max_depth=2
@@ -239,70 +273,81 @@
         "2:lop"
     ]
 }
-
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • Step from the starting point, required, with the following structure:
    • direction: Represents the direction of edges (OUT, IN, BOTH). Default is BOTH.
    • labels: List of edge types.
    • properties: Filter edges based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_vertex: Optional parameter, default is false:
    • If true, the results include complete vertex information (all vertices in the path).
      • When with_path is true, it returns complete information of all vertices in the paths.
      • When with_path is false, it returns complete information of all neighbors.
    • If false, only the vertex ID is returned.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
+
3.2.3.3 Use Cases

Find all vertices reachable within N steps, for example:

  • In a family relationship, find all descendants within five generations of a person. This can be achieved by traversing five consecutive “parent-child” edges from person A.
  • In a social network, discover friend circles. For example, users who can be reached by 1, 2, or 3 “friend” edges from the target user can form the target user’s friend circle.

3.2.4 K-neighbor API (POST, Advanced Version)

3.2.4.1 Function Introduction

Find all vertices that are reachable within depth steps from the starting vertex, based on the starting vertex, steps (including direction, edge type, and filter properties), and depth.

The difference from the Basic Version of K-neighbor API is that:

  • It supports counting the number of neighbors only.
  • It supports filtering edges based on their properties.
  • It supports returning the shortest path to reach the neighbors.
Params
  • source: Starting vertex ID, required.
  • steps: Steps from the starting point, required, with the following structure:
    • direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.
    • edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered.
      • label: Edge types.
      • properties: Filter edges based on property values.
    • vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered.
      • label: Vertex types.
      • properties: Filter vertices based on property values.
    • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported “degree.” Starting from version 0.12, it is unified as “max_degree” and is backward compatible with the “degree” notation.)
    • skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint skip_degree >= max_degree. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)
  • max_depth: Number of steps, required.
  • count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.
  • with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.
  • with_edge: Optional parameter, default is false:
    • When true, the result will include complete edge information (all edges in the path):
      • When with_path is true, it returns complete information of all edges in all paths.
      • When with_path is false, no information is returned.
    • When false, it only returns edge IDs.
  • with_vertex: Optional parameter, default is false:
    • When true, the result will include complete vertex information (all vertices in the path):
      • When with_path is true, it returns complete information of all vertices in all paths.
      • When with_path is false, it returns complete information of all neighbors.
    • When false, it only returns vertex IDs.
  • limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.
3.2.4.2 Usage Method
Method & Url
POST http://localhost:8080/graphs/{graph}/traversers/kneighbor
 
Request Body
{
-  "source": "1:marko",
-  "step": {
-    "direction": "BOTH",
-    "labels": ["knows", "created"],
-    "properties": {
-      "weight": "P.gt(0.1)"
+    "source": "1:marko",
+    "steps": {
+        "direction": "BOTH",
+        "edge_steps": [
+            {
+                "label": "knows",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            },
+            {
+                "label": "created",
+                "properties": {
+                    "weight": "P.gt(0.1)"
+                }
+            }
+        ],
+        "vertex_steps": [
+            {
+                "label": "person",
+                "properties": {
+                    "age": "P.lt(32)"
+                }
+            },
+            {
+                "label": "software",
+                "properties": {}
+            }
+        ],
+        "max_degree": 10000,
+        "skip_degree": 100000
     },
-    "max_degree": 10000,
-    "skip_degree": 100000
-  },
-  "max_depth": 3,
-  "limit": 10000,
-  "with_vertex": true,
-  "with_path": true
+    "max_depth": 1,
+    "nearest": true,
+    "limit": 10000,
+    "with_vertex": true,
+    "with_path": true,
+    "with_edge": true
 }
 
Response Status
200
 
Response Body
{
-    "size": 6,
+    "size": 4,
     "kneighbor": [
-        "2:ripple",
-        "1:marko",
         "1:josh",
-        "1:vadas",
+        "2:lop",
         "1:peter",
-        "2:lop"
+        "2:ripple"
     ],
     "paths": [
         {
             "objects": [
                 "1:marko",
-                "1:josh",
-                "2:ripple"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko"
-            ]
-        },
-        {
-            "objects": [
-                "1:marko",
-                "1:josh"
+                "2:lop"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "1:vadas"
+                "2:lop",
+                "1:peter"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop",
-                "1:peter"
+                "1:josh"
             ]
         },
         {
             "objects": [
                 "1:marko",
-                "2:lop"
+                "1:josh",
+                "2:ripple"
             ]
         }
     ],
@@ -338,16 +383,6 @@
             }
         },
         {
-            "id": "1:vadas",
-            "label": "person",
-            "type": "vertex",
-            "properties": {
-                "name": "vadas",
-                "age": 27,
-                "city": "Hongkong"
-            }
-        },
-        {
             "id": "1:peter",
             "label": "person",
             "type": "vertex",
@@ -367,6 +402,60 @@
                 "price": 328
             }
         }
+    ],
+    "edges": [
+        {
+            "id": "S1:josh>2>>S2:ripple",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:josh",
+            "outVLabel": "person",
+            "inV": "2:ripple",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 1.0,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.4,
+                "date": "20171210"
+            }
+        },
+        {
+            "id": "S1:marko>1>20130220>S1:josh",
+            "label": "knows",
+            "type": "edge",
+            "outV": "1:marko",
+            "outVLabel": "person",
+            "inV": "1:josh",
+            "inVLabel": "person",
+            "properties": {
+                "weight": 1.0,
+                "date": "20130220"
+            }
+        },
+        {
+            "id": "S1:peter>2>>S2:lop",
+            "label": "created",
+            "type": "edge",
+            "outV": "1:peter",
+            "outVLabel": "person",
+            "inV": "2:lop",
+            "inVLabel": "software",
+            "properties": {
+                "weight": 0.2,
+                "date": "20170324"
+            }
+        }
     ]
 }
 
3.2.4.3 Use Cases

See 3.2.3.3

3.2.5 Same Neighbors

3.2.5.1 Function Introduction

Retrieve the common neighbors of two vertices.

Params
  • vertex: ID of one vertex, required.
  • other: ID of another vertex, required.
  • direction: Direction in which the vertex expands outward (OUT, IN, BOTH). Optional, default is BOTH.
  • label: Edge type. Optional, default represents all edge labels.
  • max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Optional, default is 10000.
  • limit: Maximum number of common neighbors to be returned. Optional, default is 10000000.
3.2.5.2 Usage Method
Method & Url
GET http://localhost:8080/graphs/{graph}/traversers/sameneighbors?vertex=“1:marko”&other="1:josh"
@@ -1720,7 +1809,7 @@
         }
     ]
 }
-
3.2.23.4 Use Cases
  • Querying edges based on ID list, suitable for batch retrieval of edges.
  • Retrieving shard information and querying edges based on shards, useful for traversing all edges.

Last modified May 20, 2023: Update traverser.md (#247) (98b098d6)
+
3.2.23.4 Use Cases
  • Querying edges based on ID list, suitable for batch retrieval of edges.
  • Retrieving shard information and querying edges based on shards, useful for traversing all edges.

diff --git a/docs/index.xml b/docs/index.xml index 81db4b762..3b5fe16df 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -11370,7 +11370,7 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod <li>The advanced version uses the POST method to find neighbors that are exactly N steps away from a given starting vertex. The advanced version differs from the basic version in the following ways: <ul> <li>Supports counting the number of neighbors only</li> -<li>Supports filtering by edge properties</li> +<li>Supports filtering by edge and vertex properties</li> <li>Supports returning the shortest path to reach the neighbor</li> </ul> </li> @@ -11382,7 +11382,7 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod <li>The advanced version uses the POST method to find all neighbors that are within N steps of a given starting vertex. The advanced version differs from the basic version in the following ways: <ul> <li>Supports counting the number of neighbors only</li> -<li>Supports filtering by edge properties</li> +<li>Supports filtering by edge and vertex properties</li> <li>Supports returning the shortest path to reach the neighbor</li> </ul> </li> @@ -11603,11 +11603,21 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod <h6 id="params-1">Params</h6> <ul> <li>source: The ID of the starting vertex, required.</li> -<li>Step from the starting point, required, with the following structure: +<li>steps: Steps from the starting point, required, with the following structure: <ul> <li>direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.</li> -<li>labels: List of edge types.</li> -<li>properties: Filters edges based on property values.</li> +<li>edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered. +<ul> +<li>label: Edge types.</li> +<li>properties: Filter edges based on property values.</li> +</ul> +</li> +<li>vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered. +<ul> +<li>label: Vertex types.</li> +<li>properties: Filter vertices based on property values.</li> +</ul> +</li> <li>max_degree: Maximum number of adjacent edges to traverse for a single vertex, default is 10000 (Note: Prior to version 0.12, the parameter name was &ldquo;degree&rdquo; instead of &ldquo;max_degree&rdquo;. Starting from version 0.12, &ldquo;max_degree&rdquo; is used uniformly, while still supporting the &ldquo;degree&rdquo; syntax for backward compatibility).</li> <li>skip_degree: Sets the minimum number of edges to skip super vertices during the query process. If the number of adjacent edges for a vertex is greater than skip_degree, the vertex is completely skipped. Optional. If enabled, it should satisfy the constraint <code>skip_degree &gt;= max_degree</code>. Default is 0 (not enabled), indicating no skipping of any vertices (Note: Enabling this configuration means that during traversal, an attempt will be made to access skip_degree edges of a vertex, not just max_degree edges. This incurs additional traversal overhead and may have a significant impact on query performance. Please enable it only after understanding the implications).</li> </ul> @@ -11616,9 +11626,20 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod <li>nearest: When nearest is true, it means the shortest path length from the starting vertex to the result vertex is equal to depth, and there is no shorter path. When nearest is false, it means there is a path of length depth from the starting vertex to the result vertex (not necessarily the shortest and can contain cycles). Optional, default is true.</li> <li>count_only: Boolean value, true indicates only counting the number of results without returning specific results, false indicates returning specific results. Default is false.</li> <li>with_path: When true, it returns the shortest path from the starting vertex to each neighbor. When false, it does not return the shortest path. Optional, default is false.</li> -<li>with_vertex: Optional, default is false: +<li>with_edge: Optional parameter, default is false: +<ul> +<li>When true, the result will include complete edge information (all edges in the path): +<ul> +<li>When with_path is true, it returns complete information of all edges in all paths.</li> +<li>When with_path is false, no information is returned.</li> +</ul> +</li> +<li>When false, it only returns edge IDs.</li> +</ul> +</li> +<li>with_vertex: Optional parameter, default is false: <ul> -<li>When true, the results include complete vertex information (all vertices in the path): +<li>When true, the result will include complete vertex information (all vertices in the path): <ul> <li>When with_path is true, it returns complete information of all vertices in all paths.</li> <li>When with_path is false, it returns complete information of all neighbors.</li> @@ -11629,6 +11650,7 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </li> <li>capacity: Maximum number of vertices to visit during traversal. Optional, default is 10000000.</li> <li>limit: Maximum number of vertices to return. Optional, default is 10000000.</li> +<li>traverse_mode: Traversal mode. There are two options: &ldquo;breadth_first_search&rdquo; and &ldquo;depth_first_search&rdquo;, default is &ldquo;breadth_first_search&rdquo;.</li> </ul> <h5 id="3222-usage">3.2.2.2 Usage</h5> <h6 id="method--url-1">Method &amp; Url</h6> @@ -11636,12 +11658,34 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span></code></pre></div><h6 id="request-body">Request Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.lt(32)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> @@ -11649,15 +11693,15 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;nearest&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h6 id="response-status-1">Response Status</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span> </span></span></code></pre></div><h6 id="response-body-1">Response Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">2</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kout&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> @@ -11665,7 +11709,7 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> @@ -11673,12 +11717,6 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertices&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> @@ -11693,16 +11731,6 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">32</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Beijing&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> @@ -11722,6 +11750,34 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20160110&gt;S1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.5</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20160110&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h5 id="3223-use-cases">3.2.2.3 Use Cases</h5> @@ -11777,11 +11833,21 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod <h6 id="params-3">Params</h6> <ul> <li>source: Starting vertex ID, required.</li> -<li>Step from the starting point, required, with the following structure: +<li>steps: Steps from the starting point, required, with the following structure: <ul> -<li>direction: Represents the direction of edges (OUT, IN, BOTH). Default is BOTH.</li> -<li>labels: List of edge types.</li> +<li>direction: Represents the direction of the edges (OUT, IN, BOTH), default is BOTH.</li> +<li>edge_steps: The step set of edges, supporting label and properties filtering for the edge. If edge_steps is empty, the edge is not filtered. +<ul> +<li>label: Edge types.</li> <li>properties: Filter edges based on property values.</li> +</ul> +</li> +<li>vertex_steps: The step set of vertices, supporting label and properties filtering for the vertex. If vertex_steps is empty, the vertex is not filtered. +<ul> +<li>label: Vertex types.</li> +<li>properties: Filter vertices based on property values.</li> +</ul> +</li> <li>max_degree: Maximum number of adjacent edges to traverse for each vertex during the query process. Default is 10000. (Note: Before version 0.12, the parameter name within the step only supported &ldquo;degree.&rdquo; Starting from version 0.12, it is unified as &ldquo;max_degree&rdquo; and is backward compatible with the &ldquo;degree&rdquo; notation.)</li> <li>skip_degree: Used to set the minimum number of edges to discard super vertices during the query process. When the number of adjacent edges for a vertex exceeds skip_degree, the vertex is completely discarded. This is an optional parameter. If enabled, it should satisfy the constraint <code>skip_degree &gt;= max_degree</code>. Default is 0 (not enabled), which means no vertices are skipped. (Note: When this configuration is enabled, the traversal will attempt to access skip_degree edges for each vertex, not just max_degree edges. This incurs additional traversal overhead and may significantly impact query performance. Please make sure to understand this before enabling.)</li> </ul> @@ -11789,15 +11855,26 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod <li>max_depth: Number of steps, required.</li> <li>count_only: Boolean value. If true, only the count of results is returned without the actual results. If false, the specific results are returned. Default is false.</li> <li>with_path: If true, the shortest path from the starting point to each neighbor is returned. If false, the shortest path from the starting point to each neighbor is not returned. This is an optional parameter. Default is false.</li> +<li>with_edge: Optional parameter, default is false: +<ul> +<li>When true, the result will include complete edge information (all edges in the path): +<ul> +<li>When with_path is true, it returns complete information of all edges in all paths.</li> +<li>When with_path is false, no information is returned.</li> +</ul> +</li> +<li>When false, it only returns edge IDs.</li> +</ul> +</li> <li>with_vertex: Optional parameter, default is false: <ul> -<li>If true, the results include complete vertex information (all vertices in the path). +<li>When true, the result will include complete vertex information (all vertices in the path): <ul> -<li>When with_path is true, it returns complete information of all vertices in the paths.</li> +<li>When with_path is true, it returns complete information of all vertices in all paths.</li> <li>When with_path is false, it returns complete information of all neighbors.</li> </ul> </li> -<li>If false, only the vertex ID is returned.</li> +<li>When false, it only returns vertex IDs.</li> </ul> </li> <li>limit: Maximum number of vertices to be returned. Also, the maximum number of vertices visited during the traversal process. This is an optional parameter. Default is 10000000.</li> @@ -11808,69 +11885,80 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span></code></pre></div><h6 id="request-body-1">Request Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;source&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;step&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;direction&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;BOTH&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;labels&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edge_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.gt(0.1)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;vertex_steps&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;P.lt(32)&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;skip_degree&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">100000</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_depth&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">3</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;max_depth&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;nearest&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;limit&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">10000</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_vertex&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;with_edge&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#204a87;font-weight:bold">true</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h6 id="response-status-3">Response Status</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#0000cf;font-weight:bold">200</span> </span></span></code></pre></div><h6 id="response-body-3">Response Body</h6> <div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span><span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">6</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;size&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">4</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;kneighbor&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;paths&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:peter&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;objects&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> </span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:lop&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> @@ -11906,16 +11994,6 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;name&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vadas&#34;</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;age&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">27</span><span style="color:#000;font-weight:bold">,</span> -</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;city&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;Hongkong&#34;</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> -</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;vertex&#34;</span><span style="color:#000;font-weight:bold">,</span> @@ -11935,6 +12013,60 @@ Merging mode as needed, and when the Restore is completed, restore the graph mod </span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;price&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">328</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">],</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;edges&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">[</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:josh&gt;2&gt;&gt;S2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:ripple&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.4</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20171210&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:marko&gt;1&gt;20130220&gt;S1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;knows&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:marko&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:josh&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">1.0</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20130220&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">},</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;id&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;S1:peter&gt;2&gt;&gt;S2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;label&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;created&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;type&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;edge&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;1:peter&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;outVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;person&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inV&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;2:lop&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;inVLabel&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;software&#34;</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;properties&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#000;font-weight:bold">{</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;weight&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#0000cf;font-weight:bold">0.2</span><span style="color:#000;font-weight:bold">,</span> +</span></span><span style="display:flex;"><span> <span style="color:#204a87;font-weight:bold">&#34;date&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;20170324&#34;</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> +</span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">}</span> </span></span><span style="display:flex;"><span> <span style="color:#000;font-weight:bold">]</span> </span></span><span style="display:flex;"><span><span style="color:#000;font-weight:bold">}</span> </span></span></code></pre></div><h5 id="3243-use-cases">3.2.4.3 Use Cases</h5> diff --git a/en/sitemap.xml b/en/sitemap.xml index 721a5043d..c5f523397 100644 --- a/en/sitemap.xml +++ b/en/sitemap.xml @@ -1 +1 @@ -/docs/guides/architectural/2023-06-25T21:06:07+08:00/docs/config/config-guide/2023-06-21T14:48:04+08:00/docs/language/hugegraph-gremlin/2023-05-14T07:29:41-05:00/docs/contribution-guidelines/contribute/2023-09-09T20:50:32+08:00/docs/performance/hugegraph-benchmark-0.5.6/2023-05-14T22:31:02-05:00/docs/quickstart/hugegraph-server/2023-09-12T12:18:04+08:00/docs/introduction/readme/2023-06-18T14:57:33+08:00/docs/changelog/hugegraph-1.0.0-release-notes/2023-01-09T07:41:46+08:00/docs/clients/restful-api/2023-07-31T23:55:30+08:00/docs/clients/restful-api/schema/2023-05-14T19:35:13+08:00/docs/performance/api-preformance/hugegraph-api-0.5.6-rocksdb/2023-05-15T22:47:44-05:00/docs/config/config-option/2023-02-08T20:56:09+08:00/docs/guides/desgin-concept/2023-05-14T07:20:21-05:00/docs/download/download/2023-06-17T14:43:04+08:00/docs/language/hugegraph-example/2023-02-02T01:21:10+08:00/docs/clients/hugegraph-client/2023-01-01T16:16:43+08:00/docs/performance/api-preformance/2023-06-17T14:43:04+08:00/docs/quickstart/hugegraph-loader/2023-05-17T23:12:35+08:00/docs/clients/restful-api/propertykey/2023-05-19T05:15:56-05:00/docs/changelog/hugegraph-0.12.0-release-notes/2023-05-18T06:11:19-05:00/docs/contribution-guidelines/subscribe/2023-06-17T14:43:04+08:00/docs/performance/api-preformance/hugegraph-api-0.5.6-cassandra/2023-05-16T23:30:00-05:00/docs/config/config-authentication/2023-05-19T05:12:35-05:00/docs/clients/gremlin-console/2023-06-12T23:52:07+08:00/docs/guides/custom-plugin/2023-05-14T07:22:46-05:00/docs/performance/hugegraph-loader-performance/2023-05-18T00:34:48-05:00/docs/quickstart/hugegraph-tools/2023-05-09T21:27:34+08:00/docs/quickstart/2022-04-17T11:36:55+08:00/docs/contribution-guidelines/validate-release/2023-02-15T16:14:21+08:00/docs/clients/restful-api/vertexlabel/2023-05-19T04:03:23-05:00/docs/guides/backup-restore/2023-05-14T07:26:12-05:00/docs/config/2022-04-17T11:36:55+08:00/docs/config/config-https/2023-05-19T05:04:16-05:00/docs/clients/restful-api/edgelabel/2023-05-19T05:17:26-05:00/docs/contribution-guidelines/hugegraph-server-idea-setup/2023-06-25T21:06:07+08:00/docs/quickstart/hugegraph-hubble/2023-09-12T12:18:04+08:00/docs/clients/2022-04-17T11:36:55+08:00/docs/config/config-computer/2023-01-01T16:16:43+08:00/docs/guides/faq/2023-05-14T07:28:41-05:00/docs/clients/restful-api/indexlabel/2023-05-19T05:18:17-05:00/docs/quickstart/hugegraph-client/2023-05-14T22:39:27+08:00/docs/guides/2022-04-17T11:36:55+08:00/docs/clients/restful-api/rebuild/2022-05-09T18:43:53+08:00/docs/quickstart/hugegraph-computer/2023-06-25T21:06:46+08:00/docs/language/2022-04-17T11:36:55+08:00/docs/clients/restful-api/vertex/2023-06-04T23:04:47+08:00/docs/clients/restful-api/edge/2023-06-29T10:17:29+08:00/docs/performance/2022-04-17T11:36:55+08:00/docs/contribution-guidelines/2022-12-30T19:36:31+08:00/docs/clients/restful-api/traverser/2023-05-20T06:12:55-05:00/docs/changelog/2022-04-28T21:26:41+08:00/docs/clients/restful-api/rank/2022-09-15T12:59:59+08:00/docs/clients/restful-api/variable/2023-05-21T04:38:57-05:00/docs/clients/restful-api/graphs/2022-05-27T09:27:37+08:00/docs/clients/restful-api/task/2022-09-15T12:59:59+08:00/docs/clients/restful-api/gremlin/2023-05-21T04:39:11-05:00/docs/clients/restful-api/cypher/2023-07-31T23:55:30+08:00/docs/clients/restful-api/auth/2023-07-31T23:55:30+08:00/docs/clients/restful-api/other/2023-07-31T23:55:30+08:00/docs/2022-12-30T19:57:48+08:00/blog/news/2022-03-21T18:55:33+08:00/blog/releases/2022-03-21T18:55:33+08:00/blog/2018/10/06/easy-documentation-with-docsy/2022-03-21T18:55:33+08:00/blog/2018/10/06/the-second-blog-post/2022-03-21T18:55:33+08:00/blog/2018/01/04/another-great-release/2022-03-21T18:55:33+08:00/docs/cla/2022-03-21T19:51:14+08:00/docs/performance/hugegraph-benchmark-0.4.4/2022-09-15T12:59:59+08:00/docs/summary/2023-07-31T23:55:30+08:00/blog/2022-03-21T18:55:33+08:00/categories//community/2022-03-21T18:55:33+08:00/2023-01-15T13:44:01+00:00/search/2022-03-21T18:55:33+08:00/tags/ \ No newline at end of file +/docs/guides/architectural/2023-06-25T21:06:07+08:00/docs/config/config-guide/2023-06-21T14:48:04+08:00/docs/language/hugegraph-gremlin/2023-05-14T07:29:41-05:00/docs/contribution-guidelines/contribute/2023-09-09T20:50:32+08:00/docs/performance/hugegraph-benchmark-0.5.6/2023-05-14T22:31:02-05:00/docs/quickstart/hugegraph-server/2023-09-12T12:18:04+08:00/docs/introduction/readme/2023-06-18T14:57:33+08:00/docs/changelog/hugegraph-1.0.0-release-notes/2023-01-09T07:41:46+08:00/docs/clients/restful-api/2023-07-31T23:55:30+08:00/docs/clients/restful-api/schema/2023-05-14T19:35:13+08:00/docs/performance/api-preformance/hugegraph-api-0.5.6-rocksdb/2023-05-15T22:47:44-05:00/docs/config/config-option/2023-02-08T20:56:09+08:00/docs/guides/desgin-concept/2023-05-14T07:20:21-05:00/docs/download/download/2023-06-17T14:43:04+08:00/docs/language/hugegraph-example/2023-02-02T01:21:10+08:00/docs/clients/hugegraph-client/2023-01-01T16:16:43+08:00/docs/performance/api-preformance/2023-06-17T14:43:04+08:00/docs/quickstart/hugegraph-loader/2023-05-17T23:12:35+08:00/docs/clients/restful-api/propertykey/2023-05-19T05:15:56-05:00/docs/changelog/hugegraph-0.12.0-release-notes/2023-05-18T06:11:19-05:00/docs/contribution-guidelines/subscribe/2023-06-17T14:43:04+08:00/docs/performance/api-preformance/hugegraph-api-0.5.6-cassandra/2023-05-16T23:30:00-05:00/docs/config/config-authentication/2023-05-19T05:12:35-05:00/docs/clients/gremlin-console/2023-06-12T23:52:07+08:00/docs/guides/custom-plugin/2023-05-14T07:22:46-05:00/docs/performance/hugegraph-loader-performance/2023-05-18T00:34:48-05:00/docs/quickstart/hugegraph-tools/2023-05-09T21:27:34+08:00/docs/quickstart/2022-04-17T11:36:55+08:00/docs/contribution-guidelines/validate-release/2023-02-15T16:14:21+08:00/docs/clients/restful-api/vertexlabel/2023-05-19T04:03:23-05:00/docs/guides/backup-restore/2023-05-14T07:26:12-05:00/docs/config/2022-04-17T11:36:55+08:00/docs/config/config-https/2023-05-19T05:04:16-05:00/docs/clients/restful-api/edgelabel/2023-05-19T05:17:26-05:00/docs/contribution-guidelines/hugegraph-server-idea-setup/2023-06-25T21:06:07+08:00/docs/quickstart/hugegraph-hubble/2023-09-12T12:18:04+08:00/docs/clients/2022-04-17T11:36:55+08:00/docs/config/config-computer/2023-01-01T16:16:43+08:00/docs/guides/faq/2023-05-14T07:28:41-05:00/docs/clients/restful-api/indexlabel/2023-05-19T05:18:17-05:00/docs/quickstart/hugegraph-client/2023-05-14T22:39:27+08:00/docs/guides/2022-04-17T11:36:55+08:00/docs/clients/restful-api/rebuild/2022-05-09T18:43:53+08:00/docs/quickstart/hugegraph-computer/2023-06-25T21:06:46+08:00/docs/language/2022-04-17T11:36:55+08:00/docs/clients/restful-api/vertex/2023-06-04T23:04:47+08:00/docs/clients/restful-api/edge/2023-06-29T10:17:29+08:00/docs/performance/2022-04-17T11:36:55+08:00/docs/contribution-guidelines/2022-12-30T19:36:31+08:00/docs/clients/restful-api/traverser/2023-09-15T11:15:58+08:00/docs/changelog/2022-04-28T21:26:41+08:00/docs/clients/restful-api/rank/2022-09-15T12:59:59+08:00/docs/clients/restful-api/variable/2023-05-21T04:38:57-05:00/docs/clients/restful-api/graphs/2022-05-27T09:27:37+08:00/docs/clients/restful-api/task/2022-09-15T12:59:59+08:00/docs/clients/restful-api/gremlin/2023-05-21T04:39:11-05:00/docs/clients/restful-api/cypher/2023-07-31T23:55:30+08:00/docs/clients/restful-api/auth/2023-07-31T23:55:30+08:00/docs/clients/restful-api/other/2023-07-31T23:55:30+08:00/docs/2022-12-30T19:57:48+08:00/blog/news/2022-03-21T18:55:33+08:00/blog/releases/2022-03-21T18:55:33+08:00/blog/2018/10/06/easy-documentation-with-docsy/2022-03-21T18:55:33+08:00/blog/2018/10/06/the-second-blog-post/2022-03-21T18:55:33+08:00/blog/2018/01/04/another-great-release/2022-03-21T18:55:33+08:00/docs/cla/2022-03-21T19:51:14+08:00/docs/performance/hugegraph-benchmark-0.4.4/2022-09-15T12:59:59+08:00/docs/summary/2023-07-31T23:55:30+08:00/blog/2022-03-21T18:55:33+08:00/categories//community/2022-03-21T18:55:33+08:00/2023-01-15T13:44:01+00:00/search/2022-03-21T18:55:33+08:00/tags/ \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index cfe19fca4..862f254dc 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -/en/sitemap.xml2023-09-12T12:18:04+08:00/cn/sitemap.xml2023-09-12T12:18:04+08:00 \ No newline at end of file +/en/sitemap.xml2023-09-15T11:15:58+08:00/cn/sitemap.xml2023-09-15T11:15:58+08:00 \ No newline at end of file