Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Neo4j 比较节点值的长度_Neo4j_Cypher - Fatal编程技术网

Neo4j 比较节点值的长度

Neo4j 比较节点值的长度,neo4j,cypher,Neo4j,Cypher,在Cypher中,如何使用length和substring比较两个值的长度。。像这样 length(n.VALUE)= length(SUBSTRING(INPUT_STRING, 0,length(n.VALUE))) 使用此语法时,我总是会遇到此异常: SubstringFunction expected to be of type Collection but it is of type String 当前的length函数用于集合。目前还没有办法在cypher中获取字符串的长度。我

Cypher
中,如何使用
length
substring
比较两个值的长度。。像这样

length(n.VALUE)= length(SUBSTRING(INPUT_STRING, 0,length(n.VALUE))) 
使用此语法时,我总是会遇到此异常:

SubstringFunction expected to be of type Collection but it is of type String

当前的
length
函数用于集合。目前还没有办法在cypher中获取字符串的长度。我已经开始添加一些新的字符串函数,比如
soundex
charindex
,我将把这个函数放到一堆要做的事情上,但我可能要再过几周才能完成它(而且它需要通过验收,甚至可能只作为M05+提供)。

,谢谢你的提示,但是我可以使用这个技巧的任何解决方法吗?你在查询中到底想做什么?确保一个字符串长度小于另一个字符串长度?感谢Wes,最简单的方法是
length(n.VALUE),但我的条件必须是
length(n.VALUE)=length(SUBSTRING(INPUT_string))
。。这就是问题所在。。我希望能尽快处理,因为我真的需要这个条件。我不确定我是否理解你对你的条件做了什么。n.VALUE和INPUT_字符串的可能值是什么?条件的可能结果是:真/假?