cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Case Insensitive

myrights99
Graph Buddy

Hello:

Currently, I am working Graph data model and soon going to ETL data from Snowflake. I want to make my Neo4j Graph Database properties case insensitive so that I can query MATCH without worrying about case sensitivity.

Any help setting up or configuring case insensitive at the creation of the Database or for all nodes\relationships properties is greatly appreciated.
Thanks.

2 ACCEPTED SOLUTIONS

Neo4j is case sensitive.  You could save your string properties as lower case when loading your data using 'toLower()' on each.  Then, you just need to make sure your matching string is lower case.  You can also use case insensitive grep string searches by prepending your search string with '(?i)'

 

View solution in original post

ameyasoft
Graph Maven

Only approach is to use 'toLower' function in your queries. Say a Person node has a property 'name' = "JoHn". The query:
MATCH (a:Person) WHERE toLower(a.name) = toLower("jOhN"). This will return the Person node.

 

View solution in original post

3 REPLIES 3

Neo4j is case sensitive.  You could save your string properties as lower case when loading your data using 'toLower()' on each.  Then, you just need to make sure your matching string is lower case.  You can also use case insensitive grep string searches by prepending your search string with '(?i)'

 

ameyasoft
Graph Maven

Only approach is to use 'toLower' function in your queries. Say a Person node has a property 'name' = "JoHn". The query:
MATCH (a:Person) WHERE toLower(a.name) = toLower("jOhN"). This will return the Person node.

 

myrights99
Graph Buddy

Thank you all for your answers; I am from an SQL Server background, so I was looking for a similar configuration.
Thank you again.