This is similar to the question posed here.
I have a query that works:
match (n:Campus {name:'Georgia Southern University'}) return n;
1 row 38 ms
However, I'm building a search feature where I'd like to be able to have a user type "georgia" and return a list of nodes from the Campus label index whose name is like "Georgia".
This query does not work in neo4j-community-2.0.0 (although it did in -M05):
match (n:Campus) where n.`name` =~ '(?i).*Georgia.*' return n;
0 row 29 ms
- Is my expression incorrect? Quite possible, knowing my handicap with regexes.
- Otherwise, is it possible to do a regular expression search on a label index?
Thanks!
Edit: More info, output from the neo4j-shell:
neo4j-sh (?)$ match (n:Campus {name:'Georgia Southern University'}) return n.name;
+-------------------------------+
| n.name |
+-------------------------------+
| "Georgia Southern University" |
| "Georgia Southern University" |
+-------------------------------+
2 rows
45 ms
neo4j-sh (?)$ match (n:Campus) where n.`name` =~ '(?i).*Georgia.*' return n;
+---+
| n |
+---+
+---+
0 row
10 ms