How to do random node scan in NebulaGraph database?

85 Views Asked by At

I tried to fetch 10 random and non-isolated nodes in the Nebula Graph database. According to their docs the query should be MATCH (n:tag)-[e]-() RETURN n LIMIT 10. But it fails to work.

The screenshots of running the query is as follows: enter image description here

What is wrong with my query? Such a simple query should not be wrong.

1

There are 1 best solutions below

2
On BEST ANSWER

First, there is no index has been created. If you want to execute MATCH (n:tag)-[e]-() RETURN n LIMIT 10, please create at least one index.

If you don't want to create indexes here, you must specify the direction of the edge. For example MATCH (n:tag)-[e]->() RETURN n LIMIT 10