mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
build: Initialize tmp index settings
This commit is contained in:
parent
fb057f1f94
commit
a23698d5be
@ -21,16 +21,11 @@ function syncAlgolia() {
|
|||||||
const index = client.initIndex('icons');
|
const index = client.initIndex('icons');
|
||||||
const indexTmp = client.initIndex('icons_tmp');
|
const indexTmp = client.initIndex('icons_tmp');
|
||||||
|
|
||||||
index.setSettings({
|
indexTmp.setSettings({
|
||||||
searchableAttributes: ['unordered(name)', 'unordered(tags)'],
|
searchableAttributes: ['unordered(name)', 'unordered(tags)'],
|
||||||
customRanking: ['asc(name)'],
|
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 => ({
|
const records = Object.keys(icons).map(name => ({
|
||||||
name,
|
name,
|
||||||
tags: tags[name] || [],
|
tags: tags[name] || [],
|
||||||
|
Loading…
Reference in New Issue
Block a user