@@ -108,6 +108,30 @@ func (client *Client) Info(key string) (info map[string]int64, err error) {
108108 return info , nil
109109}
110110
111+ // BfAddMulti - Adds one or more items to the Bloom Filter, creating the filter if it does not yet exist.
112+ // args:
113+ // key - the name of the filter
114+ // item - One or more items to add
115+ func (client * Client ) BfAddMulti (key string , items []string ) ([]int64 , error ) {
116+ conn := client .Pool .Get ()
117+ defer conn .Close ()
118+ args := redis.Args {key }.AddFlat (items )
119+ result , err := conn .Do ("BF.MADD" , args ... )
120+ return redis .Int64s (result , err )
121+ }
122+
123+ // BfExistsMulti - Determines if one or more items may exist in the filter or not.
124+ // args:
125+ // key - the name of the filter
126+ // item - one or more items to check
127+ func (client * Client ) BfExistsMulti (key string , items []string ) ([]int64 , error ) {
128+ conn := client .Pool .Get ()
129+ defer conn .Close ()
130+ args := redis.Args {key }.AddFlat (items )
131+ result , err := conn .Do ("BF.MEXISTS" , args ... )
132+ return redis .Int64s (result , err )
133+ }
134+
111135// Initializes a TopK with specified parameters.
112136func (client * Client ) TopkReserve (key string , topk int64 , width int64 , depth int64 , decay float64 ) (string , error ) {
113137 conn := client .Pool .Get ()
0 commit comments