Redis rejects FT.CREATE and FT.SEARCH as unknown commands
Your error
ERR unknown command 'FT.CREATE', with args beginning with: 'idx:products' 'ON' 'HASH'1 more line it can showFix it fast
Most common cause, 1 of 3The server is Redis 7 or older without the search module
Move to Redis 8.
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update && sudo apt-get install redis
# or with Docker:
docker run -d --name redis -p 6379:6379 redis:8Short answer
ERR unknown command 'FT.CREATE' means the server has no Redis Query Engine, which provides the FT.* commands. Redis 7 packages such as Ubuntu 24.04's redis-server lack it, so do Redis 8 builds without bundled modules, and Azure Managed Redis needs RediSearch chosen at creation. Run Redis 8 with modules, such as redis:8 on amd64 or arm64.
Which cause do you have?
Ask the server for its version and word size, then ask whether it knows the command at all. COMMAND INFO returns (nil) for a command the server does not have, whatever the reason.
redis-cli INFO server | grep -E "^(redis_version|arch_bits|os):"
redis-cli COMMAND INFO FT.CREATEThen find the line you see in this list and open its fix:
- 1The server is Redis 7 or older without the search module
redis_version starts with 7 or lower, for example 7.0.15 from the Ubuntu 24.04 archive, and COMMAND INFO FT.CREATE prints (nil) - 2Redis 8 is running, but it was built without the bundled modules
redis_version is 8.x, yet FT.CREATE is unknown; the server was compiled from source or runs from the official image on a 32-bit or other non-amd64, non-arm64 machine - 3Azure Managed Redis was created without RediSearch, or on the OSS cluster policy
The host ends in redis.azure.net and the instance runs Redis 7.4 with no RediSearch listed under its modules
What does the error look like?
ERR unknown command 'FT.CREATE', with args beginning with: 'idx:products' 'ON' 'HASH'(error) ERR unknown command 'FT.SEARCH', with args beginning with: 'idx:products' '*'
Cause 1 of 3
The server is Redis 7 or older without the search module
You seeredis_version starts with 7 or lower, for example 7.0.15 from the Ubuntu 24.04 archive, and COMMAND INFO FT.CREATE prints (nil)
Check
Before Redis 8, search lived in a separate module that plain Redis did not load, and Redis Stack existed to bundle it. Redis 8 merged that work into Redis Open Source, so on a 7.x server installed from a distribution archive or a redis:7 image the FT commands are simply not there.
redis-cli INFO server | grep redis_versionFix
Move to Redis 8. On Ubuntu, install it from Redis's own APT repository instead of the distribution archive, or run the official redis:8 container on an amd64 or arm64 host. Move existing data with your normal backup and restore steps.
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update && sudo apt-get install redis
# or with Docker:
docker run -d --name redis -p 6379:6379 redis:8Verify
COMMAND INFO FT.CREATE now returns the command's details instead of (nil).
redis-cli COMMAND INFO FT.CREATE | head -3Confirmed by redis.io
Cause 2 of 3
Redis 8 is running, but it was built without the bundled modules
You seeredis_version is 8.x, yet FT.CREATE is unknown; the server was compiled from source or runs from the official image on a 32-bit or other non-amd64, non-arm64 machine
Check
Redis 8 only includes the Query Engine when its modules are compiled in. A source build where make modules-update was never run gives a core-only server, and the official Docker image builds modules for amd64 and arm64 only; on any other architecture its build skips them with the note Modules are NOT supported.
uname -m
redis-cli INFO server | grep arch_bitsFix
On amd64 or arm64, rebuild from source after cloning the bundled modules (the README lists the toolchain they need, including CMake 3.25 to 3.31.6 and Rust), or use the APT packages or the official image. On other architectures, host Redis on an amd64 or arm64 machine when you need search.
git clone https://github.com/redis/redis.git && cd redis
make modules-update
makeVerify
The rebuilt server answers COMMAND INFO FT.CREATE with the command's details.
./src/redis-server --daemonize yes && ./src/redis-cli COMMAND INFO FT.CREATE | head -3Confirmed by raw.githubusercontent.com
Cause 3 of 3
Azure Managed Redis was created without RediSearch, or on the OSS cluster policy
You seeThe host ends in redis.azure.net and the instance runs Redis 7.4 with no RediSearch listed under its modules
Check
On Azure Managed Redis with Redis 7.4, modules have to be selected when the instance is created and cannot be added or changed later. RediSearch also cannot be used with the OSS clustering policy, only with the Enterprise or Non-clustered policy.
REDISCLI_AUTH="$REDIS_KEY" redis-cli -h my-cache.region.redis.azure.net -p 10000 --tls --cacertdir /etc/ssl/certs COMMAND INFO FT.CREATEFix
Create a new instance with RediSearch selected and the Enterprise or Non-clustered clustering policy, then point the application at it and move the data. Azure states that Redis 8.2, still in preview, includes all modules on supported tiers.
# Azure portal, new Azure Managed Redis instance, Advanced tab:
# Redis version 7.4 with the RediSearch module selected
# clustering policy Enterprise (or Non-clustered), not OSS
# then point the application at the new host nameVerify
FT.CREATE on the new instance returns OK.
REDISCLI_AUTH="$REDIS_KEY" redis-cli -h my-new-cache.region.redis.azure.net -p 10000 --tls --cacertdir /etc/ssl/certs FT.CREATE idx:products ON HASH PREFIX 1 product: SCHEMA name TEXTConfirmed by learn.microsoft.com
How do I stop it coming back?
- Add COMMAND INFO FT.CREATE to the health check or start-up script of any service that depends on search, so a server without it fails at deploy time.
- Pin the Redis image to a major version such as redis:8 and an architecture in your compose or Kubernetes files, instead of whatever a host happens to pull.
- Record the chosen modules and clustering policy of managed caches in infrastructure code, since some of them cannot be changed after creation.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: TaxiDex, Dispatch Pro, Raheeb.