Skip to content

Instantly share code, notes, and snippets.

@spalger
Last active December 29, 2015 11:09
Show Gist options
  • Save spalger/7661636 to your computer and use it in GitHub Desktop.
Save spalger/7661636 to your computer and use it in GitHub Desktop.
Default methods in place in the elasticsearch-js client. Keep in mind, JS does not support request bodies with HTTP GET.
bulk (POST/PUT) [POST] -> http://elasticsearch.org/guide/reference/api/bulk/
count (POST/GET) [POST] -> http://elasticsearch.org/guide/reference/api/count/
create (POST/PUT) [POST] -> http://elasticsearch.org/guide/reference/api/index_/
explain (GET/POST) [POST] -> http://elasticsearch.org/guide/reference/api/explain/
index (POST/PUT) [POST] -> http://elasticsearch.org/guide/reference/api/index_/
indices.analyze (GET/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/
indices.clearCache (POST/GET) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-clearcache/
indices.create (PUT/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index/
indices.flush (POST/GET) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-flush/
indices.optimize (POST/GET) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-optimize/
indices.putMapping (PUT/POST) [PUT ] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping/
indices.putTemplate (PUT/POST) [PUT ] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/
indices.refresh (POST/GET) [POST] -> http://www.elasticsearch.org/guide/reference/api/admin-indices-refresh/
indices.validateQuery (GET/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/validate/
info (GET/HEAD) [GET ] -> http://elasticsearch.org/guide/
mget (GET/POST) [POST] -> http://elasticsearch.org/guide/reference/api/multi-get/
mlt (GET/POST) [POST] -> http://elasticsearch.org/guide/reference/api/more-like-this/
msearch (GET/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/multi-search/
percolate (GET/POST) [POST] -> http://elasticsearch.org/guide/reference/api/percolate/
scroll (GET/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/search/scroll/
search (GET/POST) [POST] -> http://www.elasticsearch.org/guide/reference/api/search/
suggest (POST/GET) [POST] -> http://elasticsearch.org/guide/reference/api/search/suggest/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment