diff --git a/www/plugins/es/js/services/profile-services.js b/www/plugins/es/js/services/profile-services.js index b2e0112eee3ec01520a07134242c8e081d111b64..a0d7339cb6d5becbba8d4d51c73f8856d2ef948d 100644 --- a/www/plugins/es/js/services/profile-services.js +++ b/www/plugins/es/js/services/profile-services.js @@ -182,6 +182,14 @@ angular.module('cesium.es.profile.services', ['cesium.services', 'cesium.es.http } }); var pubkeys = _.keys(dataByPubkey); + + // Workaround to avoid error in pod (ES error "maxClauseCount is set to 1024") + if (pubkeys.length > 1024) { + console.warn('Too many pubkeys to extends (pod is limited to 1024 pubkeys)'); + deferred.resolve(datas); + return deferred.promise; + } + // Make sure all results will be return request.size = (pubkeys.length <= request.size) ? request.size : pubkeys.length; if (!text) {