From fb057f1f94237885bc027d0f209739cc384166b7 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Fri, 18 May 2018 18:06:19 -0700 Subject: [PATCH] build: Initialize algolia settings in script --- bin/sync-algolia.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/sync-algolia.js b/bin/sync-algolia.js index 00f4683..4c9547d 100644 --- a/bin/sync-algolia.js +++ b/bin/sync-algolia.js @@ -21,6 +21,11 @@ function syncAlgolia() { const index = client.initIndex('icons'); const indexTmp = client.initIndex('icons_tmp'); + index.setSettings({ + searchableAttributes: ['unordered(name)', 'unordered(tags)'], + customRanking: ['asc(name)'], + }); + console.log('Copying target index settings into temporary index...'); client.copyIndex(index.indexName, indexTmp.indexName, ['settings'], err => { if (err) throw err;