Neo4j Cypher - String to Integer -
here value in property r.weight string. have tried following possibilities convert integer,
int(r.weight) integer.parseint(r.weight) convert(int,r.weight)
but nothing works. there proper function so?
reduce(total = 0, r in relationships(p): total + int(r.weight))
note : not possible duplicate of gremlin type conversion
version : 1.9.5
as stated in comments above there no easy way cypher in 1.9.x. workaround use neo4j-shell
, use gsh
or jsh
or eval
command execute script iterates on relationships , converts value of weight
property string numeric.
Comments
Post a Comment