From 68683e181cb3669d0b4790c3c55aad7315cf089f Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 28 Feb 2025 13:05:19 +0100 Subject: [PATCH] Add FILTER-EF option. --- vset.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vset.c b/vset.c index c3d879db5..61cbd15ed 100644 --- a/vset.c +++ b/vset.c @@ -794,6 +794,14 @@ int VSIM_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { return RedisModule_ReplyWithError(ctx, "ERR invalid EF"); } j += 2; + } else if (!strcasecmp(opt, "FILTER-EF") && j+1 < argc) { + if (RedisModule_StringToLongLong(argv[j+1], &filter_ef) != + REDISMODULE_OK || filter_ef <= 0) + { + RedisModule_Free(vec); + return RedisModule_ReplyWithError(ctx, "ERR invalid FILTER-EF"); + } + j += 2; } else if (!strcasecmp(opt, "FILTER") && j+1 < argc) { RedisModuleString *exprarg = argv[j+1]; size_t exprlen;