Skip to content

Commit fb057f1

Browse files
committed
build: Initialize algolia settings in script
1 parent 21bb9fe commit fb057f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/sync-algolia.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ function syncAlgolia() {
2121
const index = client.initIndex('icons');
2222
const indexTmp = client.initIndex('icons_tmp');
2323

24+
index.setSettings({
25+
searchableAttributes: ['unordered(name)', 'unordered(tags)'],
26+
customRanking: ['asc(name)'],
27+
});
28+
2429
console.log('Copying target index settings into temporary index...');
2530
client.copyIndex(index.indexName, indexTmp.indexName, ['settings'], err => {
2631
if (err) throw err;

0 commit comments

Comments
 (0)