code | type | title |
---|---|---|
true |
page |
srandmember |
Returns one or more members of a set of unique values, at random.
srandmember(key, [options]);
Arguments | Type | Description |
---|---|---|
key |
string |
Set key |
options |
object |
Optional query arguments |
The options
arguments can contain the following option properties:
Property | Type (default) | Description |
---|---|---|
count |
integer (1) |
If positive, returns count elements at random from the set, without repetition.If negative, returns abs(count) elements, and the same element can be chosen multiple times |
queuable |
boolean (true) |
If true, queues the request during downtime, until connected to Kuzzle again |
<<< ./snippets/srandmember.js