Hey guys!
My question is: is there a way to fetch documents by document’s field which value is text?
Please see what I have now:
let’s assume I have following schema:
{
productName,
productType
}
and I have for example three productType
s: Type one
, Type Two
, Type three
, and productType
is stored as a string.
I can easily fetch all the products with Products.find({}, {sort: {createdAt: -1}}).fetch()
, but I need to fetch them by productType
, which is text. I tried $text
but no luck
So may be some of y’all have a hint?
UPD
Always forget to mention this. I’m using Meteor v. 1.4.2.3