Skip to content

Instantly share code, notes, and snippets.

@merrellb
Created March 12, 2011 09:08
Show Gist options
  • Save merrellb/867143 to your computer and use it in GitHub Desktop.
Save merrellb/867143 to your computer and use it in GitHub Desktop.
send: 'GET /abcd/doc/8404 HTTP/1.1\r\nHost: 127.0.1.1:9200\r\nAccept-Encoding: identity\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Access-Control-Allow-Origin: *
header: Content-Type: application/json; charset=UTF-8
header: Content-Length: 582
{u'_type': u'doc', u'_id': u'8404', u'_source': {u'sentcc': u'', u'messageuid': u'', u'sentdate': u'', u'groupkey': u'8404', u'sentto': u'', u'msglength': u'', ..... <Truncated>
send: 'GET /abcd/doc/8404?fields=groupkey HTTP/1.1\r\nHost: 127.0.1.1:9200\r\nAccept-Encoding: identity\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Access-Control-Allow-Origin: *
header: Content-Type: application/json; charset=UTF-8
header: Content-Length: 56
{u'_type': u'doc', u'_id': u'8404', u'_version': 1, u'_index': u'abcd'}
@merrellb
Copy link
Author

CURL version:

curl -XGET "http://127.0.1.1:9200/abc/doc/8404"
{"_index":"abc","_type":"doc","_id":"8404","_version":1, "_source" : {"sentcc": "", "messageuid": "", "groupkey": "8404", "hashcode": "0x17b204da064770624a98486bb7cb7acf", ....

curl -XGET "http://127.0.1.1:9200/abc/doc/8404?fields=groupkey"
{"_index":"abc","_type":"doc","_id":"8404","_version":1}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment