Skip to content

Instantly share code, notes, and snippets.

@betabug-sw
Created May 23, 2012 18:05
Show Gist options
  • Save betabug-sw/2776724 to your computer and use it in GitHub Desktop.
Save betabug-sw/2776724 to your computer and use it in GitHub Desktop.
Elasticsearch 19.2+ gives 404 on '/_mapping' with an empty data storage
Up till version 19.1 of Elasticsearch, getting '/_mapping' on an
empty data storage (no indexes, no nothing, freshly installed)
would return {} and give a status of 200.
19.2+ correctly returns {}, but gives a status 404:
es/elasticsearch-0.19.4$ curl -v -XGET 'http://127.0.0.1:9200/_mapping'
* About to connect() to 127.0.0.1 port 9200 (#0)
* Trying 127.0.0.1...
* connected
* Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0)
> GET /_mapping HTTP/1.1
> User-Agent: curl/7.25.0 (x86_64-unknown-openbsd5.1) libcurl/7.25.0 OpenSSL/1.0.0f zlib/1.2.3 libidn/1.24
> Host: 127.0.0.1:9200
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: application/json; charset=UTF-8
< Content-Length: 2
<
* Connection #0 to host 127.0.0.1 left intact
{}* Closing connection #0
It's not obvious if this is intentional - on returning a 404 error status
I wouldn't expect the data to be in there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment