Count API: Also accepts /_count uri to search over all indices. Closes #17.

This commit is contained in:
kimchy 2010-02-16 10:18:47 +02:00
parent 854fc21a70
commit 06cbc0a95b
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,8 @@ public class HttpCountAction extends BaseHttpServerHandler {
@Inject public HttpCountAction(Settings settings, HttpServer httpService, Client client) { @Inject public HttpCountAction(Settings settings, HttpServer httpService, Client client) {
super(settings, client); super(settings, client);
httpService.registerHandler(HttpRequest.Method.POST, "/_count", this);
httpService.registerHandler(HttpRequest.Method.GET, "/_count", this);
httpService.registerHandler(HttpRequest.Method.POST, "/{index}/_count", this); httpService.registerHandler(HttpRequest.Method.POST, "/{index}/_count", this);
httpService.registerHandler(HttpRequest.Method.GET, "/{index}/_count", this); httpService.registerHandler(HttpRequest.Method.GET, "/{index}/_count", this);
httpService.registerHandler(HttpRequest.Method.POST, "/{index}/{type}/_count", this); httpService.registerHandler(HttpRequest.Method.POST, "/{index}/{type}/_count", this);