lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r491827 [2/3] - in /incubator/solr/trunk/client/ruby/flare/solr: etc/ ext/ lib/ lib/jsp/ solr/ solr/bin/ solr/conf/ solr/conf/xslt/ solr/data/ solr/data/index/ webapps/
Date Tue, 02 Jan 2007 16:11:46 GMT
Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backup
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backup?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backup (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backup Tue Jan  2 08:11:42 2007
@@ -0,0 +1,108 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to make a backup of a Solr Lucene collection.
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset data_dir user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-d dir] [-u username] [-v]
+       -d          specify directory holding index data
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts d:u:vV OPTION
+do
+    case $OPTION in
+    d)
+        data_dir="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+name=backup.`date +"%Y%m%d%H%M%S"`
+temp=temp-${name}
+
+if [[ -d ${data_dir}/${name} ]]
+then
+    logMessage backup directory ${data_dir}/${name} already exists
+    logExit aborted 1
+fi
+
+if [[ -d ${data_dir}/${temp} ]]
+then
+    logMessage backingup of ${data_dir}/${name} in progress
+    logExit aborted 1
+fi
+
+# clean up after INT/TERM
+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${temp};logExit aborted 13' INT TERM
+
+logMessage making backup ${data_dir}/${name}
+
+# make a backup using hard links into temporary location
+# then move it into place atomically
+cp -lr ${data_dir}/index ${data_dir}/${temp}
+mv ${data_dir}/${temp} ${data_dir}/${name}
+
+logExit ended 0
+

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backup
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backupcleaner
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backupcleaner?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backupcleaner (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backupcleaner Tue Jan  2 08:11:42 2007
@@ -0,0 +1,134 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to clean up backups of a Solr Lucene collection.
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset days num data_dir user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]
+       -D <days>   cleanup backups more than <days> days old
+       -N <num>    keep the most recent <num> number of backups and
+                   cleanup up the remaining ones that are not being pulled
+       -d          specify directory holding index data
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts D:N:d:u:vV OPTION
+do
+    case $OPTION in
+    D)
+        days="$OPTARG"
+        ;;
+    N)
+        num="$OPTARG"
+        ;;
+    d)
+        data_dir="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${days} && -z ${num} ]]
+then
+    echo "$USAGE"
+    exit 1
+fi
+
+fixUser "$@"
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+function remove
+{
+    logMessage removing backup $1
+    /bin/rm -rf $1
+}
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+# trap control-c
+trap 'echo "caught INT/TERM, exiting now but partial cleanup may have already occured";logExit aborted 13' INT TERM
+
+if [[ -n ${days} ]]
+then
+    logMessage cleaning up backups more than ${days} days old
+    for i in `find ${data_dir} -name "backup.*" -maxdepth 1 -mtime +${days} -print`
+    do
+        remove $i
+    done
+elif [[ -n ${num} ]]
+then
+    logMessage cleaning up all backups except for the most recent ${num} ones
+    unset backups count
+    backups=`ls -cd ${data_dir}/backup.* 2>/dev/null`
+    if [[ $? == 0 ]]
+    then
+        count=`echo $backups|wc -w`
+        startpos=`expr $num + 1`
+        if [[ $count -gt $num ]]
+        then
+            for i in `echo $backups|cut -f${startpos}- -d" "`
+            do
+	        remove $i
+	    done
+        fi
+    fi
+fi
+
+logExit ended 0
+
+

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/backupcleaner
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/commit
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/commit?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/commit (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/commit Tue Jan  2 08:11:42 2007
@@ -0,0 +1,119 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to force a commit of all changes since last commit
+# for a Solr server
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset solr_hostname solr_port webapp_name user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-h hostname] [-p port] [-w webapp_name] [-u username] [-v]
+       -h          specify Solr hostname
+       -p          specify Solr port number
+       -w          specify name of Solr webapp (defaults to solr)
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts h:p:w:u:vV OPTION
+do
+    case $OPTION in
+    h)
+        solr_hostname="$OPTARG"
+        ;;
+    p)
+        solr_port="$OPTARG"
+        ;;
+    w)
+        webapp_name="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${solr_port} ]]
+then
+    echo "Solr port number missing in $confFile or command line."
+    echo "$USAGE"
+
+
+	    exit 1
+fi
+
+# use default hostname if not specified
+if [[ -z ${solr_hostname} ]]
+then
+    solr_hostname=localhost
+fi
+
+# use default webapp name if not specified
+if [[ -z ${webapp_name} ]]
+then
+    webapp_name=solr
+fi
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<commit/>"`
+if [[ $? != 0 ]]
+then
+  logMessage failed to connect to Solr server at port ${solr_port}
+  logMessage commit failed
+  logExit failed 1
+fi
+
+# check status of commit request
+echo $rs | grep '<result.*status="0"' > /dev/null 2>&1
+if [[ $? != 0 ]]
+then
+  logMessage commit request to Solr at port ${solr_port} failed:
+  logMessage $rs
+  logExit failed 2
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/commit
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/optimize
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/optimize?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/optimize (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/optimize Tue Jan  2 08:11:42 2007
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to force a optimized commit of all changes since last commit
+# for a Solr server
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset solr_hostname solr_port webapp_name user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-h hostname] [-p port] [-u username] [-v]
+       -h          specify Solr hostname
+       -p          specify Solr port number
+       -w          specify name of Solr webapp (defaults to solr)
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+originalargs="$@"
+while getopts h:p:w:u:vV OPTION
+do
+    case $OPTION in
+    h)
+        solr_hostname="$OPTARG"
+        ;;
+    p)
+        solr_port="$OPTARG"
+        ;;
+    w)
+        webapp_name="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${solr_port} ]]
+then
+    echo "Solr port number missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+# use default hostname if not specified
+if [[ -z ${solr_hostname} ]]
+then
+    solr_hostname=localhost
+fi
+
+# use default webapp name if not specified
+if [[ -z ${webapp_name} ]]
+then
+    webapp_name=solr
+fi
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<optimize/>"`
+if [[ $? != 0 ]]
+then
+  logMessage failed to connect to Solr server at port ${solr_port}
+  logMessage optimize failed
+  logExit failed 1
+fi
+
+# check status of optimize request
+echo $rs | grep '<response.*status="0"' > /dev/null 2>&1
+if [[ $? != 0 ]]
+then
+  logMessage optimize request to Solr at port ${solr_port} failed:
+  logMessage $rs
+  logExit failed 2
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/optimize
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/readercycle
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/readercycle?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/readercycle (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/readercycle Tue Jan  2 08:11:42 2007
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to force all old readers closed and a new reader to be opened
+# for a Solr server
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset solr_hostname solr_port webapp_name user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-p hostname] [-p port] [-w webapp_name] [-u username] [-v]
+       -h          specify Solr hostname
+       -p          specify Solr port number
+       -w          specify name of Solr webapp (defaults to solr)
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+originalargs="$@"
+while getopts h:p:w:u:vV OPTION
+do
+    case $OPTION in
+    h)
+        solr_hostname="$OPTARG"
+        ;;
+    p)
+        solr_port="$OPTARG"
+        ;;
+    w)
+        webapp_name="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${solr_port} ]]
+then
+    echo "Solr port number missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+# use default hostname if not specified
+if [[ -z ${solr_hostname} ]]
+then
+    solr_hostname=localhost
+fi
+
+# use default webapp name if not specified
+if [[ -z ${webapp_name} ]]
+then
+    webapp_name=solr
+fi
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+rs=`curl http://${solr_hostname}:${solr_port}/solr/update -s -d "<commit/>"`
+if [[ $? != 0 ]]
+then
+  logMessage failed to connect to Solr server at port ${solr_port}
+  logMessage reader cycle failed
+  logExit failed 1
+fi
+
+# check status of commit request
+echo $rs | grep '<response.*status="0"' > /dev/null 2>&1
+if [[ $? != 0 ]]
+then
+  logMessage reader cycle request to Solr at port ${solr_port} failed:
+  logMessage $rs
+  logExit failed 2
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/readercycle
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-disable
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-disable?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-disable (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-disable Tue Jan  2 08:11:42 2007
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to disable rsyncd
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/rsyncd.log
+
+# define usage string
+USAGE="\
+usage: $prog [-u username] [-v]
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts u:vV OPTION
+do
+    case $OPTION in
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage disabled by $oldwhoami
+logMessage command: $0 $@
+name=${solr_root}/logs/rsyncd-enabled
+
+if [[ -f ${name} ]]
+then
+    rm -f ${name}
+else
+    logMessage rsyncd not currently enabled
+    logExit exited 1
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-disable
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-enable
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-enable?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-enable (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-enable Tue Jan  2 08:11:42 2007
@@ -0,0 +1,76 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to enable rsyncd
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+log=${solr_root}/logs/rsyncd.log
+
+# define usage string
+USAGE="\
+usage: $prog [-u username] [-v]
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts u:vV OPTION
+do
+    case $OPTION in
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage enabled by $oldwhoami
+logMessage command: $0 $@
+name=${solr_root}/logs/rsyncd-enabled
+
+if [[ -f ${name} ]]
+then
+    logMessage rsyncd already currently enabled
+    logExit exited 1
+else
+    touch ${name}
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-enable
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-start
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-start?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-start (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-start Tue Jan  2 08:11:42 2007
@@ -0,0 +1,145 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to start rsyncd on master Solr server
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset data_dir solr_port rsyncd_port user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/rsyncd.log
+
+# define usage string
+USAGE="\
+usage: $prog [-d dir] [-p portnum] [-u username] [-v]
+       -d          specify directory holding index data
+       -p          specify rsyncd port number
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts d:p:u:vV OPTION
+do
+    case $OPTION in
+    d)
+        data_dir="$OPTARG"
+        ;;
+    p)
+        rsyncd_port="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+# try to determine rsyncd port number from $confFile if not specified on
+# command line, default to solr_port+10000
+if [[ -z ${rsyncd_port} ]]
+then
+    if [[ "${solr_port}" ]]
+    then
+        rsyncd_port=`expr 10000 + ${solr_port}`
+    else
+        echo "rsyncd port number missing in $confFile or command line."
+        echo "$USAGE"
+        exit 1
+    fi
+fi
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+if [[ ! -f ${solr_root}/logs/rsyncd-enabled ]]
+then
+    logMessage rsyncd disabled
+    exit 1
+fi
+
+if \
+    rsync rsync://localhost:${rsyncd_port} >/dev/null 2>&1
+then
+    logMessage "rsyncd already running at port ${rsyncd_port}"
+    exit 1
+fi
+
+# create conf/rsyncd.conf on the fly, creating solrlogs directory if needed
+if [[ ! -d ${solr_root}/conf ]]
+then
+    mkdir ${solr_root}/conf
+fi
+cat <<EOF > ${solr_root}/conf/rsyncd.conf
+#### rsyncd.conf file ####
+ 
+uid = $(whoami)
+gid = $(whoami)
+use chroot = no
+list = no
+pid file = ${solr_root}/logs/rsyncd.pid
+log file = ${solr_root}/logs/rsyncd.log
+[solr]
+    path = ${data_dir}
+    comment = Solr
+EOF
+
+rsync --daemon --port=${rsyncd_port} --config=${solr_root}/conf/rsyncd.conf
+
+# first make sure rsyncd is accepting connections
+i=1
+while \
+ ! rsync rsync://localhost:${rsyncd_port} >/dev/null 2>&1
+do
+    if (( i++ > 15 ))
+    then
+        logMessage "rsyncd not accepting connections, exiting" >&2
+        exit 2
+    fi
+    sleep 1
+done
+
+logMessage rsyncd started with data_dir=${data_dir} and accepting requests

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-start
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-stop
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-stop?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-stop (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-stop Tue Jan  2 08:11:42 2007
@@ -0,0 +1,105 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to stop rsyncd on master Solr server
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/rsyncd.log
+
+# define usage string
+USAGE="\
+usage: $prog [-u username] [-v]
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts u:vV OPTION
+do
+    case $OPTION in
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+logMessage stopped by $oldwhoami
+logMessage command: $0 $@
+
+# look for pid file
+if [[ ! -f ${solr_root}/logs/rsyncd.pid ]]
+then
+    logMessage "missing rsyncd pid file ${solr_root}/logs/rsyncd.pid"
+    exit 2
+fi
+
+# get PID from file
+pid=$(<${solr_root}/logs/rsyncd.pid)
+if [[ -z $pid ]]
+then
+    logMessage "unable to get rsyncd's PID"
+    exit 2
+fi
+
+kill $pid
+
+# wait until rsyncd dies or we time out
+dead=0
+timer=0
+timeout=300
+while (( ! dead && timer < timeout ))
+do
+    if ps -eo pid | grep -qw $pid
+    then
+	kill $pid
+        (( timer++ ))
+        sleep 1
+    else
+        dead=1
+    fi
+done
+if ps -eo pid | grep -qw $pid
+then
+    logMessage rsyncd failed to stop after $timeout seconds
+    exit 3
+fi
+
+# remove rsyncd.conf
+/bin/rm -f ${solr_root}/conf/rsyncd.conf

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/rsyncd-stop
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/scripts-util
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/scripts-util?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/scripts-util (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/scripts-util Tue Jan  2 08:11:42 2007
@@ -0,0 +1,83 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# util functions used by scripts
+
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
+
+# set up variables
+prog=${0##*/}
+
+# source the config file if present
+confFile=${solr_root}/conf/scripts.conf
+if [[ -f $confFile ]]
+then
+    . $confFile
+fi
+
+function fixUser
+{
+# set user to $(whoami) if not specified
+    if [[ -z ${user} ]]
+    then
+        user=$(whoami)
+    fi
+
+# sudo
+    if [[ $(whoami) != ${user} ]]
+    then
+        sudo -u ${user} $0 "$@"
+        exit $?
+    fi
+
+    oldwhoami=$(who -m | cut -d' ' -f1 | sed -e's/^.*!//')
+
+    if [[ "${oldwhoami}" == "" ]]
+    then
+        oldwhoami=`ps h -Hfp $(pgrep -g0 ${0##*/}) | tail -1|cut -f1 -d" "`
+    fi
+}
+
+function timeStamp
+{
+    date +'%Y/%m/%d %H:%M:%S'
+}
+
+function logMessage
+{
+    echo $(timeStamp) $@>>$log
+    if [[ -n ${verbose} ]]
+    then
+	echo $@
+    fi
+}
+
+function logExit
+{
+    end=`date +"%s"`
+    diff=`expr $end - $start`
+    echo "$(timeStamp) $1 (elapsed time: $diff sec)">>$log
+    exit $2
+}
+
+# create logs directory if not there
+if [[ ! -d ${solr_root}/logs ]]
+then
+    mkdir ${solr_root}/logs
+fi
+
+umask 002

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/scripts-util
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapcleaner
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapcleaner?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapcleaner (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapcleaner Tue Jan  2 08:11:42 2007
@@ -0,0 +1,140 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to clean up snapshots of a Solr Lucene collection.
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset days num data_dir user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog -D <days> | -N <num> [-d dir] [-u username] [-v]
+       -D <days>   cleanup snapshots more than <days> days old
+       -N <num>    keep the most recent <num> number of snapshots and
+                   cleanup up the remaining ones that are not being pulled
+       -d          specify directory holding index data
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts D:N:d:u:vV OPTION
+do
+    case $OPTION in
+    D)
+        days="$OPTARG"
+        ;;
+    N)
+        num="$OPTARG"
+        ;;
+    d)
+        data_dir="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${days} && -z ${num} ]]
+then
+    echo "$USAGE"
+    exit 1
+fi
+
+fixUser "$@"
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+function remove
+{
+    syncing=`ps -fwwwu ${user}|grep -w rsync|grep -v grep|grep -w $1`
+    if [[ -n $syncing ]]
+    then
+	logMessage $1 not removed - rsync in progress
+    else
+	logMessage removing snapshot $1
+	/bin/rm -rf $1
+    fi
+}
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+# trap control-c
+trap 'echo "caught INT/TERM, exiting now but partial cleanup may have already occured";logExit aborted 13' INT TERM
+
+if [[ -n ${days} ]]
+then
+    logMessage cleaning up snapshots more than ${days} days old
+    for i in `find ${data_dir} -name "snapshot.*" -maxdepth 1 -mtime +${days} -print`
+    do
+        remove $i
+    done
+elif [[ -n ${num} ]]
+then
+    logMessage cleaning up all snapshots except for the most recent ${num} ones
+    unset snapshots count
+    snapshots=`ls -cd ${data_dir}/snapshot.* 2>/dev/null`
+    if [[ $? == 0 ]]
+    then
+        count=`echo $snapshots|wc -w`
+        startpos=`expr $num + 1`
+        if [[ $count -gt $num ]]
+        then
+            for i in `echo $snapshots|cut -f${startpos}- -d" "`
+            do
+	        remove $i
+	    done
+        fi
+    fi
+fi
+
+logExit ended 0
+
+

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapcleaner
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapinstaller
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapinstaller?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapinstaller (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapinstaller Tue Jan  2 08:11:42 2007
@@ -0,0 +1,166 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to install a snapshot into place as the Lucene collection
+# for a Solr server
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset master_host master_status_dir data_dir user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-M master] [-S sdir] [-d dir] [-u username] [-v]
+       -M master   specify hostname of master server from where to pull index
+                   snapshot
+       -S          specify directory holding snapshot status on master server
+       -d          specify directory holding index data on local machine
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts M:S:d:u:vV OPTION
+do
+    case $OPTION in
+    M)
+        master_host="$OPTARG"
+        ;;
+    S)
+        master_status_dir="$OPTARG"
+        ;;
+    d)
+        data_dir="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${master_host} ]]
+then
+    echo "name of master server missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+if [[ -z ${master_status_dir} ]]
+then
+    echo "directory holding snapshot status on master server missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+fixUser "$@"
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+# assume relative path to start at ${solr_root}
+if [[ "`echo ${master_status_dir}|cut -c1`" != "/" ]]
+then
+    master_status_dir=${solr_root}/${master_status_dir}
+fi
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+# get directory name of latest snapshot
+name=`find ${data_dir} -name snapshot.* -print|grep -v wip|sort -r|head -1`
+
+# clean up after INT/TERM
+trap 'echo "caught INT/TERM, exiting now but partial installation may have already occured";/bin/rm -rf ${data_dir"/index.tmp$$;logExit aborted 13' INT TERM
+
+# is there a snapshot
+if [[ "${name}" == "" ]]
+then
+    logMessage no shapshot available
+    logExit ended 0
+fi
+
+# has snapshot already been installed
+if [[ ${name} == `cat ${solr_root}/logs/snapshot.current 2>/dev/null` ]]
+then
+    logMessage latest snapshot ${name} already installed
+    logExit ended 0
+fi
+
+# make sure master has directory for hold slaves stats/state
+if
+    ! ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}
+then
+    logMessage failed to ssh to master ${master_host}, snapshot status not updated on master
+fi
+
+# install using hard links into temporary directory
+# remove original index and then atomically copy new one into place
+logMessage installing snapshot ${name}
+cp -lr ${name}/ ${data_dir}/index.tmp$$
+/bin/rm -rf ${data_dir}/index
+mv -f ${data_dir}/index.tmp$$ ${data_dir}/index
+
+# update distribution stats
+echo ${name} > ${solr_root}/logs/snapshot.current
+
+# push stats/state to master
+if
+    ! scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snapshot.current ${master_host}:${master_status_dir}/snapshot.current.`uname -n`
+then
+    logMessage failed to ssh to master ${master_host}, snapshot status not updated on master
+fi
+
+# notify Solr to open a new Searcher
+logMessage notifing Solr to open a new Searcher
+${solr_root}/bin/commit
+if [[ $? != 0 ]]
+then
+  logMessage failed to connect to Solr server
+  logMessage snapshot installed but Solr server has not open a new Searcher
+  logExit failed 1
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapinstaller
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller Tue Jan  2 08:11:42 2007
@@ -0,0 +1,248 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to copy snapshots of a Solr Lucene collection from the master
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset master_host rsyncd_port master_data_dir master_status_dir snap_name
+unset sizeonly stats data_dir user verbose debug compress startStatus
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-M master] [-P portnum] [-D mdir] [-S sdir] [-n snapshot] [-d dir] [-u username] [-svz]
+       -M master   specify hostname of master server from where to pull index
+                   snapshot
+       -P port     specify rsyncd port number of master server from where to
+                   pull index snapshot
+       -D          specify directory holding index data on master server
+       -S          specify directory holding snapshot status on master server
+       -n snapshot pull a specific snapshot by name
+       -d          specify directory holding index data on local machine
+       -u          specify user to sudo to before running script
+       -s          use the --size-only option with rsync
+       -v          increase verbosity (-vv show file transfer stats also)
+       -V          output debugging info
+       -z          enable compression of data
+"
+
+# parse args
+while getopts M:P:D:S:n:d:u:svVz OPTION
+do
+    case $OPTION in
+    M)
+        master_host="$OPTARG"
+        ;;
+    P)
+        rsyncd_port="$OPTARG"
+        ;;
+    D)
+        master_data_dir="$OPTARG"
+        ;;
+    S)
+        master_status_dir="$OPTARG"
+        ;;
+    n)
+        snap_name="$OPTARG"
+        ;;
+    d)
+        data_dir="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    s)
+        sizeonly="--size-only"
+        ;;
+    v)
+        [[ -n $verbose ]] && stats="--stats" || verbose=v
+        ;;
+    V)
+        debug="V"
+        ;;
+    z)
+        compress="z"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+if [[ -z ${master_host} ]]
+then
+    echo "name of master server missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+# try to determine rsyncd port number from $confFile if not specified on
+# command line, default to solr_port+10000
+if [[ -z ${rsyncd_port} ]]
+then
+    if [[ "${solr_port}" ]]
+    then
+        rsyncd_port=`expr 10000 + ${solr_port}`
+    else
+        echo "rsyncd port number of master server missing in $confFile or command line."
+        echo "$USAGE"
+        exit 1
+    fi
+fi
+
+if [[ -z ${master_data_dir} ]]
+then
+    echo "directory holding index data on master server missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+if [[ -z ${master_status_dir} ]]
+then
+    echo "directory holding snapshot status on master server missing in $confFile or command line."
+    echo "$USAGE"
+    exit 1
+fi
+
+fixUser "$@"
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+# assume relative path to start at ${solr_root}
+if [[ "`echo ${master_data_dir}|cut -c1`" != "/" ]]
+then
+    master_data_dir=${solr_root}/${master_data_dir}
+fi
+if [[ "`echo ${master_status_dir}|cut -c1`" != "/" ]]
+then
+    master_status_dir=${solr_root}/${master_status_dir}
+fi
+
+# push stats/state to master if necessary
+function pushStatus
+{
+    scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snappuller.status ${master_host}:${master_status_dir}/snapshot.status.`uname -n`
+}
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+if [[ ! -f ${solr_root}/logs/snappuller-enabled ]]
+then
+    logMessage snappuller disabled
+    exit 1
+fi
+
+# make sure we can ssh to master
+if
+    ! ssh -o StrictHostKeyChecking=no ${master_host} id 1>/dev/null 2>&1
+then
+    logMessage failed to ssh to master ${master_host}
+    exit 1
+fi
+
+# get directory name of latest snapshot if not specified on command line
+if [[ -z ${snap_name} ]]
+then
+    snap_name=`ssh -o StrictHostKeyChecking=no ${master_host} "find ${master_data_dir} -name snapshot.\* -print"|grep -v wip|sort -r|head -1`
+fi
+if [[ "${snap_name}" == "" ]]
+then
+    logMessage no snapshot available on ${master_host} in ${master_data_dir}
+    logExit ended 0
+else
+    name=`basename ${snap_name}`
+fi
+
+# clean up after INT/TERM
+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${data_dir}/${name} ${data_dir}/${name}-wip;echo ${startStatus} aborted:$(timeStamp)>${solr_root}/logs/snappuller.status;pushStatus;logExit aborted 13' INT TERM
+
+if [[ -d ${data_dir}/${name} || -d ${data_dir}/${name}-wip ]]
+then
+    logMessage no new snapshot available on ${master_host} in ${master_data_dir}
+    logExit ended 0
+fi
+
+# take a snapshot of current index so that only modified files will be rsync-ed
+# put the snapshot in the 'work-in-progress" directory to prevent it from
+# being installed while the copying is still in progress
+cp -lr ${data_dir}/index ${data_dir}/${name}-wip
+# force rsync of segments and .del files since we are doing size-only
+if [[ -n ${sizeonly} ]]
+then
+    rm -f ${data_dir}/${name}-wip/segments
+    rm -f ${data_dir}/${name}-wip/*.del
+fi
+
+logMessage pulling snapshot ${name}
+
+# make sure master has directory for hold slaves stats/state
+ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}
+
+# start new distribution stats
+rsyncStart=`date`
+startTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`
+rsyncStartSec=`date -d "$rsyncStart" +'%s'`
+startStatus="rsync of `basename ${name}` started:$startTimestamp"
+echo ${startStatus} > ${solr_root}/logs/snappuller.status
+pushStatus
+
+# rsync over files that have changed
+rsync -Wa${verbose}${compress} --delete ${sizeonly} \
+${stats} rsync://${master_host}:${rsyncd_port}/solr/${name}/ ${data_dir}/${name}-wip
+
+rc=$?
+rsyncEnd=`date`
+endTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`
+rsyncEndSec=`date -d "$rsyncEnd" +'%s'`
+elapsed=`expr $rsyncEndSec - $rsyncStartSec`
+if [[ $rc != 0 ]]
+then
+  logMessage rsync failed
+  /bin/rm -rf ${data_dir}/${name}-wip
+  echo ${startStatus} failed:$endTimestamp > ${solr_root}/logs/snappuller.status
+  pushStatus
+  logExit failed 1
+fi
+
+# move into place atomically
+mv ${data_dir}/${name}-wip ${data_dir}/${name}
+
+# finish new distribution stats`
+echo ${startStatus} ended:$endTimestamp rsync-elapsed:${elapsed} > ${solr_root}/logs/snappuller.status
+pushStatus
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-disable
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-disable?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-disable (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-disable Tue Jan  2 08:11:42 2007
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to disable snappuller
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/snappuller.log
+
+# define usage string
+USAGE="\
+usage: $prog [-u username] [-v]
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts u:vV OPTION
+do
+    case $OPTION in
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage disabled by $oldwhoami
+logMessage command: $0 $@
+name=${solr_root}/logs/snappuller-enabled
+
+if [[ -f ${name} ]]
+then
+    rm -f ${name}
+else
+    logMessage snappuller not currently enabled
+    logExit exited 1
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-disable
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-enable
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-enable?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-enable (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-enable Tue Jan  2 08:11:42 2007
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to enable snappuller
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/snappuller.log
+
+# define usage string
+USAGE="\
+usage: $prog [-u username] [-v]
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts u:vV OPTION
+do
+    case $OPTION in
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+start=`date +"%s"`
+
+logMessage enabled by $oldwhoami
+logMessage command: $0 $@
+name=${solr_root}/logs/snappuller-enabled
+
+if [[ -f ${name} ]]
+then
+    logMessage snappuller already currently enabled
+    logExit exited 1
+else
+    touch ${name}
+fi
+
+logExit ended 0

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snappuller-enable
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapshooter
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapshooter?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapshooter (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapshooter Tue Jan  2 08:11:42 2007
@@ -0,0 +1,109 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Shell script to take a snapshot of a Solr Lucene collection.
+
+orig_dir=$(pwd)
+cd ${0%/*}/..
+solr_root=$(pwd)
+cd ${orig_dir}
+
+unset data_dir user verbose debug
+. ${solr_root}/bin/scripts-util
+
+# set up variables
+prog=${0##*/}
+log=${solr_root}/logs/${prog}.log
+
+# define usage string
+USAGE="\
+usage: $prog [-d dir] [-u username] [-v]
+       -d          specify directory holding index data
+       -u          specify user to sudo to before running script
+       -v          increase verbosity
+       -V          output debugging info
+"
+
+# parse args
+while getopts d:u:vV OPTION
+do
+    case $OPTION in
+    d)
+        data_dir="$OPTARG"
+        ;;
+    u)
+        user="$OPTARG"
+        ;;
+    v)
+        verbose="v"
+        ;;
+    V)
+        debug="V"
+        ;;
+    *)
+        echo "$USAGE"
+        exit 1
+    esac
+done
+
+[[ -n $debug ]] && set -x
+
+fixUser "$@"
+
+# use default value for data_dir if not specified
+# relative path starts at ${solr_root}
+if [[ -z ${data_dir} ]]
+then
+    data_dir=${solr_root}/data
+elif [[ "`echo ${data_dir}|cut -c1`" != "/" ]]
+then
+    data_dir=${solr_root}/${data_dir}
+fi
+
+start=`date +"%s"`
+
+logMessage started by $oldwhoami
+logMessage command: $0 $@
+
+snap_name=snapshot.`date +"%Y%m%d%H%M%S"`
+name=${data_dir}/${snap_name}
+temp=${data_dir}/temp-${snap_name}
+
+if [[ -d ${name} ]]
+then
+    logMessage snapshot directory ${name} already exists
+    logExit aborted 1
+fi
+
+if [[ -d ${temp} ]]
+then
+    logMessage snapshoting of ${name} in progress
+    logExit aborted 1
+fi
+
+# clean up after INT/TERM
+trap 'echo cleaning up, please wait ...;/bin/rm -rf ${name} ${temp};logExit aborted 13' INT TERM
+
+logMessage taking snapshot ${name}
+
+# take a snapshot using hard links into temporary location
+# then move it into place atomically
+cp -lr ${data_dir}/index ${temp}
+mv ${temp} ${name}
+
+logExit ended 0
+

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/bin/snapshooter
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/conf/admin-extra.html
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/conf/admin-extra.html?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/conf/admin-extra.html (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/conf/admin-extra.html Tue Jan  2 08:11:42 2007
@@ -0,0 +1,31 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- The content of this page will be statically included into the top
+of the admin page.  Uncomment this as an example to see there the content
+will show up.
+
+<hr>
+<i>This line will appear before the first table</i>
+<tr>
+<td colspan="2">
+This row will be appended to the end of the first table
+</td>
+</tr>
+<hr>
+
+-->

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/conf/protwords.txt
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/conf/protwords.txt?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/conf/protwords.txt (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/conf/protwords.txt Tue Jan  2 08:11:42 2007
@@ -0,0 +1,21 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------
+# Use a protected word file to protect against the stemmer reducing two
+# unrelated words to the same base word.
+
+# Some non-words that normally won't be encountered,
+# just to test that they won't be stemmed.
+dontstems
+zwhacky
+

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/conf/schema.xml
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/conf/schema.xml?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/conf/schema.xml (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/conf/schema.xml Tue Jan  2 08:11:42 2007
@@ -0,0 +1,251 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- This is the Solr schema file. This file should be named "schema.xml" and
+ should be in the conf directory under the solr home
+ (i.e. ./solr/conf/schema.xml by default) 
+ or located where the classloader for the Solr webapp can find it.
+
+ For more information, on how to customize this file, please see
+ http://wiki.apache.org/solr/SchemaXml
+-->
+
+<schema name="flare" version="1.1">
+  <!-- attribute "name" is the name of this schema and is only used for display purposes.
+       Applications should change this to reflect the nature of the search collection.
+       version="1.1" is Solr's version number for the schema syntax and semantics.  It should
+       not normally be changed by applications.
+       1.0: multiValued attribute did not exist, all fields are multiValued by nature
+       1.1: multiValued attribute introduced, false by default -->
+
+  <types>
+    <!-- field type definitions. The "name" attribute is
+       just a label to be used by field definitions.  The "class"
+       attribute and any other attributes determine the real
+       behavior of the fieldtype.
+         Class names starting with "solr" refer to java classes in the
+       org.apache.solr.analysis package.
+    -->
+
+    <!-- The StrField type is not analyzed, but indexed/stored verbatim.  
+       - StrField and TextField support an optional compressThreshold which
+       limits compression (if enabled in the derived fields) to values which
+       exceed a certain size (in characters).
+    -->
+    <fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
+
+    <!-- boolean type: "true" or "false" -->
+    <fieldtype name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
+
+    <!-- The optional sortMissingLast and sortMissingFirst attributes are
+         currently supported on types that are sorted internally as strings.
+       - If sortMissingLast="true", then a sort on this field will cause documents
+         without the field to come after documents with the field,
+         regardless of the requested sort order (asc or desc).
+       - If sortMissingFirst="true", then a sort on this field will cause documents
+         without the field to come before documents with the field,
+         regardless of the requested sort order.
+       - If sortMissingLast="false" and sortMissingFirst="false" (the default),
+         then default lucene sorting will be used which places docs without the
+         field first in an ascending sort and last in a descending sort.
+    -->    
+
+
+    <!-- numeric field types that store and index the text
+         value verbatim (and hence don't support range queries, since the
+         lexicographic ordering isn't equal to the numeric ordering) -->
+    <fieldtype name="integer" class="solr.IntField" omitNorms="true"/>
+    <fieldtype name="long" class="solr.LongField" omitNorms="true"/>
+    <fieldtype name="float" class="solr.FloatField" omitNorms="true"/>
+    <fieldtype name="double" class="solr.DoubleField" omitNorms="true"/>
+
+
+    <!-- Numeric field types that manipulate the value into
+         a string value that isn't human-readable in its internal form,
+         but with a lexicographic ordering the same as the numeric ordering,
+         so that range queries work correctly. -->
+    <fieldtype name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
+    <fieldtype name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
+    <fieldtype name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
+    <fieldtype name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
+
+
+    <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
+         is a more restricted form of the canonical representation of dateTime
+         http://www.w3.org/TR/xmlschema-2/#dateTime    
+         The trailing "Z" designates UTC time and is mandatory.
+         Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
+         All other components are mandatory.
+
+         Expressions can also be used to denote calculations that should be
+         performed relative to "NOW" to determine the value, ie...
+
+               NOW/HOUR
+                  ... Round to the start of the current hour
+               NOW-1DAY
+                  ... Exactly 1 day prior to now
+               NOW/DAY+6MONTHS+3DAYS
+                  ... 6 months and 3 days in the future from the start of
+                      the current day
+                      
+         Consult the DateField javadocs for more information.
+      -->
+    <fieldtype name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
+
+    <!-- solr.TextField allows the specification of custom text analyzers
+         specified as a tokenizer and a list of token filters. Different
+         analyzers may be specified for indexing and querying.
+
+         The optional positionIncrementGap puts space between multiple fields of
+         this type on the same document, with the purpose of preventing false phrase
+         matching across fields.
+
+         For more info on customizing your analyzer chain, please see
+         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
+     -->
+
+    <!-- One can also specify an existing Analyzer class that has a
+         default constructor via the class attribute on the analyzer element
+    <fieldtype name="text_greek" class="solr.TextField">
+      <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
+    </fieldType>
+    -->
+
+    <!-- A text field that only splits on whitespace for exact matching of words -->
+    <fieldtype name="text_ws" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      </analyzer>
+    </fieldtype>
+
+    <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
+        words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
+        so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
+        Synonyms and stopwords are customized by external files, and stemming is enabled.
+        Duplicate tokens at the same position (which may result from Stemmed Synonyms or
+        WordDelim parts) are removed.
+        -->
+    <fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
+        -->
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+    </fieldtype>
+
+
+    <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
+         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
+    <fieldtype name="textTight" class="solr.TextField" positionIncrementGap="100" >
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+    </fieldtype>
+
+ </types>
+
+
+ <fields>
+   <!-- Valid attributes for fields:
+     name: mandatory - the name for the field
+     type: mandatory - the name of a previously defined type from the <types> section
+     indexed: true if this field should be indexed (searchable or sortable)
+     stored: true if this field should be retrievable
+     compressed: [false] if this field should be stored using gzip compression
+       (this will only apply if the field type is compressable; among
+       the standard field types, only TextField and StrField are)
+     multiValued: true if this field may contain multiple values per document
+     omitNorms: (expert) set to true to omit the norms associated with
+       this field (this disables length normalization and index-time
+       boosting for the field, and saves some memory).  Only full-text
+       fields or fields that need an index-time boost need norms.
+   -->
+
+   <field name="id" type="string" indexed="true" stored="true"/>
+
+   <!-- catchall field, containing all other searchable text fields (implemented
+        via copyField further on in this schema  -->
+   <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
+
+   <!-- Dynamic field definitions.  If a field name is not found, dynamicFields
+        will be used if the name matches any of the patterns.
+        RESTRICTION: the glob-like pattern in the name attribute must have
+        a "*" only at the start or the end.
+        EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)
+        Longer patterns will be matched first.  if equal size patterns
+        both match, the first appearing in the schema will be used.  -->
+   <dynamicField name="*_i"  type="sint"    indexed="true"  stored="true"/>
+   <dynamicField name="*_s"  type="string"  indexed="true"  stored="true"/>
+   <dynamicField name="*_l"  type="slong"   indexed="true"  stored="true"/>
+   <dynamicField name="*_t"  type="text"    indexed="true"  stored="true"/>
+   <dynamicField name="*_b"  type="boolean" indexed="true"  stored="true"/>
+   <dynamicField name="*_f"  type="sfloat"  indexed="true"  stored="true"/>
+   <dynamicField name="*_d"  type="sdouble" indexed="true"  stored="true"/>
+   <dynamicField name="*_dt" type="date"    indexed="true"  stored="true"/>
+ </fields>
+
+ <!-- field to use to determine and enforce document uniqueness. -->
+ <uniqueKey>id</uniqueKey>
+
+ <!-- field for the QueryParser to use when an explicit fieldname is absent -->
+ <defaultSearchField>text</defaultSearchField>
+
+ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
+ <solrQueryParser defaultOperator="AND"/>
+
+  <!-- copyField commands copy one field to another at the time a document
+        is added to the index.  It's used either to index the same field differently,
+        or to add multiple fields to the same field for easier/faster searching.  -->
+<!--   <copyField source="id" dest="sku"/>
+
+   <copyField source="cat" dest="text"/>
+   <copyField source="name" dest="text"/>
+   <copyField source="manu" dest="text"/>
+   <copyField source="features" dest="text"/>
+   <copyField source="includes" dest="text"/>
+
+   <copyField source="manu" dest="manu_exact"/>
+-->
+
+ <!-- Similarity is the scoring routine for each document vs. a query.
+      A custom similarity may be specified here, but the default is fine
+      for most applications.  -->
+ <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
+
+</schema>

Propchange: incubator/solr/trunk/client/ruby/flare/solr/solr/conf/schema.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/solr/trunk/client/ruby/flare/solr/solr/conf/scripts.conf
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/client/ruby/flare/solr/solr/conf/scripts.conf?view=auto&rev=491827
==============================================================================
--- incubator/solr/trunk/client/ruby/flare/solr/solr/conf/scripts.conf (added)
+++ incubator/solr/trunk/client/ruby/flare/solr/solr/conf/scripts.conf Tue Jan  2 08:11:42 2007
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+user=
+solr_hostname=localhost
+solr_port=8983
+rsyncd_port=18983
+data_dir=
+webapp_name=solr
+master_host=
+master_data_dir=
+master_status_dir=



Mime
View raw message