I have a collection of documents that are nodes of a graph, where each node has its list of adjacencies:
{
'_id': ObjectId('547ce6f4ffaba82f360fc525'),
'adj': ['no_2'],
'nome': 'no_1'
}
{
'_id': ObjectId('547ce6f4ffaba82f360fc526'),
'adj': ['no_1', 'no_3'],
'nome': 'no_2'
}
{
'_id': ObjectId('547ce6f4ffaba82f360fc527'),
'adj': ['no_1'],
'nome': 'no_3'
}
I want to list all documents (nodes) where the size of array 'adj' is greater than or equal to an X value.
I tried to resolve using $ gt and $ size but both the $ size operator only returns by exact value when it does not seem possible to use the two operators together.