You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nodeindex:build indexes into old index when ContentRepositoryQueueIndexer is installed #424
nodeindex:build indexes all nodes into the current (old) index via the alias, then switches the alias to the new (empty) index. Expected behavior is to index into the new index first, then switch the alias.
Cause
NodeIndexCommandController injects the concrete NodeIndexer class:
When Flowpack.ElasticSearch.ContentRepositoryQueueIndexer is installed, its Objects.yaml overrides NodeIndexerInterface to point to ContentRepositoryQueueIndexer\Indexer\NodeIndexer. This creates two separate singleton instances:
Instance A (ContentRepositoryAdaptor\Indexer\NodeIndexer) – used by NodeIndexCommandController
Instance B (ContentRepositoryQueueIndexer\Indexer\NodeIndexer) – used by NodeIndexingManager (injected via NodeIndexerInterface)
configureNodeIndexer() sets the postfix on Instance A, but WorkspaceIndexer → NodeIndexingManager → flushQueues() calls indexNode() on Instance B, which has no postfix. getIndexName() returns the alias name, so Elasticsearch routes documents to the old index.
Suggested fix
Inject NodeIndexerInterface instead of the concrete class in NodeIndexCommandController:
Activity
BUGFIX: Bypass async queue during bulk index builds
BUGFIX: Propagate index postfix to NodeIndexerInterface instance