feat(website): add type field to search index to sort by (#10212)

This commit is contained in:
Qjuh
2024-04-14 19:53:16 +02:00
committed by GitHub
parent afb97fbd00
commit 7baa9e4333
3 changed files with 31 additions and 1 deletions

View File

@@ -66,7 +66,10 @@ try {
await client.waitForTask(task.taskUid);
}
await client.index(index.index).addDocuments(index.data);
const searchIndex = client.index(index.index);
await searchIndex.updateSettings({ sortableAttributes: ['type'] });
await searchIndex.addDocuments(index.data);
}),
);
} catch {}