Class RenameCascadeService

java.lang.Object
org.alfresco.elasticsearch.batchindexing.cascade.RenameCascadeService

public class RenameCascadeService extends Object
Cascades a rename to descendants by swapping the old path segment for the new one in each descendant's PATH / UNPREFIXED_PATH arrays.

Descendants are matched via a term query on STANDARD_ANCESTORCATEGORY_ANCESTOR. The update runs as a single _update_by_query with a Painless script doing delimiter-bracketed replacement per entry — idempotent, and version conflicts are set to proceed so concurrent live-indexing writes don't abort the cascade.

  • Constructor Details

    • RenameCascadeService

      public RenameCascadeService(org.opensearch.client.opensearch.OpenSearchClient openSearchClient, org.alfresco.indexing.shared.ElasticsearchProperties elasticsearchProperties, CascadeProperties cascadeProperties)
  • Method Details

    • apply

      public long apply(RenameCascadeSource source)
      Apply the rename cascade for one source. Skipped (info log) when the descriptor is incomplete or the rename is a no-op.
      Returns:
      number of descendant docs mutated, or 0 when skipped.