daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest May 17th, 2018 111 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. edit_author1 = {"name": "Sheldon Sid", "myid": 18}
  2. resp = es.index(index="radsearch", doc_type="default", id=18, body={"doc": edit_author1})
  3.    
  4. {
  5.   "_index": "radsearch",
  6.   "_type": "default",
  7.   "_id": "18",
  8.   "_version": 1,
  9.   "found": true,
  10.   "_source": {
  11.     "doc": {
  12.       "name": "Sheldon Sid",
  13.       "myid": 18
  14.     }
  15.   }
  16. }
  17.    
  18. resp = es.update(index="radsearch", doc_type="default", id=18, body={'doc': edit_author1})
  19.  
  20. {
  21.   "_index": "radsearch",
  22.   "_type": "default",
  23.   "_id": "18",
  24.   "_version": 2,
  25.   "found": true,
  26.   "_source": {
  27.     "doc": {
  28.       "name": "Sheldon Sid",
  29.       "myid": 18
  30.     },
  31.     "myid": 18,
  32.     "name": "Sheldon Sid"
  33.   }
  34. }
  35.    
  36. resp = es.update(index="radsearch", doc_type="default", id=18, body={edit_author1})
  37. TypeError: unhashable type: 'dict'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top