Commit 0a6a627f authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

Fix: Quantity of datasets is different on "OVERVIEW" and "DATASETS" tabs.

parent 5b1ed5d5
......@@ -313,7 +313,7 @@ public class DatasetController extends ApiBaseController {
overviewFilter.state = Sets.newHashSet(PublishState.PUBLISHED);
Map<String, TermResult> overview = elasticsearchService.termStatisticsAuto(Dataset.class, overviewFilter, 10, terms.toArray(new String[] {}));
long datasetCount = datasetService.countDatasets(filter);
long datasetCount = datasetService.countDatasets(overviewFilter);
Map<String, ElasticsearchService.TermResult> suggestionRes = datasetService.getSuggestions(filter);
return DatasetOverview.from(filterCode, filter, overview, datasetCount, suggestionRes);
......
......@@ -268,7 +268,7 @@ public class DescriptorListController {
overviewFilter.state = Sets.newHashSet(PublishState.PUBLISHED);
Map<String, TermResult> overview = elasticsearchService.termStatisticsAuto(DescriptorList.class, overviewFilter, 10, terms.toArray(new String[] {}));
long descriptorListCount = descriptorListService.countDescriptorLists(filter);
long descriptorListCount = descriptorListService.countDescriptorLists(overviewFilter);
Map<String, ElasticsearchService.TermResult> suggestionRes = descriptorListService.getSuggestions(filter);
return DescriptorListOverview.from(filterCode, filter, overview, descriptorListCount, suggestionRes);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment