Changeset 2524

Show
Ignore:
Timestamp:
12/21/09 14:44:04
Author:
douglm
Message:

Add a -reindex option to the bw script to reindex the data from the quickstart.

Changes to the indexer to index as the owner of collections - to allow access control to limit access correctly.

Fix the indexer factory - was missing a "/" in the path

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/quickstart/linux/bw

    r2484 r2524  
    2525 
    2626usage() { 
    27   echo "  $PRG [CONFIG-SOURCE] [CONFIG] [PROJECT] [ -offline } [ target ] " 
     27  echo "  $PRG [CONFIG-SOURCE] [CONFIG] [PROJECT] [ -offline ] [ target ] " 
     28  echo "  $PRG ACTION " 
    2829  echo "" 
    2930  echo " where:" 
     
    3738  echo "      -bwc configname" 
    3839  echo "" 
    39   echo "     -offline     Build without attempting to retrieve library jars" 
    40   echo "     target       Ant target to execute" 
     40  echo "   -offline     Build without attempting to retrieve library jars" 
     41  echo "   target       Ant target to execute" 
    4142  echo "" 
    4243  echo "   PROJECT optionally defines the package to build and is none or more of" 
     
    5556  echo "   The environment variable BEDEWORK_CONFIG contains the path to the current" 
    5657  echo "   configuration directory and can be used to build a path to the other files." 
     58  echo "" 
     59  echo "   ACTION defines an action to take usually in the context of the quickstart." 
     60  echo "    In a deployed system many of these actions are handled directly by a" 
     61  echo "    deployed application. ACTION may be one of" 
     62  echo "      -reindex - runs the indexer directly out of the quickstart bedework" 
     63  echo "                 dist directory to rebuild the lucene indexes" 
    5764  echo "" 
    5865} 
     
    6471  usage 
    6572  exit 1 
     73} 
     74 
     75actionReindex() { 
     76  INDEXER=$QUICKSTART_HOME/bedework/dist/temp/shellscr/indexer 
     77   
     78        if [ ! -d "$INDEXER" ] ; then 
     79          errorUsage "The indexer directory $INDEXER does not exist. You probably need to do a rebuild." 
     80        fi 
     81 
     82  cd $INDEXER 
     83  chmod +x bwrun 
     84  ./bwrun reindex-nostart -user admin -indexlocprefix ../../../../../ 
     85   
     86  exit 0 
    6687} 
    6788 
     
    94115monitor= 
    95116 
     117action= 
     118 
    96119if [ "$1" = "" ] ; then 
    97120  usage 
    98121  exit 1 
     122fi 
     123 
     124# look for actions first 
     125 
     126if [ "$1" = "-reindex" ] ; then 
     127  actionReindex 
    99128fi 
    100129