my thinking is mistaken & how I should frame the problem:
I am using Compass: the goal is to restrict data size and return content with an array matching some values.
as an example from Airbnb sample data: I get this from the query below: unknown operator $and
{amenities:{$and:[{$size:20},
{$all:["Pool","Microwave","WiFi"]}
]}}
Both parts individually are validstrong text :
{amenities:{$size:20}}
and
{amenities:
{$all:["Pool","Microwave"]}
}
If I pull $and to top-level as in :
{$and:[expression1, exprression2]} it still is not valid
eg: {$and:[amenities:{{$size:20},
{$all:["Pool","Microwave"]}
]}
What have I got backward? Thanks!