How can I improve the search time for this simple Neo4j regEx query?
I am using node's neo4j module. My query is very simple, it applies a regex to 30,000 beer nodes, returning any nodes that have a name property that contains the regEx string. The returned result is approx 2,000 nodes, and it currently takes 80,000ms to complete.
db.query("MATCH (n:Beer) WHERE n.name =~ '(?i).*"+ String+".*' RETURN n", function(data) {
//do some stuff
//res.send(data)
})