Skip to content

Commit

Permalink
wip: Provide a messages service #908
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Aug 13, 2024
1 parent 17f3537 commit 77a27b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/api/models/messages.model.mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ export default function (app, options) {
// Collation provided in query ensure sorting to be case insensitive w.r.t. user's language
// We built indices with collation to cover the most used languages, it requires different naming...
options.Model.createIndex({ createdAt: -1 })
options.Model.createIndex({ body: 1 }, { name: 'body-en', collation: { locale: 'en', strength: 1 } })
options.Model.createIndex({ body: 1 }, { name: 'body-fr', collation: { locale: 'fr', strength: 1 } })
}

0 comments on commit 77a27b9

Please sign in to comment.