scholrly / neo4django

Drop-in Neo4j/Django integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EDIT: icontains case not covered when dealing with StringArrayProperties

tonjo opened this issue · comments

Row 353 in query.py:

elif condition.operator in (OPERATORS.CONTAINS, OPERATORS.ICONTAINS):
    if isinstance(field._property, StringProperty):

EDIT:
The icontains check should cover the StringArrayProperty case.

Temporary workaround is quite easy: search the .lower() version of the string,
provided the StringArray contains lowercase strings.

@tonjo when there's no index, this can be solved pretty easily in Cypher. Maybe icontains against an array property should always go straight to the Cypher case, instead of trying to be clever with index usage?

Not sure I understood this. Are you suggesting to solve it directly with a Cypher query?
Besides, field is indexed, and as workaround I'm cycling through the StringArray.