Pregunta

It is very easy to do case insensitive Cypher queries. I am now trying to figure out if there is an easy way to make Accent Insensitive queries. I am thinking of a query similar to :

MATCH n:City WHERE n.Name =~ '(?a)Montreal' RETURN n

Is someone has found a solution to this? Do I have to rely on creating FullText Lucene Index along with a Custom Analyzer?

¿Fue útil?

Solución

Lucene Fulltext index is automatically case insensitive. So no custom analyzer needed.

Also another option is to store the lowercase version of your information in the graph as well and use that for lookups or search. I know it's a weak workaround.

Otros consejos

Schema indexes in Neo4j 2.0 currently do not allow to configure analyzers. This might be added in a subsequent version of Neo4j. In the meantime you can either go with legacy indexes (those allow you to customize analyzers) or normalize the strings on application side.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top