Say you have the following line of code:
var filter = Builders<BsonDocument>.Filter.Where(t => t.id == myId);
var result = collection.Find(filter).ToList();
Does the filter builder translate the lambda to a literal $where clause or does it optimize it to use the $eq clause? $where has slow performance so I don't want to use it if there's no translation.
This is a simple example but we have other queries in our code that are lengthier but would easily translate to non-$where queries.