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"] }});