cleanup: logs for algolia
This commit is contained in:
parent
64d612a572
commit
6dfbe0c05e
|
@ -6,7 +6,6 @@ import { mergeEverythingInner } from "../flow/mergeEverything";
|
|||
let cookie = process.env.ALGOLIA_MASTER_API_KEY;
|
||||
const algoliaAppId = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID;
|
||||
const client = algoliasearch(algoliaAppId, cookie);
|
||||
console.log(`Initializing algolia index for ${algoliaAppId}`);
|
||||
const index = client.initIndex("metaforecast");
|
||||
|
||||
export async function rebuildAlgoliaDatabaseTheHardWay() {
|
||||
|
@ -54,8 +53,6 @@ export async function rebuildAlgoliaDatabaseTheEasyWay() {
|
|||
}));
|
||||
// this is necessary to filter by missing attributes https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/how-to/filter-by-null-or-missing-attributes/
|
||||
|
||||
console.log(index.appId, index.indexName);
|
||||
|
||||
if (index.exists()) {
|
||||
console.log("Index exists");
|
||||
await index.replaceAllObjects(records, { safe: true });
|
||||
|
|
Loading…
Reference in New Issue
Block a user