[英]query on one source to multi destination in arrangodb 3
In arrangodb
(version 3) I need a query to find all routes between one source to multi destination for example : 在
arrangodb
(版本3)中,我需要一个查询来查找一个源到多个目标之间的所有路由,例如:
source : 5111454 destination : [5454,59812,54754,589895] 来源:5111454目的地:[5454,59812,54754,589895]
I need query to check relation between 5111454 and each one destination array 我需要查询来检查5111454和每个目标数组之间的关系
In fact I want to merge below four queries in one query: 实际上我想在一个查询中合并以下四个查询:
FOR vertex[, edge]
IN ANY SHORTEST_PATH
**5111454** TO **5454**
GRAPH graphName
[OPTIONS options]
FOR vertex[, edge]
IN ANY SHORTEST_PATH
**5111454** TO **59812**
GRAPH graphName
FOR vertex[, edge]
IN ANY SHORTEST_PATH
**5111454** TO **54754**
GRAPH graphName
[OPTIONS options]
FOR vertex[, edge]
IN ANY SHORTEST_PATH
**5111454** TO **589895**
GRAPH graphName
[OPTIONS options]
You should check the AQL graph traversal docs . 您应该检查AQL图表遍历文档 。
You query could look like: 您的查询可能如下所示:
LET ids = [5454,59812,54754,589895]
FOR vertex, edge, path
IN ANY 5111454
GRAPH graphName
FILTER vertex._id IN ids
RETURN path
Note: The startVertex (5111454) has to be the id from the document (field _id
) the same belongs to the ids
array if your FILTER
works with _id
. 注意:如果您的
FILTER
与_id
一起使用,则startVertex(5111454)必须是文档(字段_id
)中的ids
,同样属于ids
数组。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.