Why can't I MATCH (v:<tag>)-[e:<edge>]-(v2:<tag>) RETURN v LIMIT 10 in the NebulaGraph database

57 Views Asked by At

NebulaGraph database MATCH statement

The Nebula Graph docs say that "When traversing all vertices of the specified Tag or edge of the specified Edge Type, such as MATCH (v:player) RETURN v LIMIT N, there is no need to create an index, but you need to use LIMIT to limit the number of output results." But when I run the statement in the preceding screenshot, it told me that I did not have a limit number, which I did.

What is the correct way to RETURN v without creating indexes?

1

There are 1 best solutions below

1
On

I met the same issue before. Actually, when you specify both a tag and an edge for a query simultaneously, you need to create an index for the tag or the edge first.

Create an index for the tag company first and then try to execute it again.