@@ -2,7 +2,6 @@ import { MONGODB_URL, MONGODB_DB_NAME, MONGODB_DIRECT_CONNECTION } from "$env/st
2
2
import { GridFSBucket , MongoClient } from "mongodb" ;
3
3
import type { Conversation } from "$lib/types/Conversation" ;
4
4
import type { SharedConversation } from "$lib/types/SharedConversation" ;
5
- import type { WebSearch } from "$lib/types/WebSearch" ;
6
5
import type { AbortedGeneration } from "$lib/types/AbortedGeneration" ;
7
6
import type { Settings } from "$lib/types/Settings" ;
8
7
import type { User } from "$lib/types/User" ;
@@ -29,7 +28,6 @@ const abortedGenerations = db.collection<AbortedGeneration>("abortedGenerations"
29
28
const settings = db . collection < Settings > ( "settings" ) ;
30
29
const users = db . collection < User > ( "users" ) ;
31
30
const sessions = db . collection < Session > ( "sessions" ) ;
32
- const webSearches = db . collection < WebSearch > ( "webSearches" ) ;
33
31
const messageEvents = db . collection < MessageEvent > ( "messageEvents" ) ;
34
32
const bucket = new GridFSBucket ( db , { bucketName : "files" } ) ;
35
33
@@ -41,7 +39,6 @@ export const collections = {
41
39
settings,
42
40
users,
43
41
sessions,
44
- webSearches,
45
42
messageEvents,
46
43
bucket,
47
44
} ;
@@ -59,7 +56,6 @@ client.on("open", () => {
59
56
{ partialFilterExpression : { userId : { $exists : true } } }
60
57
)
61
58
. catch ( console . error ) ;
62
- webSearches . createIndex ( { sessionId : 1 , updatedAt : - 1 } ) . catch ( console . error ) ;
63
59
abortedGenerations . createIndex ( { updatedAt : 1 } , { expireAfterSeconds : 30 } ) . catch ( console . error ) ;
64
60
abortedGenerations . createIndex ( { conversationId : 1 } , { unique : true } ) . catch ( console . error ) ;
65
61
sharedConversations . createIndex ( { hash : 1 } , { unique : true } ) . catch ( console . error ) ;
0 commit comments