Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
on 12-16-2021 02:46 AM
What needed was to give some examples of CREATE queries of nodes and relationships, so it can understand the schema.
Then you ask with natural language what query to generate:
it can write queries even for Suffix string search using ENDS WITH
and the engine could understand that an actor is a person with relation ACTED_IN .
"""
Create an openCypher query filtering only the actors whose names end with "s"
"""
query = """
MATCH (p:Person)-[:ACTED_IN]->(m:Movie)
WHERE p.name ENDS WITH 's'
RETURN p
"""