Describe the bug
When using "redis-cli" or the Ruby "redis" + "redis-clustering" library, all attempts to use FT.CREATE
fail. The command never responds (process has to be terminated) and does not create a new index.
To reproduce
Use the official Redis 8.0.1 Docker image to set up a cluster of 3 master nodes. Log into a shard and try to create any index with FT.CREATE
.
Expected behavior
Should respond with "OK" and create the index.
Additional information
The search module is active, I checked.
Comment From: gottlike
Here a quick Ruby script for testing this with a similar config to mine.
#!/usr/bin/env ruby
require 'redis'
require 'redis-clustering'
redis = Redis::Cluster.new(
nodes: ['rediss://:pass@1.example.com:6379', 'rediss://:pass@2.example.com:6379', 'rediss://:pass@3.example.com:6379']
)
begin
# Test connection
puts 'Testing Redis connection...'
redis.ping
puts '✓ Connected to Redis successfully'
# Check if RediSearch is available
puts 'Checking for RediSearch module...'
modules = redis.call('MODULE', 'LIST')
has_search = modules.any? { |mod| mod[1].include?('search') }
if has_search
puts '✓ RediSearch module found'
else
puts '✗ RediSearch module not found'
exit 1
end
# Create the index
puts 'Creating user index...'
redis.call('FT.CREATE', 'user_idx', 'ON', 'HASH', 'PREFIX', '1', 'user/',
'SCHEMA', 'something', 'TAG')
puts "✓ Index 'user_idx' created successfully!"
rescue Redis::CommandError => e
if e.message.include?('Index already exists')
puts "ℹ Index 'user_idx' already exists"
else
puts "✗ Error: #{e.message}"
end
rescue StandardError => e
puts "✗ Error: #{e.message}"
end
Comment From: sundb
@gottlike please move this issue to https://github.com/RediSearch/RediSearch/issues, thx.