Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

zcount #

Returns the number of elements held by a sorted set with a score within the provided min and max values.

[Redis documentation]


Query Syntax #

HTTP #

URL: http://kuzzle:7512/ms/_zcount/<_id>?min=<min score>&max=<max score>
Method: GET

Other protocols #

{
  "controller": "ms",
  "action": "zcount",
  "_id": "<key>",
  "min": "<min score>",
  "max": "<max score>"
}

Arguments #

  • _id: sorted set identifier
  • min: minimum score
  • max: maximum score

By default, the provided min and max values are inclusive. This behavior can be changed using the syntax described in the Redis ZRANGEBYSCORE documentation.


Response #

Returns the number of elements within the specified range.

{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "zcount",
  "collection": null,
  "index": null,
  "result": 3
}