I am doing a search engine for a project in Meteor and I need to put a search box between two dates. However, the dates are in an array in MongoDB:
"relatorios" : [ { "mes" : ISODate("2013-11-01T02:00:00Z"), "revistas" : "2", "brochuras" : "2", "livros" : "0", "folhetos" : "0", "revisitas" : "0", "estudos" : "0", "horas" : "12" }, { "mes" : ISODate("2013-09-01T03:00:00Z"), "revistas" : "0", "brochuras" : "0", "livros" : "0", "folhetos" : "0", "revisitas" : "0", "estudos" : "0", "horas" : "12" } ]
I tried to request the filter dates directly mongo, but could not. I read on some forums about using MapReduce in Meteor. What is the best option? And if possible, how can I do this?
source share