Nested query can't work using java API

I created an index "blog" and a type "post". Docs in "post" are like this:
{
"user":"Dilbert Brown",
"posts":[
{
"body":"Distribution search is hard.",
"postDate":"2011-12-15"
},
{
"body":"Elasticsearch is useful",
"postDate":"2011-12-18"
}
]
}

The mapping for "post" is:
curl -XPOST 'http://localhost:9200/blog/post/_mapping' -d '
{
"post":{
"properties":{
"posts":{
"type":"nested",
"properties":{
"body":{
"type":"string"
},
"postDate":{
"type":"date",
"format":"dateOptionalTime"
}
}
},
"user":{
"type":"string"
}
}
}
}'

In shell, a nested query as follow works:
curl -XGET 'http://localhost:9200/blog/post/_search?pretty=true' -d '
{
"query":{
"nested":{
"path":"posts",
"query":{
"query_string":{
"query":"posts.body:hard"
}
}
}
}
}'

In java project, I save the above query(only nested part) in a parameter
"queryStr" and then pass it to SearchRequestBuilder:
String queryStr = "{"
+" "nested":{"
......
+" }"
+"}"
SearchResponse resp = client.prepareSearch("blog")
.setTypes("post")
.setQuery(queryStr )
.setFrom(0).setSize(50).setExplain(true)
.execute()
.actionGet();

But "resp" returns nothing.

How can nested query work using java API? Besides, using "query_string" in
"nested" query is required.

--
Thanks,
*
*
Xiaowen Huang
Student of School of Software Engineering
Beijing Jiaotong University
Add.:No.3 Shangyuancun, Haidian District, Beijing, P.R.China
Tel.: +86-152-1058-2730
Email: Xiaowen.Huang.bjtu@gmail.com

--