Skip to content

[6.x] Pass the configured index name to the search insert job#14949

Open
ajnsn wants to merge 1 commit into
statamic:6.xfrom
ajnsn:search-insert-job-configured-handle
Open

[6.x] Pass the configured index name to the search insert job#14949
ajnsn wants to merge 1 commit into
statamic:6.xfrom
ajnsn:search-insert-job-configured-handle

Conversation

@ajnsn

@ajnsn ajnsn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

A while back I added resolveNameUsing() for customising search index names (#10435). It's also in the docs: https://statamic.dev/frontend/search#customizing-index-names. I use it to prefix indexes per environment so staging and production don't collide on the same Algolia app.

Upgrading that same project to v6, indexing silently stopped, the index just stayed empty.

Since the insert job was moved to the queue (#13126), insertMultiple() rebuilds the index name for the job from the already-resolved name.

With a resolver set, that reconstructed name is wrong, so the job looks up an index that doesn't exist and fails on the queue. update() has already cleared the index by then, so it just ends up empty - no error in sight.

Imho the job should always get the index's own name so the resolver is reapplied when it re-resolves. So I store it and pass it through instead of reconstructing it. Added a test to the shared index tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant