Problems with accentuation in Neo4j

Asked

Viewed 108 times

3

How can I, for example, search for us that contains an attribute with the value of 'Jose' and return the nodes that have this attribute with the value of 'Joseph', or 'Josee' ? That is, make the searches ignore accentuation and or cedillas, as in other databases.

1 answer

2


Regular Expressions

I played with Neo4j some time ago and remember that the names used were always treated as case-sensitive. I don’t remember seeing any features collations same as SQL databases.

Anyway, according to this neo4j documentation, you can use regular expressions in your darlings. In your case you would need to specify the accents possibilities you want according to the input user’s.

For example:

MATCH (n)
WHERE n.name =~ 'jos[eéê]'
RETURN n.name, n.age
  • Thank you very much. I gave it right. I had read about the regular expressions, but I was writing it wrong. As for the case sensitive, I use the tolower function even in both the input and the database comparison string at search time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.