Search API: Also accepts /_search uri to search over all indices. Closes #16.

This commit is contained in:
kimchy 2010-02-16 10:16:34 +02:00
parent 66b86a7a03
commit 854fc21a70
1 changed files with 2 additions and 0 deletions

View File

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