Reputation: 26498
At present the implementation is
MATCH (emp:Employee)
WHERE emp.name = 'Abc'
RETURN emp
Is it possible to have a like clause e.g.
MATCH (emp:Employee)
WHERE emp.name Like %'Abc'%
RETURN emp
like the way we have in SQL ?
Upvotes: 5
Views: 3636
Reputation: 19373
Yes, with a regular expression(see http://neo4j.com/docs/stable/query-where.html#query-where-regex)
MATCH (emp:Employee)
WHERE emp.name =~ '.*Abc.*'
RETURN emp
or with CONTAINS (case sensitive) (see http://neo4j.com/docs/stable/query-where.html#query-where-string)
MATCH (emp:Employee)
WHERE emp.name CONTAINS 'Abc'
RETURN emp
CONTAINS is available in Neo4j 2.3.x
Upvotes: 9