diff --git a/api/pacman-api-statistics/src/main/java/com/tmobile/pacman/api/statistics/repository/StatisticsRepositoryImpl.java b/api/pacman-api-statistics/src/main/java/com/tmobile/pacman/api/statistics/repository/StatisticsRepositoryImpl.java index d42d2951f..a9ff75cab 100644 --- a/api/pacman-api-statistics/src/main/java/com/tmobile/pacman/api/statistics/repository/StatisticsRepositoryImpl.java +++ b/api/pacman-api-statistics/src/main/java/com/tmobile/pacman/api/statistics/repository/StatisticsRepositoryImpl.java @@ -156,7 +156,7 @@ public JsonArray getNumberOfAccounts() throws DataException { StringBuilder urlToQueryBuffer = new StringBuilder(esUrl).append("/").append(AWS).append("/") .append(SEARCH); StringBuilder requestBody = new StringBuilder( - "{\"query\":{\"bool\":{}},\"aggs\":{\"accounts\":{\"terms\":{\"field\":\"accountname.keyword\",\"size\":10000}}}}"); + "{\"query\":{\"bool\":{}},\"aggs\":{\"accounts\":{\"terms\":{\"field\":\"accountid.keyword\",\"size\":10000}}}}"); String responseDetails = PacHttpUtils.doHttpPost(urlToQueryBuffer.toString(), requestBody.toString()); JsonObject paramObj = parser.parse(responseDetails).getAsJsonObject(); JsonObject aggsJson = (JsonObject) parser.parse(paramObj.get(AGGS).toString()); @@ -266,4 +266,4 @@ public List> getAutofixActionCountByRule() throws DataExcept } } -} \ No newline at end of file +}