Commit a23698d5 authored by Cole Bemis's avatar Cole Bemis

build: Initialize tmp index settings

parent fb057f1f
......@@ -21,16 +21,11 @@ function syncAlgolia() {
const index = client.initIndex('icons');
const indexTmp = client.initIndex('icons_tmp');
index.setSettings({
indexTmp.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;
});
const records = Object.keys(icons).map(name => ({
name,
tags: tags[name] || [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment