This commit is contained in:
2025-12-07 22:29:44 +08:00
parent c9e4358bd8
commit baa47a5289
5 changed files with 95 additions and 0 deletions

View File

@@ -1,3 +1,18 @@
import dotenv from 'dotenv';
dotenv.config();
import { MeiliSearch } from 'meilisearch';
const meiliSearchKey = process.env.MEILISEARCH_KEY;
const host = process.env.MEILISEARCH_URL!;
export const meiliSearch = new MeiliSearch({
host: host,
apiKey: meiliSearchKey,
});
export const index = meiliSearch.index('test-embedding');
// const one = await index.getDocuments({ limit: 1 });
// console.log(one);