Skip to content

Instantly share code, notes, and snippets.

@madlep
Created August 23, 2012 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madlep/3431254 to your computer and use it in GitHub Desktop.
Save madlep/3431254 to your computer and use it in GitHub Desktop.
Bug: _mlt on a document does not route properly on node clients
Thu 11:54:32 madlep@elastic1 ~
$ curl -XPUT 'http://localhost:9200/foo/bar/1' -d '{"foo":{"bar":"boz"}}'
{"ok":true,"_index":"foo","_type":"bar","_id":"1","_version":1}
Thu 11:56:21 madlep@elastic1 ~
$ curl -v "http://localhost:9200/foo/bar/1"
* About to connect() to localhost port 9200 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 9200 (#0)
> GET /foo/bar/1 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: localhost:9200
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Content-Length: 102
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"_index":"foo","_type":"bar","_id":"1","_version":1,"exists":true, "_source" : {"foo":{"bar":"boz"}}}
Thu 11:56:52 madlep@elastic1 ~
$ curl -v "http://localhost:9200/foo/bar/1/_mlt"
* About to connect() to localhost port 9200 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 9200 (#0)
> GET /foo/bar/1/_mlt HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: localhost:9200
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Content-Length: 124
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"took":5,"timed_out":false,"_shards":{"total":12,"successful":12,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
Thu 11:59:00 madlep@web1 ~
$ curl -v "http://localhost:9200/foo/bar/1"
* About to connect() to localhost port 9200 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 9200 (#0)
> GET /foo/bar/1 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: localhost:9200
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Content-Length: 102
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"_index":"foo","_type":"bar","_id":"1","_version":1,"exists":true, "_source" : {"foo":{"bar":"boz"}}}
Thu 11:59:03 madlep@web1 ~
$ curl -v "http://localhost:9200/foo/bar/1/_mlt"
* About to connect() to localhost port 9200 (#0)
* Trying ::1... connected
* Connected to localhost (::1) port 9200 (#0)
> GET /foo/bar/1/_mlt HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: localhost:9200
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: application/json; charset=UTF-8
< Content-Length: 61
<
* Connection #0 to host localhost left intact
* Closing connection #0
{"error":"IndexMissingException[[foo] missing]","status":404}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment