1

I am executing following query:

MATCH (e:COMP) WHERE e.componentID= "f4db22e7-68d2-473d-960b-c98dbbadb3a0" 
with e limit 1 CALL apoc.path.subgraphAll(e, 
{relationshipFilter:'CHILD_OF|CONNECTED_TO|LINKED_TO', limit:10}) YIELD nodes 
UNWIND nodes as node  RETURN node.componentID as uuid, node.orphanID as oid, 
node.cTime as time

I was expecting that i will get 10 rows but I am getting more than 300 rows. Not sure if I am missing something here?

Actually in my graph there can be 100,000 nodes related with these relationship (CHILD_OF,CONNECTED_TO,LINKED_TO). In that case I just want to limit result to 1000.

Shishal
  • 27
  • 1
  • 9

1 Answers1

1

Figured this out on the neo4j-users slack.

This was being executed with APOC 3.2.3.5, where the limit config parameter was only being utilized when there was a labelFilter using end-node or terminator-node filters. This was noted in the documentation for the previous version.

With APOC 3.2.3.6 (and 3.3.0.2) limit now applies in all cases, no matter what filters are used and even without using the label filter.

While the lines in the documentation referencing the restriction were removed with the latest release, this isn't enough. The change itself (and behavior before the change) needs to be added to the documentation.

InverseFalcon
  • 29,576
  • 4
  • 38
  • 51