sql >> Base de Datos >  >> NoSQL >> MongoDB

mongodb encuentra por múltiples elementos de matriz

Depende de si está tratando de encontrar documentos donde words contiene ambos elementos (text y here ) usando $all :

db.things.find({ words: { $all: ["text", "here"] }});

o cualquiera de ellos (text o here ) usando $in :

db.things.find({ words: { $in: ["text", "here"] }});