Is it possible to create an index in a MULTI/EXEC transaction?

Last updated 22, Mar 2024

Question

Is it possible to create an index in a MULTI/EXEC transaction?

Answer

It is only possible to create an index in a MULTI/EXEC transaction if the database is not clustered.

127.0.0.1:12000> MULTI
OK
127.0.0.1:12000(TX)> FT.CREATE idx PREFIX 1 doc: SCHEMA title TEXT
(error) ERR FT.CREATE is not allowed inside MULTI in a multi-shard configuration

References

Learn more about Redis transactions.