diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/DataInsightsReportApp.java b/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/DataInsightsReportApp.java index 998b1fae172a..748413f379e5 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/DataInsightsReportApp.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/DataInsightsReportApp.java @@ -218,7 +218,7 @@ private DataInsightTotalAssetTemplate createTotalAssetTemplate( dateWithCount.forEach((key, value) -> dateMap.put(key, value.intValue())); processDateMapToNormalize(dateMap); - int changeInTotalAssets = (int) (currentCount - previousCount); + int changeInTotalAssets = (int) Math.abs(currentCount - previousCount); if (previousCount == 0D) { // it should be undefined @@ -276,7 +276,7 @@ private DataInsightDescriptionAndOwnerTemplate createDescriptionTemplate( currentPercentCompleted = (currentCompletedDescription / currentTotalAssetCount) * 100; } - int changeCount = (int) (currentCompletedDescription - previousCompletedDescription); + int changeCount = (int) Math.abs(currentCompletedDescription - previousCompletedDescription); return getTemplate( DataInsightDescriptionAndOwnerTemplate.MetricType.DESCRIPTION, @@ -327,7 +327,7 @@ private DataInsightDescriptionAndOwnerTemplate createOwnershipTemplate( currentPercentCompleted = (currentHasOwner / currentTotalAssetCount) * 100; } - int changeCount = (int) (currentHasOwner - previousHasOwner); + int changeCount = (int) Math.abs(currentHasOwner - previousHasOwner); return getTemplate( DataInsightDescriptionAndOwnerTemplate.MetricType.OWNER, @@ -376,7 +376,7 @@ private DataInsightDescriptionAndOwnerTemplate createTierTemplate( currentPercentCompleted = (currentHasTier / currentTotalAssetCount) * 100; } - int changeCount = (int) (currentHasTier - previousHasTier); + int changeCount = (int) Math.abs(currentHasTier - previousHasTier); // TODO: Understand if we actually use this tierData for anything. Map tierData = new HashMap<>(); diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/EntityBuilderConstant.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/EntityBuilderConstant.java index b9bbdc7d10c9..5815f984d7cf 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/EntityBuilderConstant.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/EntityBuilderConstant.java @@ -26,7 +26,7 @@ public class EntityBuilderConstant { public static final String FIELD_DISPLAY_NAME_NGRAM = "displayName.ngram"; public static final String PRE_TAG = ""; public static final String POST_TAG = ""; - public static final Integer MAX_AGGREGATE_SIZE = 50; + public static final Integer MAX_AGGREGATE_SIZE = 10000; public static final Integer MAX_RESULT_HITS = 10000; public static final String QUERY = "query"; public static final String QUERY_NGRAM = "query.ngram";