Output status messages to the console from cypher neo4j-shell
I find it a really interesting topic. IMO the best way to achieve it in a powerful way is to write a server plugin :
You create a TransactionEventHandler that implements the TransactionEventHandler interface
You receive a TransactionData which represents what has been changed during the transaction
You can transform the changes into json
and finally write them to the logs
activate the logs in the appenders
The "Return" string is printed twice since the first is the header, and the second is the content. You can use "AS" with backticks to change the header to make it look better:
MATCH (n) DETACH DELETE n;RETURN "Existing data removed" AS `Action:`;
Even better, you can combine the operation output with the message:
MATCH (n) DETACH DELETE nRETURN count(n) AS `Existing data removed:`;
That would be great, but I don't think it's possible. In the past I've resorted to counting the number of cypher queries and then counting the number of success messages in the terminal (ugh ;)
You're best bet is probably to write a script which pipes the cypher queries to the shell one-by-one and outputs in between.
(also, you may have this covered, but to help with slow imports remember to create appropriate indexes and avoid the eager!)