Skip to content

Commit 06cbc0a

Browse files
committed
Count API: Also accepts /_count uri to search over all indices. Closes #17.
1 parent 854fc21 commit 06cbc0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/http/action/count/HttpCountAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public class HttpCountAction extends BaseHttpServerHandler {
4444

4545
@Inject public HttpCountAction(Settings settings, HttpServer httpService, Client client) {
4646
super(settings, client);
47+
httpService.registerHandler(HttpRequest.Method.POST, "/_count", this);
48+
httpService.registerHandler(HttpRequest.Method.GET, "/_count", this);
4749
httpService.registerHandler(HttpRequest.Method.POST, "/{index}/_count", this);
4850
httpService.registerHandler(HttpRequest.Method.GET, "/{index}/_count", this);
4951
httpService.registerHandler(HttpRequest.Method.POST, "/{index}/{type}/_count", this);

0 commit comments

Comments
 (0)