Skip to content

Commit

Permalink
finished search rest docs for now #241
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart Koopmann committed Sep 23, 2013
1 parent 71af157 commit ba4af41
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public String statsRelative(
}

@GET @Path("/universal/relative/histogram") @Timed
@ApiOperation(value = "Datetime histogram a query using a relative timerange.")
@ApiOperation(value = "Datetime histogram of a query using a relative timerange.")
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid interval provided.")
})
Expand Down Expand Up @@ -198,8 +198,17 @@ public String statsAbsolute(
}

@GET @Path("/universal/absolute/histogram") @Timed
@ApiOperation(value = "Datetime histogram of a query using an absolute timerange.")
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid timerange parameters provided."),
@ApiResponse(code = 400, message = "Invalid interval provided.")
})
@Produces(MediaType.APPLICATION_JSON)
public String histogramAbsolute(@QueryParam("query") String query, @QueryParam("interval") String interval, @QueryParam("from") String from, @QueryParam("to") String to) {
public String histogramAbsolute(
@ApiParam(title = "query", description = "Query (Lucene syntax)", required = true) @QueryParam("query") String query,
@ApiParam(title = "interval", description = "Histogram interval / bucket size. (year, quarter, month, week, day, hour or minute)", required = true) @QueryParam("interval") String interval,
@ApiParam(title = "from", description = "Timerange start. See search method description for date format", required = true) @QueryParam("from") String from,
@ApiParam(title = "to", description = "Timerange end. See search method description for date format", required = true) @QueryParam("to") String to) {
interval = interval.toUpperCase();
checkQueryAndInterval(query, interval);
validateInterval(interval);
Expand Down

0 comments on commit ba4af41

Please sign in to comment.