One small comment, you're using:
apoc.cypher.doIt
which uses a write transaction. It is not needed here and you can use a read transaction for better performance:
apoc.cypher.run
Hi,
I think that performance wise and ease of use, it is way better to use Full Text Search which is using the embedded Lucene engine.
Basically you create an index based on the node's label and properties and then call the search with a Lucene query...
For whatever it is worth a year later, but might help others, there is a way to do dynamic cypher with the help of the APOC library.
Consider this query:
@QUERY("CALL apoc.cypher.doIt({filterQuery}, {id: {id}}) " +
"YIELD value AS v_res RETURN x,y,z"...