Morning,
Recently been restructuring my data to cope with dynamic fields being added into documents, having a List[Map[String, String]]
field following the Attribute Pattern.
Now, how should I do to query the data in here?
I’ve got a couple of cases:
-
To query all the data without caring about
myNewField.key
andmyNewField.value
, should I just do{$exists: {myNewField.key: true}}
for bothkey
andvalue
? -
Also, to query by specific keys and values, is an
$in
performant enough or is there a better way to do so?