PyMongo $ in + $ regex
Jak mogę połączyć $ regex z $ in w PyMongo?
Chcę też poszukać/*.heavy.*/
lub/*.metal.*/
.
Próbowałem w pytonie bez powodzenia:
db.col.find({'music_description' : { '$in' : [ {'$regex':'/*.heavy.*/'} ]} })
Odpowiednikiem w powłoce Mongo jest:
db.inventory.find( { music_description: { $in: [ /heavy/, /metal/ ] } } )