use of io.arlas.server.core.model.enumerations.ComputationEnum in project ARLAS-server by gisaia.
the class ExploreService method compute.
public ComputationResponse compute(MixedRequest request, CollectionReference collectionReference) throws ArlasException {
CheckParams.checkComputationRequest(request.basicRequest, collectionReference);
FluidSearchService fluidSearch = getFluidSearch(collectionReference);
applyFilter(collectionReference.params.filter, fluidSearch);
applyFilter(request.basicRequest.filter, fluidSearch);
applyFilter(request.headerRequest.filter, fluidSearch);
String field = ((ComputationRequest) request.basicRequest).field;
ComputationEnum metric = ((ComputationRequest) request.basicRequest).metric;
fluidSearch = fluidSearch.compute(field, metric);
return compute(collectionReference, fluidSearch, field, metric);
}
Aggregations