let products = Restaurant.Collection.Products.find({
categoryId: categoryId,
$text: {
$search: tags.join(' ')
}
}, {
fields: {
score: {
$meta: 'textScore'
}
},
sort: {
score: {
$meta: 'textScore'
}
}
});
let products = Restaurant.Collection.Products.find({
categoryId: categoryId,
$text: {
$search: tags.join(' ')
}
}, {
fields: {
score: {
$meta: 'textScore'
}
},
sort: {
score: {
$meta: 'textScore'
}
},
limit: 10
});
2 Likes
thanks i’ve got it to work
1 Like