Is there a way to implement a function that filters for a variable number of predefined attributes with a respective minimum and maximum value?
I can manage for a fixed number of attributes, but I want to keep the number variable. Something like:
information in a list :
dictionary1: attribute_name1 - min1 - max1
dictionary2: attribute_name 2 - min2 - max2
dictionary3: attribute3 - min3 - max3
-> filter for all elements where the attributes are in the given range
MATCH(a:node_label)
WHERE a.attribute1>min1 AND a.attribute1min2 AND a.attribute2min3 AND a.attribute3<max3
return a
it should also work if I only have these attributes in the list:
dictionary1: attribute1 - min1 - max1
dictionary2: attribute2 - min2 - max2
-> filter for all elements where the attributes are in the given range
MATCH(a:node_label)
WHERE a.attribute1>min1 AND a.attribute1min2 AND a.attribute2<max2
return a
or if there is a random number of dictionaries in the list
I tried it with unwind, but then I have only the attributes for one dictionary available at the same time to use it in WHERE. The problem is I need to connect the WHERE statement of all dictionary together...
Anyone an idea?