Try to fix EasySearch. Part 3.

Thanks to danielkaiser and xet7 !
This commit is contained in:
Lauri Ojansivu 2022-08-31 22:00:09 +03:00
parent 8fc23429a0
commit 0d3b7ca041

View file

@ -539,9 +539,17 @@ Users.allow({
// is used for instance to add a new user to a board.
UserSearchIndex = new Index({
collection: Users,
fields: ['username', 'profile.fullname', 'emails.address'],
allowedFields: ['username', 'profile.fullname', 'emails.address'],
engine: new MongoDBEngine(),
fields: ['username', 'profile.fullname', 'profile.avatarUrl'],
allowedFields: ['username', 'profile.fullname', 'profile.avatarUrl'],
engine: new MongoDBEngine({
fields: function(searchObject, options) {
return {
'username': 1,
'profile.fullname': 1,
'profile.avatarUrl': 1
};
}
}),
});
Users.safeFields = {