Ejecución de una consulta de cifrado que no distingue entre mayúsculas y minúsculas


¿Es posible ejecutar una consulta de cifrado sin distinción de mayúsculas y minúsculas en neo4j?

Intenta eso: http://console.neo4j.org /

Cuando escribo esto:

start n=node(*) 
match n-[]->m 
where (m.name="Neo") 
return m

Devuelve una fila. Pero cuando escribo esto:

start n=node(*) 
match n-[]->m 
where (m.name="neo") 
return m

No devuelve nada; porque el nombre se guarda como "Neo". ¿Existe una forma sencilla de ejecutar consultas que no distinguen mayúsculas de minúsculas?

Author: gzg, 2012-11-18

2 answers

Sí, usando expresiones regulares que no distinguen entre mayúsculas y minúsculas:

WHERE m.name =~ '(?i)neo'

Http://neo4j.com/docs/developer-manual/current/cypher/clauses/where/#where-case-insensitive-regular-expressions

 39
Author: Volker Pacher,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-16 13:49:57

Otra forma sería:

WHERE LOWER(m.Name) = LOWER("Neo")

Y si está utilizando el cliente Neo4j (. NET):

Client.Cypher.Match("(m:Entity)")
    .Where("LOWER(m.Name) = LOWER({name})")
    .WithParam("name", inputName)
    .Return(m => m.As<Entity>())
    .Results
    .FirstOrDefault();
 9
Author: rotgers,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-01-05 16:01:54