MongoDB Programming Tips


How to Run Like Queries in MongoDB

When working with textual data in mongodb, you may want to fetch documents with partial match on a field. You can use the $regex operator in mongodb for running like queries. By default, the like query using $regex is case sensitive. Assume that you have collection in your mongodb containing names of the countries. A […]