运行不区分大小写的密码查询
问题描述:
是否可以在neo4j上运行不区分大小写的密码查询?
Is it possible to run a case-insensitive cypher query on neo4j?
当我输入以下内容时:
start n=node(*)
match n-[]->m
where (m.name="Neo")
return m
它返回一行.但是当我输入以下内容时:
it returns one row. But when I type into this:
start n=node(*)
match n-[]->m
where (m.name="neo")
return m
它不返回任何东西;因为名称被另存为"Neo".有没有一种简单的方法可以执行不区分大小写的查询?
it does not return anything; because the name is saved as "Neo". Is there a simple way to run case-insensitive queries?
答
是的,通过使用不区分大小写的正则表达式:
Yes, by using case insensitive regular expressions:
WHERE m.name =~ '(?i)neo'
https://neo4j.com /docs/cypher-manual/current/clauses/where/#case-insensitive-regular-expressions