My records each have the following attributes of type Array:
alpha, beta, gamma, delta, epsilon, zeta
I know I can find records that have at least one component in an array, like this:
db.accommodations.find({'alpha.1': {$exists: true}})
I want to be able to find records that have at least one component in at least 3 arrays. For example, this record could be found:
alpha = []
beta = [1, 1, 1]
gamma = []
delta = [1, 1]
epsilon = []
zeta = [1]
But this could not:
alpha = []
beta = [1, 1, 1]
gamma = []
delta = [1, 1]
epsilon = []
zeta = []
Is there any way I can do this?