Is it possible to disable URL decoding of the id?

When I try to create a new document like this:
curl -XPUT "localhost:9200/testolav/rec/1+1%2F2" -d '{"field" : "one and a
half"}'
it returns a decoded id like this
{"ok":true,"_index":"testolav","_type":"rec","_id":"1 1/2","_version":1}

I would like the id to still be url encoded, is this possible?

--

Perhaps you can provide it inside the document itself as _id field?
I did not test it myself. Does it work?

On the other end, you can encode special characters like % to %25. Not sure it
will work.

Le 17 janvier 2013 à 18:04, "Olav Grønås Gjerde" olavgg@gmail.com a écrit :

When I try to create a new document like this:
curl - XPUT "localhost:9200/testolav/rec/1+1%2F2" - d '{"field" : "one and a
half"}'
it returns a decoded id like this
{ "ok" : true , "_index" : "testolav" , "_type" : "rec" , "_id" : "1 1/2" ,
"_version" : 1 }

I would like the id to still be url encoded, is this possible?

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

On Thu, 2013-01-17 at 09:04 -0800, Olav Grønås Gjerde wrote:

When I try to create a new document like this:
curl -XPUT "localhost:9200/testolav/rec/1+1%2F2" -d '{"field" : "one
and a half"}'

it returns a decoded id like this
{"ok":true,"_index":"testolav","_type":"rec","_id":"1
1/2","_version":1}

I would like the id to still be url encoded, is this possible?

Double encode it when you index (or whenever you pass it in the URL)

clint

--