0

I want to get all the vertices of each tag in the Nebula Graph Database.

I tried using fetch prop on player * yield properties(vertex) to get the results, but this was not possible.

(root@nebula) [basketballplayer]> fetch prop on player * yield properties(vertex)
[ERROR (-1004)]: SyntaxError: syntax error near `* yield '

And I tried using neo4j statement match (v:player) return v, but it didn't work either.

root@nebula) [basketballplayer]> match (v:player) return v
[ERROR (-1005)]: Scan vertices or edges need to specify a limit number, or limit number can not push down.

Who can teach me how to use the Nebula Graph database correctly?

Cooper
  • 120
  • 9

1 Answers1

0

By design, the per tag/edge type scan(just like a tabular DBMS data scan) was chosen to be prohibited by default.

Due to the data was stored in NebulaGraph in a more linked/graph way(think of a graph traversal, which started from known nodes and then expand multiple hops along with the edges/relationships). Thus enabling a non-graph scan of data in a distributed graph database like NebulaGraph is costly.

To enable such queries, an index needs to be explicitly created before that 0 or LIMIT sample clause [1] was used(could also avoid full scan).

  • [1]: example of query(need index for starting node) with LIMIT clause

MATCH (v:player) RETURN v LIMIT 100

Note: the index is only related to the starting node seeking of the query pattern.

Wey Gu
  • 575
  • 1
  • 6
  • 11