Hi,
I want to execute the below redis query in laravel. Can any one please let me know how we can achive this ?
FT.AGGREGATE leads:index "@createdAt:[1638300000 1638400000]"
GROUPBY 1 @leadBy
REDUCE COUNT_DISTINCT 1 @leadId AS performance_count
I tried like below code, but getting error as "Command RAWCOMMAND is not a registered Redis command."
use Illuminate\Support\Facades\Redis;
class CommonController extends BaseController
{
public function checkRedisWorking(){
$query = 'FT.AGGREGATE leads:index "@createdAt:[1638200000 1638400000]" GROUPBY 1 @leadBy REDUCE COUNT_DISTINCT 1 @leadId AS performance_count';
$result = Redis::rawCommand('FT.AGGREGATE', 'leads:index', $query);
result
var_dump($result);
}
}