diff --git a/bot/src/modules/ai.ts b/bot/src/modules/ai.ts index 6100e9d..3dab592 100644 --- a/bot/src/modules/ai.ts +++ b/bot/src/modules/ai.ts @@ -64,15 +64,21 @@ export const ai = async( if (queryString !== null) { const database = new PrismaClient(); const data = await database.$runCommandRaw({ - $search: { - index: "docs", - text: { - path: { - wildcard: "*", + aggregate: "Documentation", + cursor: {}, + pipeline: [ + { + $search: { + index: "searchProducts", + text: { + path: { + wildcard: "*", + }, + query: queryString, + }, }, - query: queryString, }, - }, + ], }); parsedPrompt = parsedPrompt.replace( "{{context}}",