I am working on windows. I have created a text file of Cypher query using notepad. How can I run the query in the file using Neo4jShell or Neo4j web interface console.
With Neo4j web interface I just do copy&paste.
On the console I sometimes use curl to talk to Neo4j's REST interface. That allows me to use the same queries (with references to separate parameters) that I have in my application. You have to wrap the query in your file into a json object for that.
data.json:
{
"query":"match (u:User) where u.username={username} return u",
"params":{"username":"trenkerbe"}
}
command:
curl -i -X POST -H "Content-Type: application/json" -d @data.json http://localhost:7474/db/data/cypher