This works: MATCH (m:Movie) WHERE m.tagline CONTAINS 'love' RETURN m.title
This does not work: MATCH (m:Movie) WHERE toLower(m.tagline) CONTAINS 'love' RETURN m.title
The error is "Expected a string value for 'toLower', but got: NO_VALUE..." Same error when I tried MATCH (m:Movie) WHERE toUpper(m.tagline) CONTAINS 'LOVE' RETURN m.title
If you have loaded Movie Graph using :play movie graph and then ran Create statements then above query with tolower() and toUpper() should work.
I gave a try by myself and it is working fine.
However you can try below to see what exactly happening with m.tagline
MATCH (m:Movie) WHERE toLower(coalesce(toString(m.tagline), 'NO_VALUE')) CONTAINS 'love' RETURN m.title, m.tagline
Hmm... Yes, of course I loaded the Movie graph first. I've been moving forward in the tutorial since I posted and have had no problems with any of the other exercises I've done at this point (just finished the rest of 04.) Using toLower(coalesce(toString... works, but the original toLower(... still does not work.
What is the output of below
MATCH (m:Movie) WHERE toLower(coalesce(toString(m.tagline), 'NO_VALUE')) CONTAINS 'love' RETURN m, toLower(coalesce(toString(m.tagline), 'NO_VALUE'))
You are seeing the error with toLower() because one of the nodes does not have a tagline property. If all Movie nodes had a property, tagline, then you would. not see this error.
If this is the case, then why do some users (ie Vivek) say it works for them, but not for me? Given that we are all working with the same database, seems like there is another issue?
At some point in the course the student is instructed to add a tagline to this node. As long as all nodes have this property, then the statement will execute with no error.