diff --git a/src/api/models/drive-file.ts b/src/api/models/drive-file.ts
index b7b44c5722..4c7204b1f4 100644
--- a/src/api/models/drive-file.ts
+++ b/src/api/models/drive-file.ts
@@ -1,6 +1,10 @@
 import db from '../../db/mongodb';
 
-export default db.get('drive_files') as any; // fuck type definition
+const collection = db.get('drive_files');
+
+(collection as any).index('hash'); // fuck type definition
+
+export default collection as any; // fuck type definition
 
 export function validateFileName(name: string): boolean {
 	return (