Hi everyone,

I'm trying to do a simple update. With curl simply I put following command 
in console. 

curl -XPOST 
http://localhost:9200/peticiones-2014.04.08/logs/pJ_T-Lt1QW6u3luxVrI_ZQ/_update 
-d '{"doc": { "Parametros" : "PruebaParametros"}}'{'doc': '{ Parametros : 
PruebaParametros}'}

And it works perfectly. The problem is that I want do exactly the same 
thing in a script, with urllib2 in Python. My code is:

        values = { "doc" : "{ Parametros : PruebaParametros }" }
postData = urllib.urlencode(values)
req = urllib2.Request(query, postData)
response = urllib2.urlopen(req)

Query is 
"http://localhost:9200/peticiones-2014.04.08/logs/pJ_T-Lt1QW6u3luxVrI_ZQ/_update";.
But I'm getting the following error: "urllib2.HTTPError: HTTP Error 500: 
Internal Server Error"

What am I doing wrong? 

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/00c788f1-ebac-4904-a12d-1db32fd47c85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to