1

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.

randomv
  • 218
  • 1
  • 7

1 Answers1

0

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

foesa Yang
  • 26
  • 5
  • Thank you foesa. But I actually set the direction of the edge. Please see my screenshot. I ran `MATCH (n:Person)-[e]-() RETURN n LIMIT 10` but still got the same error. – randomv Dec 30 '22 at 07:01
  • And yes, I don't want to create an index for such a test. Indexes can be disk-consuming. – randomv Dec 30 '22 at 07:02