Get collection state from command line

Managed by | Updated .

Info
_Note: 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:

  1. Open up the 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>.

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

    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"
    

    See:

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

    127.0.0.1:6379> EXIT
    

See also

Was this artcle helpful?

Comments