4
许多(所有?)ArangoDB的图形函数接受一个“示例”文档。对于例如参数的文件说:ArangoDB示例:用x的键匹配任何东西?
{} : Returns all possible vertices for this graph
idString : Returns the vertex/edge with the id idString
[idString1, idString2 ...] : Returns the vertices/edges with the ids matching the given strings.
{key1 : value1, key2 : value2} : Returns the vertices/edges that match this example, which means that both have key1 and key2 with the corresponding attributes
{key1.key2 : value1, key3 : value2} : It is possible to chain keys, which means that a document {key1 : {key2 : value1}, key3 : value2} would be a match
[{key1 : value1}, {key2 : value2}] : Returns the vertices/edges that match one of the examples, which means that either key1 or key2 are set with the corresponding value
在每种情况下(除了idString),看来我既提供密钥和阿朗戈来匹配的值。
有没有办法让我创建一个匹配任何具有特定键的文档的示例(只要该值不为空)?
为了方便说明,在这里我想获得的是有“演员”的关键任何相邻顶点和我不在乎什么键的值(只要它有一个):
db._query('RETURN GRAPH_NEIGHBORS("movies", {movie: "Scarfies"}, {neighborExamples: [{actor: *}]})').toArray()
这是可能在ArangoDB?
谢谢。我为此打开了问题[1241](https://github.com/arangodb/arangodb/issues/1241)。 – mikewilliamson 2015-02-11 15:32:07