I want to ask a problem about a relationship screening

i want to screening the transaction's amount greater than 50000,here is my cypher"
match (a)-[r:transaction]->(b)
where tofloat(r.amount)>=50000
return a,r,b" but when i run the cypher,the graph still shows the transaction which amount is less than 50000,like this

what is the problem
? thanks a lot

By default, the browser shows all relationships between all nodes returned. You can turn this feature off in the browser settings.

See “connect result nodes” setting in screenshot below. Uncheck it.

@1422094090

also and its unclear from the initial description but if Neo4j v5x if you have a relationship index

CREATE INDEX rel_range_txn_amount FOR ()-[r:transaction]-() ON (r.amount)

then

will be much more performant. Note, if you include the to_float() then the index is not utilized

awesome bro,it really helps me!!!

it looks like" create index" is much more convenient, i will try ,thanks!

1 Like