sudovanilla-website/search.js
2024-05-13 23:34:06 -04:00

13 lines
No EOL
536 B
JavaScript

import { MeiliSearch } from 'meilisearch'
import MinPluto from './minpluto-search.json'
import Zorn from './zorn-search.json'
const client = new MeiliSearch({
host: process.env.MeilisearchHost,
apiKey: process.env.MeilisearchApiKey
})
client.index('MinPluto').delete(MinPluto).then((res) => console.log(res))
client.index('MinPluto').addDocuments(MinPluto).then((res) => console.log(res))
client.index('Zorn').delete(Zorn).then((res) => console.log(res))
client.index('Zorn').addDocuments(Zorn).then((res) => console.log(res))