Files
redis-docs/docs/ZrankCommand.rst
Kenneth Reitz 525e9fd3d3 all into sphinx
2011-04-06 13:27:48 -04:00

33 lines
1.1 KiB
ReStructuredText
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
`|Redis Documentation| <index.html>`_
**ZrankCommand: Contents**
  `ZRANK \_key\_ \_member\_ (Redis > <#ZRANK%20_key_%20_member_%20(Redis%20%3E>`_
  `ZREVRANK \_key\_ \_member\_ (Redis > <#ZREVRANK%20_key_%20_member_%20(Redis%20%3E>`_
    `Return value <#Return%20value>`_
ZrankCommand
============
ZRANK \_key\_ \_member\_ (Redis >
=================================
1.3.4) =
ZREVRANK \_key\_ \_member\_ (Redis >
====================================
1.3.4) = *Time complexity: O(log(N))*
ZRANK returns the rank of the member in the sorted set, with scores
ordered from low to high. ZREVRANK returns the rank with scores
ordered from high to low. When the given member does not exist in
the sorted set, the special value 'nil' is returned. The returned
rank (or index) of the member is 0-based for both commands.
Return value
------------
`Integer reply <ReplyTypes.html>`_ or a nil
`bulk reply <ReplyTypes.html>`_, specifically:
::
the rank of the element as an integer reply if the element exists.
A nil bulk reply if there is no such element.
.. |Redis Documentation| image:: redis.png