Skip to content

Instantly share code, notes, and snippets.

@imotov
Created November 16, 2013 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imotov/7495959 to your computer and use it in GitHub Desktop.
Save imotov/7495959 to your computer and use it in GitHub Desktop.
$ curl -XPUT localhost:9200/test-idx/doc/1 -d '{"foo": "BaR"}'
{"ok":true,"_index":"test-idx","_type":"doc","_id":"1","_version":1}
$ curl "localhost:9200/test-idx/doc/_search?q=baR&pretty"
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "test-idx",
"_type" : "doc",
"_id" : "1",
"_score" : 1.0, "_source" : {"foo": "BaR"}
} ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment