# [Tue Jul 19 10:43:16 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XPUT 'http://127.0.0.1:9200/foo_1/foo/1?pretty=1' -d '
{
"foo" : "bar"
}
'
# [Tue Jul 19 10:43:16 2011] Response:
# {
# "ok" : true,
# "_index" : "foo_1",
# "_id" : "1",
# "_type" : "foo",
# "_version" : 1
# }
# [Tue Jul 19 10:43:18 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XPOST 'http://127.0.0.1:9200/_aliases?pretty=1' -d '
{
"actions" : [
{
"add" : {
"index" : "foo_1",
"alias" : "foo"
}
}
]
}
'
# [Tue Jul 19 10:43:18 2011] Response:
# {
# "ok" : true,
# "acknowledged" : true
# }
# [Tue Jul 19 10:43:20 2011] Protocol: http, Server: 192.168.5.103:9200
curl -XGET 'http://127.0.0.1:9200/foo/_mget?pretty=1' -d '
{
"docs" : [
{
"_id" : 1
}
]
}
'
# [Tue Jul 19 10:43:20 2011] Response:
# {
# "status" : 404,
# "error" : "IndexMissingException[[foo] missing]"
# }