use correct index name

This commit is contained in:
Hongbo Wu 2022-07-14 17:08:40 +08:00
parent 94631f934e
commit 404798a01e

View file

@ -12,6 +12,7 @@ export const client = new Client({
password: env.elastic.password,
},
})
const INDEX_NAME = 'pages'
const createIndex = async (): Promise<void> => {
// read index settings from file
@ -22,7 +23,7 @@ const createIndex = async (): Promise<void> => {
// create index
await client.indices.create({
index: INDEX_ALIAS,
index: INDEX_NAME,
body: indexSettings,
})
}