refactor: docs (#10126)

This commit is contained in:
Noel
2024-02-29 04:37:52 +01:00
committed by GitHub
parent 0f9017ef95
commit 18cce83d80
192 changed files with 8116 additions and 6321 deletions

View File

@@ -52,10 +52,15 @@ try {
await Promise.all(
indices.map(async (index) => {
console.log(`Uploading ${index.index}...`);
let task;
try {
await client.createIndex(index.index);
task = await client.createIndex(index.index);
} catch {}
if (task) {
await client.waitForTask(task.taskUid);
}
await client.index(index.index).addDocuments(index.data);
}),
);