Hi,
How do you check existence of the node if the property is type of array?
Before, I set the Product node's "vertical" property is 'string' type.
so I used like query below
match (w:Word)-[:SEARCH]->(c:Category)
with c
with collect(c)[0..5] as cs
return any(cat in cs where exists((cat)-[:INCLUDE]->(:Product {vertical: 'DEP'}))) as flag1,
any(cat in cs where exists((cat)-[:INCLUDE]->(:Product {vertical: 'OUT'}))) as flag2
but now, 'vertical' property is array type.
and this is impossible way (it's obvious)
any(cat in cs where exists((cat)-[:INCLUDE]->(:Product {'DEP' in vertical}))) as flag1,
any(cat in cs where exists((cat)-[:INCLUDE]->(:Product {'OUT' in vertical}))) as flag2
example query is the part of the whole cypher..
so I have to care about the cost of the cypher.
Please comment if you have any good idea
Thanks
Leila