I wanted to know how to have a 10 result limit on a redis query. Im using a node js library , and streamline.js.
basically, i do hgetall as a command but the docs state that the “SORT” command has an option for LIMIT. I was just wondering if there was any way to apply a limit in redis. Here is a sample of one of the queries:
members.hgetall(All,_);
HGETALLretrieves all members (fields & values) of a specific hash key. All of them, without limitation.When talking about
SORT, it refers to actions onLists,Sets andSorted Sets.It returns members of these structures in an ordered manner, as dictated by
SORT‘s parameters. See SORT documentation.