Results collection contains the following data.
_id "9FK5k755ueAYdfip3"
createdAt Date {Sat Mar 12 2016 19:58:46 GMT+0100 (CET)}
results [Object { errorId="uX6byeiuGjRNXTj6s", error="02/09/15 13:01:29 backu...ox file was not found. ", time="02/09/15 13:01:29"},
Object { errorId="uX6byeiuGjRNXTj6s", error="02/09/15 13:01:29 backu...ox file was not found. ", time="02/09/15 13:01:29"},
Object { errorId="uX6byeiuGjRNXTj6s", error="02/09/15 13:22:42 backu...ox file was not found. ", time="02/09/15 13:22:42"},
432 more...]
results:
0 Object { errorId="uX6byeiuGjRNXTj6s", error="02/09/15 13:01:29 backu...ox file was not found. ", time="02/09/15 13:01:29"}
1 Object { errorId="uX6byeiuGjRNXTj6s", error="02/09/15 13:01:29 backu...ox file was not found. ", time="02/09/15 13:01:29"}
2 Object { errorId="uX6byeiuGjRNXTj6s", error="02/09/15 13:22:42 backu...ox file was not found. ", time="02/09/15 13:22:42"}
...
14 Object { errorId="5vfLjdbaQLgbuCiNZ", error="02/09/15 16:04:10 backu...minated with an error. ", time="02/09/15 16:04:10"}
15 Object { errorId="5vfLjdbaQLgbuCiNZ", error="02/09/15 16:04:10 backu...minated with an error. ", time="02/09/15 16:04:10"}
16 Object { errorId="5vfLjdbaQLgbuCiNZ", error="02/09/15 16:04:10 backu...minated with an error. ", time="02/09/15 16:04:10"}
...
183 Object { errorId="uX6byeiuGjRNXTj6s", error="03/13/15 13:36:24 backu...ox file was not found. ", time="03/13/15 13:36:24"}
184 Object { errorId="uX6byeiuGjRNXTj6s", error="03/13/15 13:42:39 backu...ox file was not found. ", time="03/13/15 13:42:39"}
185 Object { errorId="uX6byeiuGjRNXTj6s", error="03/13/15 13:42:40 backu...ox file was not found. ", time="03/13/15 13:42:40"}
I am looking for a query that retrieves all documents with a specific errorId within the results arrays.
I have attempted various queries without success.
For example:
Results.find ({ results: { $elemMatch : { errorId: 'uX6byeiuGjRNXTj6s'}}})
Results.find ({ results: { $elemMatch : { Key: 'errorId', 'errorId': 'uX6byeiuGjRNXTj6s'}}}).fetch()
Results.find ({'results.errorId.$' : 'uX6byeiuGjRNXTj6s'}).fetch()
Your assistance would be greatly appreciated.
Thank you!!!