Can't get multi-get to work


(tsuna) #1

Hi,
I'm trying to do a multi-get as documented here:
http://www.elasticsearch.org/guide/reference/api/multi-get.html
But it seems it's creating a new document called "_mget" instead of
doing a multi-get.

$ curl -XGET 'http://foo:9200/bar/trace/_mget' -d '{"ids":
["4vbbTgZsGFl1hgy5Wx3CPN", "Tn_ewdqFEEzwrY60w3cYwD"]}'
{"_index":"bar","_type":"trace","_id":"_mget"}
$ curl 'http://foo:9200/bar/trace/_mget' -d '{"ids":
["4vbbTgZsGFl1hgy5Wx3CPN", "Tn_ewdqFEEzwrY60w3cYwD"]}'
{"ok":true,"_index":"bar","_type":"trace","_id":"_mget","_version":1}
$ curl -XDELETE 'http://foo:9200/bar/trace/_mget'
{"ok":true,"found":true,"_index":"bar","_type":"trace","_id":"_mget","_version":2}
$ curl -XDELETE 'http://foo:9200/bar/trace/_mget'
{"ok":true,"found":false,"_index":"bar","_type":"trace","_id":"_mget","_version":2}

What am I doing wrong?
Note: I'm still running on a snapshot of 0.17.0

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com


(Shay Banon) #2

I think you are running on a snapshot version that did not have mget yet...,
upgrade to latest.

On Sun, Aug 7, 2011 at 4:01 AM, tsuna tsunanet@gmail.com wrote:

Hi,
I'm trying to do a multi-get as documented here:
http://www.elasticsearch.org/guide/reference/api/multi-get.html
But it seems it's creating a new document called "_mget" instead of
doing a multi-get.

$ curl -XGET 'http://foo:9200/bar/trace/_mget' -d '{"ids":
["4vbbTgZsGFl1hgy5Wx3CPN", "Tn_ewdqFEEzwrY60w3cYwD"]}'
{"_index":"bar","_type":"trace","_id":"_mget"}
$ curl 'http://foo:9200/bar/trace/_mget' -d '{"ids":
["4vbbTgZsGFl1hgy5Wx3CPN", "Tn_ewdqFEEzwrY60w3cYwD"]}'
{"ok":true,"_index":"bar","_type":"trace","_id":"_mget","_version":1}
$ curl -XDELETE 'http://foo:9200/bar/trace/_mget'

{"ok":true,"found":true,"_index":"bar","_type":"trace","_id":"_mget","_version":2}
$ curl -XDELETE 'http://foo:9200/bar/trace/_mget'

{"ok":true,"found":false,"_index":"bar","_type":"trace","_id":"_mget","_version":2}

What am I doing wrong?
Note: I'm still running on a snapshot of 0.17.0

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com


(tsuna) #3

On Sun, Aug 7, 2011 at 12:19 AM, Shay Banon kimchy@gmail.com wrote:

I think you are running on a snapshot version that did not have mget yet...,
upgrade to latest.

When was mget added? I didn't know it was recent. It'd be nice if
the doc mentioned "this was added in version X.Y.Z" :slight_smile:

PS: the mailing list is setting the Reply-To header, I recommend to
not do this and let people decide who they reply to.

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com


(system) #4