mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Fix and update easysearch
This commit is contained in:
parent
3ddb97c8c9
commit
339e044a30
11 changed files with 40 additions and 45 deletions
|
@ -2,6 +2,7 @@
|
|||
import { SyncedCron } from 'meteor/percolate:synced-cron';
|
||||
import { TAPi18n } from '/imports/i18n';
|
||||
import ImpersonatedUsers from './impersonatedUsers';
|
||||
import { Index, MongoDBEngine } from 'meteor/easy:search'
|
||||
|
||||
// Sandstorm context is detected using the METEOR_SETTINGS environment variable
|
||||
// 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
|
||||
// is used for instance to add a new user to a board.
|
||||
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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue