I have a database with non-English characters (like accents, namely: “é, í, â, à”) and I'm having issues when trying to filter fields containing these characters. For instance, imagine a node called “Ángeles Martínez”. I attempted the following:
<MATCH (p:PERSON)-[r:APPEARS_IN]->(p2:ARTICLE) WHERE p.Name =~ '(?i)angeles martinez' RETURN p/>
The issue is I want to filter those names having non-English characters in the database without explicitly writing them on the query (i.e.: I would like to write “angeles martinez” and, then, Neo should retrieve the node called “Ángeles Martínez”).
I have implemented the following solutions with no success at all:
Implement a regex like: (?iu), (?u)… (it didn’t work)
Concatenate several “replace” functions aiming to remove accents from the original nodes (this works but it’s not the ideal solution I’m looking for)
Implement the index fulltext search functionality (it didn’t work)
Include in apoc.text.regreplace() a regex to remove those accents (it didn’t work)
I have recently seen that a user defined function (UDF) can be created and it may solve the issues with the filtering. However, I’m planning to use Python to query the Neo4J database and these UDFs seem to work only for Java.