Created
July 21, 2011 07:50
-
-
Save lpradovera/1096751 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prado@SoftSpider:~$ curl -XDELETE http://localhost:9200/twitter | |
{"ok":true,"acknowledged":true}prado@SoftSpider:~$ curl -XPUT http://localhost:9200/twitter | |
{"ok":true,"acknowledged":true}prado@SoftSpider:~$ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{ | |
> "user": "kimchy", | |
> "post_date": "2009-11-15T14:12:12", | |
> "message": "You know, for Search" | |
> }' | |
{"ok":true,"_index":"twitter","_type":"tweet","_id":"2","_version":1}prado@SoftSpider:~$ curl -XPOST http://localhost:9200/twitter/_refresh | |
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}}prado@SoftSpider:~$ | |
prado@SoftSpider:~$ curl -XGET "http://localhost:9200/twitter/_search?pretty=true&q=*" | |
{ | |
"took" : 1, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 5, | |
"successful" : 5, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 1, | |
"max_score" : 1.0, | |
"hits" : [ { | |
"_index" : "twitter", | |
"_type" : "tweet", | |
"_id" : "2", | |
"_score" : 1.0, "_source" : { | |
"user": "kimchy", | |
"post_date": "2009-11-15T14:12:12", | |
"message": "You know, for Search" | |
} | |
} ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment