Open sergeynilov opened 1 year ago
In order to use this library, you need to have a Redis server with the RediSearch module installed and enabled.
How can I check it [...] ?
To see if the module is enabled (and its version) you can run this command:
> MODULE LIST
or with redis-cli
:
user@host:~$ redis-cli -h 127.0.0.1 MODULE LIST
1) 1) "name"
2) "ReJSON"
3) "ver"
4) (integer) 999999
2) 1) "name"
2) "search"
3) "ver"
4) (integer) 20604
How can I [...} fix it ?
For the steps to install RediSearch (if needed), you can look here: https://redis.io/docs/stack/search/quick_start/
also which parameters have I to use in line :
\Predis\Client(/* ... */)
Here the official documentation on how to connect to a Redis server with Predis: https://github.com/predis/predis#connecting-to-redis But to put it simply:
new \Predis\Client('redis://127.0.0.1:6379');
// Change the 127.0.0.1 to the IP of the Redis server if it's not on the same server as your PHP
// Change the 6379 to the port used by Redis (6379 is the default port of Redis)
I added macfja/redisearch ^2.2 to my laravel 9.48 app and got errors :
ERR unknown command `FT.CREATE`, with args beginning with: `articleIndices`, `SCHEMA`, `title`, `TEXT`, `SORTABLE`,
when creating index with code:Making dumps of 2 vars above I see in log file :
Searching in next for salvation of this issue I found a hint that this could be raised as redis doesn't have the RediSearch module loaded. How can I check it and fix it ?
also which parameters have I to use in line :
\Predis\Client(/* ... */)
Thank you!