I have a document containing a list of keywords which I want to search on, however Mongo only ever returns a single result even though there are many documents which contain the same keyword.
The documents look something like this:
{
_Id: 51192567f5e65101d471c46b
Name: "Cat",
KeyWords: ["cat", "animal", "small"]
}
I am searching the database in the mongo shell using the following:
db.Resources.find({"KeyWords":"cat"})
I wanted to get back all documents where the KeyWords array contains cat (there are many), however I just get one document.