Commit 9de7d3e2 authored by Maxym Borodenko's avatar Maxym Borodenko

ES: count of missing values of accession storage

parent 24c104bc
......@@ -262,7 +262,7 @@ public class AccessionController {
Map<String, TermResult> overview = elasticsearchService.termStatisticsAuto(Accession.class, filterInfo.filter, 10, terms.toArray(new String[] {}));
TermResult result = elasticsearchService.recountResult(QAccession.accession, QAccession.accession.accessionId.storage, filter, overview.get("storage"), "storage");
TermResult result = elasticsearchService.recountResult(QAccession.accession, QAccession.accession.accessionId.storage, filterInfo.filter, overview.get("storage"), "storage");
overview.put("storage", result);
long accessionCount = accessionService.countAccessions(filterInfo.filter);
......
......@@ -27,6 +27,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -44,6 +45,7 @@ import org.genesys2.server.api.model.AccessionHeaderJson;
import org.genesys2.server.exception.InvalidApiUsageException;
import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionGeo;
import org.genesys2.server.model.genesys.QAccession;
import org.genesys2.server.model.impl.AccessionIdentifier3;
import org.genesys2.server.service.AccessionService;
import org.genesys2.server.service.AccessionService.AccessionDetails;
......@@ -253,11 +255,15 @@ public class AccessionController extends ApiBaseController {
@PostMapping(value = "/overview", produces = { MediaType.APPLICATION_JSON_VALUE })
@JsonView({ JsonViews.Public.class })
public AccessionOverview overview(@RequestParam(name = "f", required = false) String filterCode, @RequestBody(required = false) AccessionFilter filter)
throws IOException, SearchException {
throws IOException, SearchException, ExecutionException, InterruptedException {
FilterInfo<AccessionFilter> filterInfo = shortFilterService.processFilter(filterCode, filter, AccessionFilter.class);
Map<String, TermResult> overview = elasticsearchService.termStatisticsAuto(Accession.class, filterInfo.filter, 10, terms.toArray(new String[] {}));
TermResult result = elasticsearchService.recountResult(QAccession.accession, QAccession.accession.accessionId.storage, filterInfo.filter, overview.get("storage"), "storage");
overview.put("storage", result);
long accessionCount = accessionService.countAccessions(filterInfo.filter);
Map<String, TermResult> suggestions = accessionService.getSuggestions(filterInfo.filter);
......
Markdown is supported
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