Use python regular expressions.
import re
db.col.find({'music_description': {'$in': [ re.compile('.*heavy.*'), re.compile('.*metal.*')]}})
More Related Contents:
- Query Mongodb on month, day, year… of a datetime
- How can I use ‘Not Like’ operator in MongoDB
- Append item to MongoDB document array in PyMongo without re-insertion
- Append item to MongoDB document array in PyMongo without re-insertion
- How to convert a pymongo.cursor.Cursor into a dict?
- How to continue insertion after duplicate key error using PyMongo
- Can you specify a key for $addToSet in Mongo?
- Performing regex queries with PyMongo
- Check if every element in array matches condition
- mongodb: insert if not exists
- MongoDB nested lookup with 3 levels
- How can I get a random record from MongoDB?
- mongo – couldn’t connect to server 127.0.0.1:27017
- Aggregation filter after $lookup
- Matching ObjectId to String for $graphLookup
- Mongodb aggregation lookup with conditions
- How to get back the Original document back after aggregation
- Calculate skip value for given record for sorted paging
- Create an ISODate with pyMongo
- Authenticate After Picking the Database
- MongoDB lookup when foreign field is an array of objects
- Get the latest record from mongodb collection
- Getting Spark, Python, and MongoDB to work together
- Pull and addtoset at the same time with mongo
- Using .sort with PyMongo
- How does MongoDB order their docs in one collection? [duplicate]
- Efficient paging in MongoDB using mgo
- count array occurrences across all documents with mongo
- Return actual type of a field in MongoDB
- MongoDB $lookup on nested document