public String searchAsCsv(Set<String> selectedFields) throws IOException, APIException {
return doSearch(String.class, MediaType.CSV_UTF_8, 10_000, selectedFields); // TODO make use of streaming support in the server.
}
public DateHistogramResult dateHistogram(String interval) throws IOException, APIException {
PathMethod routePath;
switch (timeRange.getType()) {
case ABSOLUTE:
routePath = routes.AbsoluteSearchResource().histogramAbsolute();
break;
case KEYWORD: