问题
I am trying to get likers for some artists through an index on Name :
START n=node:Artist(Name =~ 'Michael*.')
MATCH n<-[:LIKES]-liker
return liker.Id, n.Label
LIMIT 50
And I have this error : Invalid query string literal or parameter expected "START n=node:ArtistId(Name =~ 'Michael*.')"
I am wondering how can I use regex in index query? I know I can use regex in match but I don't know how can I use regex in START.
Thanks for your help
回答1:
You can't use normal regex syntax, but you can use wildcards:
START n=node:Artist('Name:Michael*')
Edit:
Neo4J uses Apache Lucene for index queries. You have a few other cool things you can do in addition to wildcards.
来源:https://stackoverflow.com/questions/14175546/neo4j-index-query-with-regex