Search in sources :

Example 1 with ComputationEnum

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);
}
Also used : ComputationEnum(io.arlas.server.core.model.enumerations.ComputationEnum)

Aggregations

ComputationEnum (io.arlas.server.core.model.enumerations.ComputationEnum)1