Query variable length relationships with filter

Hi,
I have the following query:

match p = (b:Account)-[:friend_of*0..4 {verified:true}]-(m:Account) return p
                                       ^_____________^

I need to bring all the relationships up to level 4 where verified:true.

Running this query throw: RedisGraph does not currently support filters on variable-length paths

What’re my alternatives here?

Thanks
Avi

MATCH p = (:Account)-[:friend_of*1..4]-(:Account) WITH p AS p UNWIND(relationships(p)) AS e WITH p AS p, e AS e WHERE e.verified = true WITH p AS p, count(e) AS verified WHERE verified = length(p) RETURN p

1 Like

Hi Roy.
Thank you.
Your query returned timeout after ~40 sec. After restarting the machine it did not return any result.
The database has very few records: ~3,000 nodes and twice the edges.
Why is it taking so long…
Can it be an infinite loop inside?
Thanks
Avi

I have solved it with optional match.
Tanks

can you kindly your solution to this problem. it is upsetting Redis is yet to catch to this feature

Hey Kris, I don’t remember how I solved it, it changed a lot since. post your query in a new question and I believe we will be able to help you.
Avi