Adds CONSOLE to count api
This commit is contained in:
parent
f22f3c7df5
commit
125b715e45
|
@ -10,15 +10,21 @@ body. Here is an example:
|
|||
|
||||
[source,js]
|
||||
--------------------------------------------------
|
||||
$ curl -XGET 'http://localhost:9200/twitter/tweet/_count?q=user:kimchy'
|
||||
PUT /twitter/tweet/1?refresh
|
||||
{
|
||||
"user": "kimchy"
|
||||
}
|
||||
|
||||
$ curl -XGET 'http://localhost:9200/twitter/tweet/_count' -d '
|
||||
GET /twitter/tweet/_count?q=user:kimchy
|
||||
|
||||
GET /twitter/tweet/_count
|
||||
{
|
||||
"query" : {
|
||||
"term" : { "user" : "kimchy" }
|
||||
}
|
||||
}'
|
||||
}
|
||||
--------------------------------------------------
|
||||
//CONSOLE
|
||||
|
||||
NOTE: The query being sent in the body must be nested in a `query` key, same as
|
||||
the <<search-search,search api>> works
|
||||
|
@ -37,6 +43,7 @@ tweets from the twitter index for a certain user. The result is:
|
|||
}
|
||||
}
|
||||
--------------------------------------------------
|
||||
// TESTRESPONSE
|
||||
|
||||
The query is optional, and when not provided, it will use `match_all` to
|
||||
count all the docs.
|
||||
|
|
Loading…
Reference in New Issue