|
@@ -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 = {
|