Get collection state from command line

Managed by | Updated .

REDIS is used by Funnelback to store various information about collection state.

The state of REDIS can be examined from the command line if required.

See http://redis.io/commands/ 

This can be done as follows:

1. Open up the REDIS CLI

Open REDIS CLI
#Linux
$SEARCH_HOME/linbin/redis/64bit/redis-cli

#Windows
$SEARCH_HOME\wbin\redis\64bit\redis-cli.exe

2. 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>.

Authenticate
127.0.0.1:6379> AUTH <password>

#e.g 
127.0.0.1:6379 AUTH Iz5YKXhB6sah0OyfaqSjvQ

#Response 
OK

3.List keys by entering the keys * command

127.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"

4. Key values can either be obtained by using the GET <KEYNAME> or HGETALL <KEYNAME> command.  The use of GET/HGETALL will depend on the type of key (single value or hash).

See;

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"

5.Quit from the CLI by entering the EXIT command.

127.0.0.1:6379> EXIT
Info

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.

Was this artcle helpful?

Comments