Find number of times we have a character in a row in elastic search

I am working on elasticsearch and facing an issue that how many time a word comes in a row at the time search records.
Like I have following rows:

{
{ "user":"Aniket", "postDate":"2016-04-26","body":"Search as we discuss yesterday one time word", "title":"One time word"}
},
{
"user": "aniket", "postDate": "2016-04-26", "body": "Distribution is hard. Distribution should be easy.word word word word" , "title": "Four times word"}
},
{"user": "aniket", "postDate": "2016-04-26", "body": "Distribution is hard. Distribution should be easy.word word word" , "title": "Three times word"}
},
{"user": "aniket",
"postDate": "2016-04-26",
"body": "Distribution is hard. Distribution should be easy.word word" ,
"title": "Two times word"
}
I have above four rows under user aniket and we have "word" in each row but sometimes it goes two,three,four or one time. I need the result like if I search for "word" and we found word four times in the result than it will come at the top like: 1. word word word word 2. word word word 3. word word 4. word I tried with score too but score is not going to provide me any information related to that.

I am trying the following query
curl -XGET 'localhost:9200/blog/post/_search?pretty=1' -d '{
"query": {
"match": {
"body": "word"
}
},
"sort": {
"_script": {
"type": "number",
"script": "termInfo=_index['body'][term].tf();return termInfo;",
"params": {
"term": "word"
},
"lang": "groovy",
"order": "desc"
}
}
}'

and getting this error:
{
"index" : "blog",
"shard" : 4,
"status" : 500,
"reason" : "QueryPhaseExecutionException[[blog][4]: query[filtered(body:word)->cache(_type:post)],from[0],size[10],sort[<custom:"_script": org.elasticsearch.index.fielddata.fieldcomparator.DoubleScriptDataComparator$InnerSource@51c07776>!]: Query Failed [Failed to execute main query]]; nested: GroovyScriptExecutionException[MissingPropertyException[No such property: body for class: Script5]]; "
} ]

If I remove the sort part of my query than its give me the result even if I use simple sort then body and order by asc than also it works properly but not is our word count case. Any solution for that and what I am missing?