Skip to content

Commit d27bb68

Browse files
committed
fix pipeline lookup for indexAllItems on aliases
1 parent 7fd998a commit d27bb68

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

worker/search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ export async function indexAllItems ({ models, boss }) {
159159
}
160160

161161
const idxSettings = await search.indices.getSettings({ index: osIndex })
162-
const pipeline = idxSettings.body[osIndex]?.settings?.index?.default_pipeline
162+
// getSettings keys by concrete index name, not alias, so use the first value
163+
const pipeline = Object.values(idxSettings.body)[0]?.settings?.index?.default_pipeline
163164
if (!pipeline) {
164165
// The init script sets default_pipeline AFTER seed import completes,
165166
// so its absence means bootstrap is still in progress.

0 commit comments

Comments
 (0)