There is a bug that leaves old index.* directories in the Solr data directory.

Here is a script that will clean it up. I wanted to make sure this is
okay, without doing a core reload.

Thanks.

#!/bin/bash

DIR="/mnt/servers/solr/data"
LIST=`ls $DIR`
INDEX=`cat $DIR/index.properties | grep index\= | awk 'BEGIN { FS =
"=" } ; { print $2 }'`
echo $INDEX

for file in  $LIST
do
        if [ $INDEX == $file -o $file == "index" -o $file ==
"index.properties" -o $file == "replication.properties" -o $file ==
"spellchecker" ]
        then
                echo "skip: $file"
        else
                echo "rm -rf $DIR/$file"
                rm -rf $DIR/$file
        fi
done

Reply via email to