当字符串包含转义字符时,查询不会返回数据。 我在这里做错了什么?
neo4j-sh (?)$ MATCH (c: Country{country_name:'Côte d\'Ivoire'}) return c;
==> +---+
==> | c |
==> +---+
==> +---+
==> 0 row
==> 7 ms
neo4j-sh (?)$ MATCH (c: Country) where (c.country_name = 'Côte d\'Ivoire') return c;
==> +---+
==> | c |
==> +---+
==> +---+
==> 0 row
==> 16 ms
neo4j-sh (?)$ MATCH (c: Country) where (c.country_name =~ '.*Ivoire') return c;
==> +------------------------------------------+
==> | c |
==> +------------------------------------------+
==> | Node[3349]{country_name:"Cote d'Ivoire"} |
==> +------------------------------------------+
==> 1 row
==> 13 ms
neo4j-sh (?)$
答案 0 :(得分:0)
错误在于,在一个节点中,该值是科特迪瓦,另一个节点是科特迪瓦。 我使两个值都相同,现在正在工作。