Basically I have the following query:
UNWIND range(0, 100) as id
WITH f, pr, [x in keys(pr)] as props
WHERE toLower(f.name) = toLower('family_name') AND toLower('specification') IN [word in pr[props[id]] | toLower(toString(word))]
RETURN DISTINCT f.name AS Family
With this query I want to find the family that the product belongs to based of a quality that the product has. The quality of the product is stored as a property value (in a list of values). When I use PROFILE, for the query above I get 622795 total db hits in 126ms. When I just reduce the range of UNWIND (0, 50), I do get 248773 total db hits in 69 ms.
Is there any better way how to check if a 'specification' is inside a list of property values of the Product node without knowing the property key and using UNWIND (because this seems expensive)??
Thank you in advance.