Problem using routing index/search


(asoqa) #1

My mapping:
{
"index" : {
"properties" : {
"message" : {
"type" : "string"
},
"post_date" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"user" : {
"type" : "string"
}
}
}
}

I used routing index, which refer to official guide http://www.elasticsearch.org/guide/reference/api/index_.html

index:
$ curl -XPOST 'http://localhost:9200/test/index?routing=kimchy' -d '{
"user" : "kimchy",
"post_date" : "2009-11-15T14:12:12",
"message" : "trying out Elastic Search"
}'

index is ok, returned:
{"ok":true,"_index":"test","_type":"index","_id":"W9bEV9xWQe63sf0QqUfxnA","_version":1}

but when I try to search according to id, like this:
curl -XGET 'http://localhost:9200/test/index/W9bEV9xWQe63sf0QqUfxnA/?pretty=true'

It can't find the index, and returned:
{
"_index" : "test",
"_type" : "index",
"_id" : "W9bEV9xWQe63sf0QqUfxnA",
"exists" : false
}

Can someone tell my why?


(system) #2