Mass indexing for multiple tenants at once

Description

Currently, the mass indexer will only target one tenant, and reindex all entities of that tenant. If you want to reindex multiple tenants, you will have to run the mass indexer twice.

We should provide a way to reindex multiple tenants at once.

Activity

Show:

Yoann Rodière September 15, 2021 at 3:59 PM
Edited

One solution would be to allow passing multiple tenant IDs to SearchScope.massIndexer(String... tenantIds). Internally, we would create one PojoMassIndexingBatchIndexingWorkspace per (tenantId, typeGroup) combination, which would naturally lead to indexing all tenants in the same mass indexer.

We could also improve SearchScope.massIndexer() (the one without a tenantId parameter) to have it reindex all tenants by default, instead of throwing an exception. We would only need a configuration option to allow users to tell us what the tenant IDs are:

As it happens, we are actually introducing this property in , for other reasons.

To address use cases where the tenants are semi-dynamic (list retrieved from an external service on startup rather than from compile-time configuration files), users could take advantage of framework features that allow generating configuration dynamically; see for example. Alternatively, see .

Fixed

Assignee

Reporter

Components

Sprint

Fix versions

Priority

Created September 15, 2021 at 3:47 PM
Updated July 3, 2023 at 11:28 AM
Resolved January 3, 2023 at 1:14 PM
Loading...