6 search interface -- 9 count

Similar to search, but returns the total number of results directly based on the search criteria.
GET /twitter/tweet/_count?q=user:kimchy

GET /twitter/tweet/_count
{
    "query" : {
        "term" : { "user" : "kimchy" }
    }
}

return
{
    "count" : 1,
    "_shards" : {
        "total" : 5,
        "successful" : 5,
        "failed" : 0
    }
}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326614486&siteId=291194637