Try to fix EasySearch syntax.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2022-08-28 12:26:22 -04:00
parent 6f864c5022
commit 5ca84d2930
3 changed files with 4 additions and 5 deletions

View file

@ -311,5 +311,5 @@ BlazeComponent.extendComponent({
}).register('importMapMembersAddPopup');
Template.importMapMembersAddPopup.helpers({
searchIndex: () => Users.search_index,
searchIndex: () => UserSearchIndex,
})

View file

@ -1391,7 +1391,7 @@ BlazeComponent.extendComponent({
}).register('addMemberPopup');
Template.addMemberPopup.helpers({
searchIndex: () => Users.search_index,
searchIndex: () => UserSearchIndex,
})
BlazeComponent.extendComponent({

View file

@ -537,10 +537,9 @@ Users.allow({
// Search a user in the complete server database by its name, username or emails adress. This
// is used for instance to add a new user to a board.
const searchInFields = ['username', 'profile.fullname', 'emails.address'];
Users.search_index = new Index({
UserSearchIndex = new Index({
collection: Users,
fields: searchInFields,
fields: ['username', 'profile.fullname', 'emails.address'],
engine: new MongoDBEngine(),
});