|
@@ -2,6 +2,7 @@
|
|
import { SyncedCron } from 'meteor/percolate:synced-cron';
|
|
import { SyncedCron } from 'meteor/percolate:synced-cron';
|
|
import { TAPi18n } from '/imports/i18n';
|
|
import { TAPi18n } from '/imports/i18n';
|
|
import ImpersonatedUsers from './impersonatedUsers';
|
|
import ImpersonatedUsers from './impersonatedUsers';
|
|
|
|
+import { Index, MongoDBEngine } from 'meteor/easy:search'
|
|
|
|
|
|
// Sandstorm context is detected using the METEOR_SETTINGS environment variable
|
|
// Sandstorm context is detected using the METEOR_SETTINGS environment variable
|
|
// in the package definition.
|
|
// in the package definition.
|
|
@@ -537,9 +538,10 @@ Users.allow({
|
|
// Search a user in the complete server database by its name, username or emails adress. This
|
|
// 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.
|
|
// is used for instance to add a new user to a board.
|
|
const searchInFields = ['username', 'profile.fullname', 'emails.address'];
|
|
const searchInFields = ['username', 'profile.fullname', 'emails.address'];
|
|
-Users.initEasySearch(searchInFields, {
|
|
|
|
- use: 'mongo-db',
|
|
|
|
- returnFields: [...searchInFields, 'profile.avatarUrl'],
|
|
|
|
|
|
+Users.search_index = new Index({
|
|
|
|
+ collection: Users,
|
|
|
|
+ fields: searchInFields,
|
|
|
|
+ engine: new MongoDBEngine(),
|
|
});
|
|
});
|
|
|
|
|
|
Users.safeFields = {
|
|
Users.safeFields = {
|