Class CategoryDeleteCascadeService
java.lang.Object
org.alfresco.elasticsearch.batchindexing.cascade.CategoryDeleteCascadeService
Cascades a category delete by pruning the deleted UUID from every referring document's
CATEGORIES_FIELD (cm%3Acategories), CATEGORY_ANCESTOR and PARENT arrays, and stripping PATH / UNPREFIXED_PATH entries that contain any of the deleted category's paths, via a single _update_by_query. Mirrors live indexing's PathUpdaterProcessor#removeDeletedCategoryFromChildNode.
Idempotent; version conflicts are set to proceed so concurrent live-indexing writes don't abort the cascade.
Fidelity gap: live indexing recomputes CATEGORY_ANCESTOR from surviving categories, dropping upstream uuids exclusive to the deleted category's chain. We don't — options considered were either O(referring-docs × surviving-cats) mgets or only partially correct. Stale uuids are corrected by the next full reindex and do not affect query correctness.
-
Constructor Summary
ConstructorsConstructorDescriptionCategoryDeleteCascadeService(org.opensearch.client.opensearch.OpenSearchClient openSearchClient, org.alfresco.indexing.shared.ElasticsearchProperties elasticsearchProperties, CascadeProperties cascadeProperties) -
Method Summary
Modifier and TypeMethodDescriptionlongapply(CategoryDeleteCascadeSource source) Apply the category-delete cascade for one source.
-
Constructor Details
-
Method Details
-
apply
Apply the category-delete cascade for one source.- Returns:
- number of referring docs mutated, or 0 when skipped.
-