简体   繁体   English

密码查询在特定节点上冻结

[英]Cypher query freezes on specific node

I am running this query: 我正在运行此查询:

MATCH (n1:Word{word: '"+word1+"'})-[r*]-(n2:Word) 
WHERE (n2.word <> n1.word) AND (n2.pos CONTAINS 'NN') 
RETURN DISTINCT(n2)

for different values of word1 and it runs perfectly for dozens of words, but when it comes to the word 'method' the server just doesn't responds. 对于word1不同值,它可以完美地运行数十个单词,但是当涉及到'method'一词时,服务器只是不响应。 I've checked all the nodes with this value on the property.word and nothing seems to be different than other nodes. 我已经在property.word上检查了所有具有此值的节点,似乎与其他节点没有什么不同。

Any help is welcome. 欢迎任何帮助。 Thanks 谢谢

I've realized that in the specific case of this word there was a loop that fitted the query and because of [r*] was allowing the query to search for paths of infinite length, result: deadlock . 我已经意识到,在该单词的特定情况下,存在一个适合查询的循环,并且由于[r*]允许查询搜索无限长的路径,结果为: deadlock

By fixing a max path size (eg [r*0..10] ) my problem was solved. 通过固定最大路径大小(例如[r*0..10] ),解决了我的问题。

Hope this helps other users (: 希望这对其他用户有帮助(:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM