From 664d7ec07f754610d18574f266a8d9cc3c0141ce Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Mon, 20 Jan 2020 21:34:53 +0100 Subject: [PATCH] [fix] Graph: fix new Cesium+ pod index (document/stats) --- www/plugins/graph/js/services/data-services.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/www/plugins/graph/js/services/data-services.js b/www/plugins/graph/js/services/data-services.js index 3d32d0be..17940c1b 100644 --- a/www/plugins/graph/js/services/data-services.js +++ b/www/plugins/graph/js/services/data-services.js @@ -27,7 +27,7 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. event: esHttp.post('/user/event/_search?pretty') }, docstat: { - search: esHttp.post('/docstat/record/_search') + search: esHttp.post('/document/stats/_search') }, synchro: { search: esHttp.post('/:currency/synchro/_search') @@ -731,7 +731,7 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. aggs: { type: { terms: { - field: "indexType", + field: "type", size: 0 }, aggs: { @@ -753,6 +753,9 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. // prepare next loop ranges = []; var indices = {}; + var params = { + request_cache: angular.isDefined(options.cache) ? options.cache : true // enable by default + }; if (jobs.length === 10) { console.error('Too many parallel jobs!'); @@ -760,7 +763,8 @@ angular.module('cesium.graph.data.services', ['cesium.wot.services', 'cesium.es. } else { jobs.push( - exports.raw.docstat.search(request).then(processSearchResult) + exports.raw.docstat.search(request, params) + .then(processSearchResult) ); } } -- GitLab