cancel
Showing results for 
Search instead for 
Did you mean: 

Case Insensitive

myrights99
Node Clone

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

glilienfield
Ninja
Ninja

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

glilienfield
Ninja
Ninja

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
Node Clone

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

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.