Ah, I also didn't notice. But still getting error. Variable var1 is not defined.
I think we need to think differently? Because $var1 will hold the array of data and using case statement will look for var1 inside the name of the property. Maybe I'm wrong?
If you're getting variable var1 is not defined, then you likely missed the $ in $var1 needed to define it as a parameter, not a variable.
As for lorem IN $var1, this is using an IN operator to check for membership of lorem in the $var1 parameter, which should be possible as this should be a list, and you combined the lists in your first line and UNWIND them to lorem.
Then can you provide the entire query you're running again? And the version of Neo4j you are using? Also you are certain you're passing a $var1 list parameter?
That returns your input lists of strings. It doesn't return nodes, and it doesn't really give you any new information that you didn't have before you ran the query.
Hi, I forgot about my expected result and still not getting as desired result. I wanted to group them something like below which doesn't work:
UNWIND $var1 + $var2 as lorem
MERGE (s:Sorem) - [:LOREMED] -> (l:Lorem {
name: lorem.name,
mm: CASE lorem IN $var1 THEN 'ok' ELSE 'good' END
})
RETURN l.mm = 'ok' as okay, l.mm='good' as good
I mean to return which have 'ok', return them in array, and which have 'good' return them in separate array. Hope, this is clear.
Further, if it isn't still clear. I meant to return $var1, $var2. RETURN $var1, $var2