Changing the type from StringArray to String using cypher

Hello everyone,

I want to make the following query but I get an error because of the type of f.synonyms (it is a StringArray):

MATCH (f:Family)-[:IS_PROVIDED]->(p:Provider)-[:OFFERS]->(pr:Product)

WHERE ( =~ '(?i)virtual server(?i).')
OR (toLower( CONTAINS toLower('virtual server'))
OR (f.synonyms =~ '(?i)virtual server(?i).
OR (toLower(toString(f.synonyms)) CONTAINS toLower('virtual server'))


Is there any way how to change the type from StringArray to String in order to check if some phrase is contained or not???

Hi @busymo16,

Hope by StringArray you do not mean list. so example of StringArray is 'virtual server'
What kind of data you have in f.synonyms?
Are you just trying to find all the family for which or f.synonyms contains 'virtual server'.

If by StringArray you mean a list of strings, then you can use predicate functions to test if any, all, or none of the elements in the list contains the phrase:

OR any(syn IN f.synonyms WHERE toLower(syn) CONTAINS 'virtual server')