Fix followers for Data Insights index (#19693)

This commit is contained in:
IceS2 2025-02-07 13:47:48 +01:00 committed by GitHub
parent 6861ce45e7
commit c34b612df3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ import static org.openmetadata.schema.EntityInterface.ENTITY_TYPE_TO_CLASS_MAP;
import static org.openmetadata.service.apps.bundles.insights.utils.TimestampUtils.END_TIMESTAMP_KEY;
import static org.openmetadata.service.apps.bundles.insights.utils.TimestampUtils.START_TIMESTAMP_KEY;
import static org.openmetadata.service.apps.bundles.insights.workflows.dataAssets.DataAssetsWorkflow.ENTITY_TYPE_FIELDS_KEY;
import static org.openmetadata.service.search.SearchIndexUtils.parseFollowers;
import static org.openmetadata.service.workflows.searchIndex.ReindexingUtil.ENTITY_TYPE_KEY;
import static org.openmetadata.service.workflows.searchIndex.ReindexingUtil.TIMESTAMP_KEY;
import static org.openmetadata.service.workflows.searchIndex.ReindexingUtil.getUpdatedStats;
@ -231,10 +232,8 @@ public class DataInsightsEntityEnricherProcessor
oCustomProperties.ifPresent(
o -> entityMap.put(String.format("%sCustomProperty", entityType), o));
// Remove 'changeDescription' field
entityMap.remove("changeDescription");
// Remove 'sampleData'
entityMap.remove("sampleData");
// Parse Followers:
entityMap.put("followers", parseFollowers(entity.getFollowers()));
return entityMap;
}