Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rediSearch Cannot create index on db != 0?

I have installed the rediSearch module for an application, but I am getting the error Cannot create index on db != 0 do you know what it means?

like image 906
Nurettin Şenssabc Avatar asked Feb 11 '26 03:02

Nurettin Şenssabc


1 Answers

This is because RediSearch only operates on the default (0) database in Redis. Using numbered databases and the SELECT command is somewhat of an anti-pattern in Redis and I'd always recommend instead namespacing your keys using something like ":" as a separator or using different instances of redis-server if you have different types of data storage needs that you're currently spreading out across different numbered databases in the same redis-server instance.

like image 50
Simon Prickett Avatar answered Feb 13 '26 18:02

Simon Prickett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!