Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-07-2020 10:29 AM
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
What am I doing wrong?
05-07-2020 11:23 AM
Hi @begloria.c3,
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
05-07-2020 11:43 AM
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.
05-07-2020 11:46 AM
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'))
05-07-2020 04:58 PM
05-07-2020 01:12 PM
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.
Elaine
05-13-2020 05:45 AM
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?
05-13-2020 08:30 AM
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.
Elaine
05-13-2020 09:53 AM
I am ending this convo and starting a new thread. Long story short is we believe it is an underlying issue with Neo4j on a Mac.
Thank you for trying to help!
05-14-2020 01:50 PM
As a follow-up, this does seem to be a bug, but likely not OS specific.
More details here:
All the sessions of the conference are now available online