I am new to neo4j and knowledgegraph. need help with the below issue.
def who_be_present(I_AM,I_WANT_TO_MEET):
print(f"I'm {I_AM}")
print(f"I want to meet {I_WANT_TO_MEET}")
request="""
MATCH (cs:Person { name:$pfrom }),(ms:Person { name:$pto }), p = shortestPath((cs)-[:ACTED_IN|:DIRECTED*]-(ms))
WHERE length(p)> 1
RETURN p
"""
cursor = graph.run(request,pfrom=I_AM,pto=I_WANT_TO_MEET)
while cursor.forward():
print(cursor['p'])
print('\n')
I_AM='Brad Anderson'
I_WANT_TO_MEET='Brad Pitt'
who_be_present(I_AM,I_WANT_TO_MEET)
I_AM='Kanwaljeet Singh'
I_WANT_TO_MEET='Nick Nolte'
who_be_present(I_AM,I_WANT_TO_MEET)
---------------------------------
The error says
ClientError: [Statement.SyntaxError] The semantics of using colon in the separation of alternative relationship types in conjunction with
the use of variable binding, inlined property predicates, or variable length is no longer supported.
Please separate the relationships types using `:A|B|C` instead (line 2, column 83 (offset: 87))
" MATCH (cs:Person { name:$pfrom }),(ms:Person { name:$pto }), p = shortestPath((cs)-[:ACTED_IN|:DIRECTED*]-(ms))"