Example:
> db.stuff.save({\"foo\":\"bar\"});
> db.stuff.find({\"foo\":\"bar\"}).count();
1
> db.stuff.find({\"foo\":\"BAR\"}).count();
0
Suppose you want to search "column" in "Table" and you want case insenstive search. The best and efficient way is as below;
//create empty JSON Object
mycolumn = {};
//check if column has valid value
if(column) {
mycolumn.column = {$regex: new RegExp(column), $options: "i"};
}
Table.find(mycolumn);
Above code just adds your search value as RegEx and searches in with insensitve criteria set with "i" as option.
All the best.