1

I am applying this query for example

FOR path 
  IN ANY K_SHORTEST_PATHS  
  'person/27' TO 'person/36'    
  case_item, relationship, transaction_link, passenger, is_on_watchlist, georelation, communication   
  RETURN path

this query returns all the paths with different depth i want to give in min and max depth to return only paths in this specific range

Tom Regner
  • 6,856
  • 4
  • 32
  • 47
kamal adel
  • 11
  • 1

1 Answers1

0

You have to decide if you want to find the shortest paths, or paths with minimum and maximum depth. To limit your query to a certain max depth you switch from K_SHORTEST_PATHS to K_PATHS and add the limitation after the IN (replace MAX with your desired depth):

FOR path
  IN 1..MAX ANY K_PATHS
  person/27' TO 'person/36'    
  case_item, relationship, transaction_link, passenger, is_on_watchlist, georelation, communication   
  RETURN path
Tom Regner
  • 6,856
  • 4
  • 32
  • 47