I'm trying to limit my query to 5 results, but it's only returning 2. There are definitely more than 5 'Person' nodes in the database. Is there a particular reason why the LIMIT clause might not return the expected number of results?
MATCH (n:Person)
RETURN n
LIMIT 5;
Your query is correct. The LIMIT
clause limits the number of results that are returned, but it doesn't guarantee that this number will be reached. If your query returns fewer results than the limit, it simply means there are not enough matching nodes in the database.