0

Does this cql

match p=(n)-[*0..6]-(m) 
  where id(n)=487682 and id(m)= 487671 with p 
where ALL(x IN nodes(p) 
  WHERE SINGLE(y IN nodes(p) 
  WHERE x=y)) 
and all(x in nodes(p)[1..length(p)] 
  where x.name='1444')  
and all(x in relationships(p) 
  where x.RELATIONSHIP_RANK>'67')  
return p 

can be optimized? When I used this cql to query,it took a long time.Any help would be appriciated.

ASR
  • 1,801
  • 5
  • 25
  • 33
andy
  • 13
  • 4
  • Can you explain what you're trying to accomplish ? I mean you're obviously looking for certain paths (maximum 6 hops) between two given nodes ... and then it looks like you're trying to filter out certain paths ... but which ones ? – Tom Geudens Jun 19 '17 at 06:54
  • @Tom Geudens HI,thank you for looking my question.This cql I wanted to get all the paths where each node in every paths are single and each node not include startNode and endNode in every paths has a name '1444' and each relationship's RELATIONSHIP_RANK more than 67.This requirement are very complex,and this query has a low efficiency,but I could not come up with a better cql – andy Jun 19 '17 at 07:28
  • @andy - I suggest you put these conditions in your question itself. Maybe some nice bullet points. Will help other's to answer your question. – Gandalf Jun 20 '17 at 05:52

0 Answers0