diff --git a/package.json b/package.json index a80334420dfe79a927fb60afc519f5f3c56007f3..27ce6dd707f07813be06cbb59d406d96124c9fae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webapp", - "version": "2.6.11", + "version": "2.6.12", "license": "GNU Affero General Public License v3.0", "scripts": { "ng": "ng", diff --git a/src/app/elasticsearch/services/elasticsearch.service.ts b/src/app/elasticsearch/services/elasticsearch.service.ts index b03dca5adda0402314d8cdb556b762112bfda549..3445f0ac8d3d1250cff23b0b1ecbe6f695466efb 100644 --- a/src/app/elasticsearch/services/elasticsearch.service.ts +++ b/src/app/elasticsearch/services/elasticsearch.service.ts @@ -513,19 +513,18 @@ export class ElasticsearchService { requestOptions.body.query.bool['must'] = mustExpression; // Filter by scope (dataset, service, post, page). If the scope is 'all', we don't apply any filter - if (options.scope.key !== scopesResearch.all.key) { - const filtersScope = []; - options.scope.elasticType.forEach((type) => { - filtersScope.push(type); - }); - // For the scopes we use post_filter instead of filter. - // The difference is that the aggregations will be calculated before this filter is applied. - requestOptions.body['post_filter'] = { - terms: { - 'type.keyword': filtersScope, - }, - }; - } + const filtersScope = []; + options.scope.elasticType.forEach((type) => { + filtersScope.push(type); + }); + // For the scopes we use post_filter instead of filter. + // The difference is that the aggregations will be calculated before this filter is applied. + requestOptions.body['post_filter'] = { + terms: { + 'type.keyword': filtersScope, + }, + }; + // Aggregations for the filter options // We have different filters determined by 'index' property. diff --git a/src/app/shared/variables.ts b/src/app/shared/variables.ts index 1ce8326326ffc7ccea049107c0e095010992f7e5..44819e091cc00268884ed2836cabd51a5b5613fb 100644 --- a/src/app/shared/variables.ts +++ b/src/app/shared/variables.ts @@ -4,7 +4,7 @@ export const scopesResearch = { all: { key: 'all', label: geosource.researchScope.all, - elasticType: [''], + elasticType: ['dataset', 'nonGeographicDataset', 'series', 'nonGeographicSeries','service','post'], errorItem: geosource.errorItem.all, }, datasets: