Get collection state from command line
Be cautious when interrogating Redis directly and only use read commands otherwise you may damage the state information which may result in the need to do recrawls or break the state information within the admin UI. |
Background
This article describes how to read the collection state information from the command line.
Collection state information is stored in Redis.
Redis command line access
The following process can be used to access Redis from the command line:
-
Open up the Redis CLI
$SEARCH_HOME/linbin/redis/64bit/redis-cli
%SEARCH_HOME%\wbin\redis\64bit\redis-cli.exe
-
Authenticate by entering the following command. Enter the password obtained from the
$SEARCH_HOM/conf/redis.password.conf.default
file as the value of<password>
.127.0.0.1:6379> AUTH <password> #e.g 127.0.0.1:6379 AUTH Iz5YKXhB6sah0OyfaqSjvQ #Response OK
-
List keys by entering the
keys *
command127.0.0.1:6379> keys * #Response e.g 1) "collection:funnelback-docs:update-progress" 2) "collection:funnelback-community-meta:update-progress" 3) "collection:example-collection:update-progress" 4) "collections:update-status"
-
Key values can either be obtained by using the
GET <KEYNAME>
orHGETALL <KEYNAME>
command. The use ofGET
/HGETALL
will depend on the type of key (single value or hash).Example: Get key values
127.0.0.1:6379> GET <KEYNAME> #e.g 127.0.0.1:6379 GET "collection:funnelback-docs:update-progress" #Response "Pipeline finished"
-
Quit from the CLI by entering the
EXIT
command.127.0.0.1:6379> EXIT