سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top