]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Support transcoding options/encoders by plugins
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index a06d578312197e7d0b6e9a8d2cf00e6591fbf864..143c1a23c13508627e1b1f1a9ee3e0ac935a8501 100644 (file)
@@ -113,7 +113,8 @@ function throwIfNotValid (value: any, validator: (value: any) => boolean, fieldN
 function buildTrigramSearchIndex (indexName: string, attribute: string) {
   return {
     name: indexName,
-    fields: [ Sequelize.literal('lower(immutable_unaccent(' + attribute + '))') as any ],
+    // FIXME: gin_trgm_ops is not taken into account in Sequelize 6, so adding it ourselves in the literal function
+    fields: [ Sequelize.literal('lower(immutable_unaccent(' + attribute + ')) gin_trgm_ops') as any ],
     using: 'gin',
     operator: 'gin_trgm_ops'
   }