bigindex-solr 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -0
- data/MIT-LICENSE +0 -0
- data/README.rdoc +10 -2
- data/Rakefile +0 -0
- data/VERSION +1 -1
- data/bigindex-solr.gemspec +5 -44
- data/examples/bigindex.yml +0 -0
- data/install.rb +0 -0
- data/lib/bigindex-solr.rb +0 -0
- data/lib/bigindex-solr/tasks.rb +0 -0
- data/lib/tasks/bigindex_solr.rake +5 -3
- data/schema.xml +0 -0
- data/solr/CHANGES.txt +648 -3
- data/solr/LICENSE.txt +153 -49
- data/solr/NOTICE.txt +45 -12
- data/solr/etc/jetty.xml +11 -5
- data/solr/etc/webdefault.xml +0 -0
- data/solr/lib/jetty-6.1.3.jar +0 -0
- data/solr/lib/jetty-util-6.1.3.jar +0 -0
- data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
- data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
- data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
- data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
- data/solr/lib/servlet-api-2.5-6.1.3.jar +0 -0
- data/solr/solr/README.txt +0 -0
- data/solr/solr/bin/abc +20 -6
- data/solr/solr/bin/abo +20 -6
- data/solr/solr/bin/backup +11 -2
- data/solr/solr/bin/backupcleaner +1 -1
- data/solr/solr/bin/commit +10 -5
- data/solr/solr/bin/optimize +10 -5
- data/solr/solr/bin/readercycle +1 -1
- data/solr/solr/bin/rsyncd-disable +1 -1
- data/solr/solr/bin/rsyncd-enable +1 -1
- data/solr/solr/bin/rsyncd-start +1 -1
- data/solr/solr/bin/scripts-util +18 -2
- data/solr/solr/bin/snapcleaner +8 -2
- data/solr/solr/bin/snapinstaller +15 -4
- data/solr/solr/bin/snappuller +26 -5
- data/solr/solr/bin/snappuller-disable +1 -1
- data/solr/solr/bin/snappuller-enable +1 -1
- data/solr/solr/bin/snapshooter +30 -3
- data/solr/solr/conf/admin-extra.html +0 -0
- data/solr/solr/conf/elevate.xml +36 -0
- data/solr/solr/conf/protwords.txt +0 -0
- data/solr/solr/conf/schema.xml +0 -0
- data/solr/solr/conf/scripts.conf +0 -0
- data/solr/solr/conf/solrconfig.xml +321 -83
- data/solr/solr/conf/spellings.txt +2 -0
- data/solr/solr/conf/stopwords.txt +0 -0
- data/solr/solr/conf/synonyms.txt +0 -0
- data/solr/solr/conf/xslt/example.xsl +0 -0
- data/solr/solr/conf/xslt/example_atom.xsl +5 -1
- data/solr/solr/conf/xslt/example_rss.xsl +5 -1
- data/solr/solr/conf/xslt/luke.xsl +337 -0
- data/solr/start.jar +0 -0
- data/solr/webapps/solr.war +0 -0
- data/spec/bigindex-solr_spec.rb +0 -3
- data/spec/spec_helper.rb +0 -0
- metadata +4 -43
- data/.document +0 -5
- data/solr/lib/commons-codec-1.3.jar +0 -0
- data/solr/lib/commons-csv-0.1-SNAPSHOT.jar +0 -0
- data/solr/lib/commons-fileupload-1.2.jar +0 -0
- data/solr/lib/commons-io-1.2.jar +0 -0
- data/solr/lib/easymock.jar +0 -0
- data/solr/lib/lucene-analyzers-2007-05-20_00-04-53.jar +0 -0
- data/solr/lib/lucene-core-2007-05-20_00-04-53.jar +0 -0
- data/solr/lib/lucene-highlighter-2007-05-20_00-04-53.jar +0 -0
- data/solr/lib/lucene-snowball-2007-05-20_00-04-53.jar +0 -0
- data/solr/lib/lucene-spellchecker-2007-05-20_00-04-53.jar +0 -0
- data/solr/lib/servlet-api-2.4.jar +0 -0
- data/solr/lib/xpp3-1.1.3.4.O.jar +0 -0
- data/solr/solr/data/development/index/_a.fdt +0 -0
- data/solr/solr/data/development/index/_a.fdx +0 -0
- data/solr/solr/data/development/index/_a.fnm +0 -2
- data/solr/solr/data/development/index/_a.frq +0 -1
- data/solr/solr/data/development/index/_a.nrm +0 -1
- data/solr/solr/data/development/index/_a.prx +0 -0
- data/solr/solr/data/development/index/_a.tii +0 -0
- data/solr/solr/data/development/index/_a.tis +0 -0
- data/solr/solr/data/development/index/_a_1.del +0 -0
- data/solr/solr/data/development/index/_b.fdt +0 -0
- data/solr/solr/data/development/index/_b.fdx +0 -0
- data/solr/solr/data/development/index/_b.fnm +0 -2
- data/solr/solr/data/development/index/_b.frq +0 -0
- data/solr/solr/data/development/index/_b.nrm +0 -1
- data/solr/solr/data/development/index/_b.prx +0 -0
- data/solr/solr/data/development/index/_b.tii +0 -0
- data/solr/solr/data/development/index/_b.tis +0 -0
- data/solr/solr/data/development/index/_b_1.del +0 -0
- data/solr/solr/data/development/index/_c.fdt +0 -0
- data/solr/solr/data/development/index/_c.fdx +0 -0
- data/solr/solr/data/development/index/_c.fnm +0 -2
- data/solr/solr/data/development/index/_c.frq +0 -1
- data/solr/solr/data/development/index/_c.nrm +0 -1
- data/solr/solr/data/development/index/_c.prx +0 -0
- data/solr/solr/data/development/index/_c.tii +0 -0
- data/solr/solr/data/development/index/_c.tis +0 -0
- data/solr/solr/data/development/index/_c_1.del +0 -0
- data/solr/solr/data/development/index/segments.gen +0 -0
- data/solr/solr/data/development/index/segments_q +0 -0
data/solr/solr/bin/backup
CHANGED
@@ -74,7 +74,7 @@ fi
|
|
74
74
|
|
75
75
|
fixUser "$@"
|
76
76
|
|
77
|
-
|
77
|
+
setStartTime
|
78
78
|
|
79
79
|
logMessage started by $oldwhoami
|
80
80
|
logMessage command: $0 $@
|
@@ -101,7 +101,16 @@ logMessage making backup ${data_dir}/${name}
|
|
101
101
|
|
102
102
|
# make a backup using hard links into temporary location
|
103
103
|
# then move it into place atomically
|
104
|
-
|
104
|
+
if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
105
|
+
then
|
106
|
+
orig_dir=$(pwd)
|
107
|
+
mkdir ${data_dir}/${temp}
|
108
|
+
cd ${data_dir}/index
|
109
|
+
find . -print|cpio -pdlmu ${data_dir}/${temp} 1>/dev/null 2>&1
|
110
|
+
cd ${orig_dir}
|
111
|
+
else
|
112
|
+
cp -lr ${data_dir}/index ${data_dir}/${temp}
|
113
|
+
fi
|
105
114
|
mv ${data_dir}/${temp} ${data_dir}/${name}
|
106
115
|
|
107
116
|
logExit ended 0
|
data/solr/solr/bin/backupcleaner
CHANGED
data/solr/solr/bin/commit
CHANGED
@@ -103,7 +103,7 @@ fi
|
|
103
103
|
|
104
104
|
fixUser "$@"
|
105
105
|
|
106
|
-
|
106
|
+
setStartTime
|
107
107
|
|
108
108
|
logMessage started by $oldwhoami
|
109
109
|
logMessage command: $0 $@
|
@@ -116,13 +116,18 @@ then
|
|
116
116
|
logExit failed 1
|
117
117
|
fi
|
118
118
|
|
119
|
-
# check status of commit request
|
119
|
+
# check status of commit request - original format
|
120
120
|
echo $rs | grep '<result.*status="0"' > /dev/null 2>&1
|
121
121
|
if [[ $? != 0 ]]
|
122
122
|
then
|
123
|
-
|
124
|
-
|
125
|
-
|
123
|
+
# check status of commit request - new format
|
124
|
+
echo $rs | grep '<lst name="responseHeader"><int name="status">0</int>' > /dev/null 2>&1
|
125
|
+
if [[ $? != 0 ]]
|
126
|
+
then
|
127
|
+
logMessage commit request to Solr at ${curl_url} failed:
|
128
|
+
logMessage $rs
|
129
|
+
logExit failed 2
|
130
|
+
fi
|
126
131
|
fi
|
127
132
|
|
128
133
|
logExit ended 0
|
data/solr/solr/bin/optimize
CHANGED
@@ -104,7 +104,7 @@ fi
|
|
104
104
|
|
105
105
|
fixUser "$@"
|
106
106
|
|
107
|
-
|
107
|
+
setStartTime
|
108
108
|
|
109
109
|
logMessage started by $oldwhoami
|
110
110
|
logMessage command: $0 $@
|
@@ -117,13 +117,18 @@ then
|
|
117
117
|
logExit failed 1
|
118
118
|
fi
|
119
119
|
|
120
|
-
# check status of optimize request
|
120
|
+
# check status of optimize request - original format
|
121
121
|
rc=`echo $rs|cut -f2 -d'"'`
|
122
122
|
if [[ $? != 0 ]]
|
123
123
|
then
|
124
|
-
|
125
|
-
|
126
|
-
|
124
|
+
# check status of optimize request - new format
|
125
|
+
echo $rs | grep '<lst name="responseHeader"><int name="status">0</int>' > /dev/null 2>&1
|
126
|
+
if [[ $? != 0 ]]
|
127
|
+
then
|
128
|
+
logMessage optimize request to Solr at ${curl_url} failed:
|
129
|
+
logMessage $rs
|
130
|
+
logExit failed 2
|
131
|
+
fi
|
127
132
|
fi
|
128
133
|
|
129
134
|
logExit ended 0
|
data/solr/solr/bin/readercycle
CHANGED
data/solr/solr/bin/rsyncd-enable
CHANGED
data/solr/solr/bin/rsyncd-start
CHANGED
data/solr/solr/bin/scripts-util
CHANGED
@@ -21,6 +21,7 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
|
|
21
21
|
|
22
22
|
# set up variables
|
23
23
|
prog=${0##*/}
|
24
|
+
OS=`uname`
|
24
25
|
|
25
26
|
# source the config file if present
|
26
27
|
confFile=${solr_root}/conf/scripts.conf
|
@@ -48,7 +49,17 @@ function fixUser
|
|
48
49
|
|
49
50
|
if [[ "${oldwhoami}" == "" ]]
|
50
51
|
then
|
51
|
-
oldwhoami=`ps h -Hfp $(pgrep -g0 $
|
52
|
+
oldwhoami=`ps h -Hfp $(pgrep -f -g0 $0) | tail -1|cut -f1 -d" "`
|
53
|
+
fi
|
54
|
+
}
|
55
|
+
|
56
|
+
function setStartTime
|
57
|
+
{
|
58
|
+
if [[ "${OS}" == "SunOS" ]]
|
59
|
+
then
|
60
|
+
start=`perl -e "print time;"`
|
61
|
+
else
|
62
|
+
start=`date +"%s"`
|
52
63
|
fi
|
53
64
|
}
|
54
65
|
|
@@ -68,7 +79,12 @@ function logMessage
|
|
68
79
|
|
69
80
|
function logExit
|
70
81
|
{
|
71
|
-
|
82
|
+
if [[ "${OS}" == "SunOS" ]]
|
83
|
+
then
|
84
|
+
end=`perl -e "print time;"`
|
85
|
+
else
|
86
|
+
end=`date +"%s"`
|
87
|
+
fi
|
72
88
|
diff=`expr $end - $start`
|
73
89
|
echo "$(timeStamp) $1 (elapsed time: $diff sec)">>$log
|
74
90
|
exit $2
|
data/solr/solr/bin/snapcleaner
CHANGED
@@ -91,7 +91,13 @@ fi
|
|
91
91
|
|
92
92
|
function remove
|
93
93
|
{
|
94
|
-
|
94
|
+
if [[ "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
95
|
+
then
|
96
|
+
syncing=`ps -www -U ${user} |grep -w rsync|grep -v grep|grep -w $1`
|
97
|
+
else
|
98
|
+
syncing=`ps -fwwwu ${user}|grep -w rsync|grep -v grep|grep -w $1`
|
99
|
+
fi
|
100
|
+
|
95
101
|
if [[ -n $syncing ]]
|
96
102
|
then
|
97
103
|
logMessage $1 not removed - rsync in progress
|
@@ -101,7 +107,7 @@ function remove
|
|
101
107
|
fi
|
102
108
|
}
|
103
109
|
|
104
|
-
|
110
|
+
setStartTime
|
105
111
|
|
106
112
|
logMessage started by $oldwhoami
|
107
113
|
logMessage command: $0 $@
|
data/solr/solr/bin/snapinstaller
CHANGED
@@ -104,7 +104,7 @@ then
|
|
104
104
|
master_status_dir=${solr_root}/${master_status_dir}
|
105
105
|
fi
|
106
106
|
|
107
|
-
|
107
|
+
setStartTime
|
108
108
|
|
109
109
|
logMessage started by $oldwhoami
|
110
110
|
logMessage command: $0 $@
|
@@ -141,9 +141,20 @@ fi
|
|
141
141
|
# install using hard links into temporary directory
|
142
142
|
# remove original index and then atomically copy new one into place
|
143
143
|
logMessage installing snapshot ${name}
|
144
|
-
|
145
|
-
|
146
|
-
|
144
|
+
if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
145
|
+
then
|
146
|
+
orig_dir=$(pwd)
|
147
|
+
mkdir ${data_dir}/index.tmp$$ && \
|
148
|
+
cd ${name} && \
|
149
|
+
find . -print|cpio -pdlmu ${data_dir}/index.tmp$$ 1>/dev/null 2>&1 && \
|
150
|
+
/bin/rm -rf ${data_dir}/index && \
|
151
|
+
mv -f ${data_dir}/index.tmp$$ ${data_dir}/index
|
152
|
+
cd ${orig_dir}
|
153
|
+
else
|
154
|
+
cp -lr ${name}/ ${data_dir}/index.tmp$$ && \
|
155
|
+
/bin/rm -rf ${data_dir}/index && \
|
156
|
+
mv -f ${data_dir}/index.tmp$$ ${data_dir}/index
|
157
|
+
fi
|
147
158
|
|
148
159
|
# update distribution stats
|
149
160
|
echo ${name} > ${solr_root}/logs/snapshot.current
|
data/solr/solr/bin/snappuller
CHANGED
@@ -156,7 +156,7 @@ function pushStatus
|
|
156
156
|
scp -q -o StrictHostKeyChecking=no ${solr_root}/logs/snappuller.status ${master_host}:${master_status_dir}/snapshot.status.`uname -n`
|
157
157
|
}
|
158
158
|
|
159
|
-
|
159
|
+
setStartTime
|
160
160
|
|
161
161
|
logMessage started by $oldwhoami
|
162
162
|
logMessage command: $0 $@
|
@@ -164,7 +164,7 @@ logMessage command: $0 $@
|
|
164
164
|
if [[ ! -f ${solr_root}/logs/snappuller-enabled ]]
|
165
165
|
then
|
166
166
|
logMessage snappuller disabled
|
167
|
-
exit
|
167
|
+
exit 2
|
168
168
|
fi
|
169
169
|
|
170
170
|
# make sure we can ssh to master
|
@@ -200,7 +200,16 @@ fi
|
|
200
200
|
# take a snapshot of current index so that only modified files will be rsync-ed
|
201
201
|
# put the snapshot in the 'work-in-progress" directory to prevent it from
|
202
202
|
# being installed while the copying is still in progress
|
203
|
-
|
203
|
+
if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
204
|
+
then
|
205
|
+
orig_dir=$(pwd)
|
206
|
+
mkdir ${data_dir}/${name}-wip
|
207
|
+
cd ${data_dir}/index
|
208
|
+
find . -print|cpio -pdlmu ${data_dir}/${name}-wip 1>/dev/null 2>&1
|
209
|
+
cd ${orig_dir}
|
210
|
+
else
|
211
|
+
cp -lr ${data_dir}/index ${data_dir}/${name}-wip
|
212
|
+
fi
|
204
213
|
# force rsync of segments and .del files since we are doing size-only
|
205
214
|
if [[ -n ${sizeonly} ]]
|
206
215
|
then
|
@@ -214,9 +223,15 @@ logMessage pulling snapshot ${name}
|
|
214
223
|
ssh -o StrictHostKeyChecking=no ${master_host} mkdir -p ${master_status_dir}
|
215
224
|
|
216
225
|
# start new distribution stats
|
217
|
-
rsyncStart=`date`
|
226
|
+
rsyncStart=`date +'%Y-%m-%d %H:%M:%S'`
|
227
|
+
if [[ "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
228
|
+
then
|
229
|
+
startTimestamp=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncStart" +'%Y%m%d-%H%M%S'`
|
230
|
+
rsyncStartSec=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncStart" +'%s'`
|
231
|
+
else
|
218
232
|
startTimestamp=`date -d "$rsyncStart" +'%Y%m%d-%H%M%S'`
|
219
233
|
rsyncStartSec=`date -d "$rsyncStart" +'%s'`
|
234
|
+
fi
|
220
235
|
startStatus="rsync of `basename ${name}` started:$startTimestamp"
|
221
236
|
echo ${startStatus} > ${solr_root}/logs/snappuller.status
|
222
237
|
pushStatus
|
@@ -226,9 +241,15 @@ rsync -Wa${verbose}${compress} --delete ${sizeonly} \
|
|
226
241
|
${stats} rsync://${master_host}:${rsyncd_port}/solr/${name}/ ${data_dir}/${name}-wip
|
227
242
|
|
228
243
|
rc=$?
|
229
|
-
rsyncEnd=`date`
|
244
|
+
rsyncEnd=`date +'%Y-%m-%d %H:%M:%S'`
|
245
|
+
if [[ "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
246
|
+
then
|
247
|
+
endTimestamp=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncEnd" +'%Y%m%d-%H%M%S'`
|
248
|
+
rsyncEndSec=`date -j -f '%Y-%m-%d %H:%M:%S' "$rsyncEnd" +'%s'`
|
249
|
+
else
|
230
250
|
endTimestamp=`date -d "$rsyncEnd" +'%Y%m%d-%H%M%S'`
|
231
251
|
rsyncEndSec=`date -d "$rsyncEnd" +'%s'`
|
252
|
+
fi
|
232
253
|
elapsed=`expr $rsyncEndSec - $rsyncStartSec`
|
233
254
|
if [[ $rc != 0 ]]
|
234
255
|
then
|
data/solr/solr/bin/snapshooter
CHANGED
@@ -36,10 +36,11 @@ usage: $prog [-d dir] [-u username] [-v]
|
|
36
36
|
-u specify user to sudo to before running script
|
37
37
|
-v increase verbosity
|
38
38
|
-V output debugging info
|
39
|
+
-c only take snapshot if different than previous
|
39
40
|
"
|
40
41
|
|
41
42
|
# parse args
|
42
|
-
while getopts d:u:
|
43
|
+
while getopts d:u:vVc OPTION
|
43
44
|
do
|
44
45
|
case $OPTION in
|
45
46
|
d)
|
@@ -54,6 +55,9 @@ do
|
|
54
55
|
V)
|
55
56
|
debug="V"
|
56
57
|
;;
|
58
|
+
c)
|
59
|
+
check=1
|
60
|
+
;;
|
57
61
|
*)
|
58
62
|
echo "$USAGE"
|
59
63
|
exit 1
|
@@ -74,7 +78,7 @@ then
|
|
74
78
|
data_dir=${solr_root}/${data_dir}
|
75
79
|
fi
|
76
80
|
|
77
|
-
|
81
|
+
setStartTime
|
78
82
|
|
79
83
|
logMessage started by $oldwhoami
|
80
84
|
logMessage command: $0 $@
|
@@ -95,6 +99,20 @@ then
|
|
95
99
|
logExit aborted 1
|
96
100
|
fi
|
97
101
|
|
102
|
+
if [[ ${check} ]]
|
103
|
+
then
|
104
|
+
previous=`find ${data_dir} -name snapshot.\* | sort -r | head -1`
|
105
|
+
if [[ -d ${previous} ]]
|
106
|
+
then
|
107
|
+
differences=`diff -q ${data_dir}/index ${previous} | wc -l`
|
108
|
+
if [[ ${differences} -lt 1 ]]
|
109
|
+
then
|
110
|
+
logMessage Snap would be same as last, exiting
|
111
|
+
logExit aborted 1
|
112
|
+
fi
|
113
|
+
fi
|
114
|
+
fi
|
115
|
+
|
98
116
|
# clean up after INT/TERM
|
99
117
|
trap 'echo cleaning up, please wait ...;/bin/rm -rf ${name} ${temp};logExit aborted 13' INT TERM
|
100
118
|
|
@@ -102,7 +120,16 @@ logMessage taking snapshot ${name}
|
|
102
120
|
|
103
121
|
# take a snapshot using hard links into temporary location
|
104
122
|
# then move it into place atomically
|
105
|
-
|
123
|
+
if [[ "${OS}" == "SunOS" || "${OS}" == "Darwin" || "${OS}" == "FreeBSD" ]]
|
124
|
+
then
|
125
|
+
orig_dir=$(pwd)
|
126
|
+
mkdir ${temp}
|
127
|
+
cd ${data_dir}/index
|
128
|
+
find . -print|cpio -pdlmu ${temp} 1>/dev/null 2>&1
|
129
|
+
cd ${orig_dir}
|
130
|
+
else
|
131
|
+
cp -lr ${data_dir}/index ${temp}
|
132
|
+
fi
|
106
133
|
mv ${temp} ${name}
|
107
134
|
|
108
135
|
logExit ended 0
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
|
19
|
+
<!-- If this file is found in the config directory, it will only be
|
20
|
+
loaded once at startup. If it is found in Solr's data
|
21
|
+
directory, it will be re-loaded every commit.
|
22
|
+
-->
|
23
|
+
|
24
|
+
<elevate>
|
25
|
+
<query text="foo bar">
|
26
|
+
<doc id="1" />
|
27
|
+
<doc id="2" />
|
28
|
+
<doc id="3" />
|
29
|
+
</query>
|
30
|
+
|
31
|
+
<query text="ipod">
|
32
|
+
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
|
33
|
+
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
|
34
|
+
</query>
|
35
|
+
|
36
|
+
</elevate>
|
File without changes
|
data/solr/solr/conf/schema.xml
CHANGED
File without changes
|
data/solr/solr/conf/scripts.conf
CHANGED
File without changes
|
@@ -29,34 +29,105 @@
|
|
29
29
|
<!-- Used to specify an alternate directory to hold all index data
|
30
30
|
other than the default ./data under the Solr home.
|
31
31
|
If replication is in use, this should match the replication configuration. -->
|
32
|
-
|
33
32
|
<dataDir>${solr.data.dir:./solr/data}</dataDir>
|
34
33
|
|
34
|
+
|
35
35
|
<indexDefaults>
|
36
36
|
<!-- Values here affect all index writers and act as a default unless overridden. -->
|
37
37
|
<useCompoundFile>false</useCompoundFile>
|
38
|
+
|
38
39
|
<mergeFactor>10</mergeFactor>
|
39
|
-
|
40
|
+
<!--
|
41
|
+
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
|
42
|
+
|
43
|
+
-->
|
44
|
+
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
45
|
+
<!-- Tell Lucene when to flush documents to disk.
|
46
|
+
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
|
47
|
+
|
48
|
+
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
|
49
|
+
|
50
|
+
-->
|
51
|
+
<ramBufferSizeMB>32</ramBufferSizeMB>
|
40
52
|
<maxMergeDocs>2147483647</maxMergeDocs>
|
41
53
|
<maxFieldLength>10000</maxFieldLength>
|
42
54
|
<writeLockTimeout>1000</writeLockTimeout>
|
43
55
|
<commitLockTimeout>10000</commitLockTimeout>
|
56
|
+
|
57
|
+
<!--
|
58
|
+
Expert: Turn on Lucene's auto commit capability.
|
59
|
+
This causes intermediate segment flushes to write a new lucene
|
60
|
+
index descriptor, enabling it to be opened by an external
|
61
|
+
IndexReader.
|
62
|
+
NOTE: Despite the name, this value does not have any relation to Solr's autoCommit functionality
|
63
|
+
-->
|
64
|
+
<!--<luceneAutoCommit>false</luceneAutoCommit>-->
|
65
|
+
<!--
|
66
|
+
Expert:
|
67
|
+
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
|
68
|
+
versions used LogDocMergePolicy.
|
69
|
+
|
70
|
+
LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
|
71
|
+
to merge based on number of documents
|
72
|
+
|
73
|
+
Other implementations of MergePolicy must have a no-argument constructor
|
74
|
+
-->
|
75
|
+
<!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
|
76
|
+
|
77
|
+
<!--
|
78
|
+
Expert:
|
79
|
+
The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
|
80
|
+
can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
|
81
|
+
-->
|
82
|
+
<!--<mergeScheduler>org.apache.lucene.index.ConcurrentMergeScheduler</mergeScheduler>-->
|
83
|
+
|
84
|
+
<!--
|
85
|
+
This option specifies which Lucene LockFactory implementation to use.
|
86
|
+
|
87
|
+
single = SingleInstanceLockFactory - suggested for a read-only index
|
88
|
+
or when there is no possibility of another process trying
|
89
|
+
to modify the index.
|
90
|
+
native = NativeFSLockFactory
|
91
|
+
simple = SimpleFSLockFactory
|
92
|
+
|
93
|
+
(For backwards compatibility with Solr 1.2, 'simple' is the default
|
94
|
+
if not specified.)
|
95
|
+
-->
|
96
|
+
<lockType>single</lockType>
|
44
97
|
</indexDefaults>
|
45
98
|
|
46
99
|
<mainIndex>
|
47
100
|
<!-- options specific to the main on-disk lucene index -->
|
48
101
|
<useCompoundFile>false</useCompoundFile>
|
102
|
+
<ramBufferSizeMB>32</ramBufferSizeMB>
|
49
103
|
<mergeFactor>10</mergeFactor>
|
50
|
-
|
104
|
+
<!-- Deprecated -->
|
105
|
+
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
51
106
|
<maxMergeDocs>2147483647</maxMergeDocs>
|
52
107
|
<maxFieldLength>10000</maxFieldLength>
|
53
108
|
|
54
109
|
<!-- If true, unlock any held write or commit locks on startup.
|
55
110
|
This defeats the locking mechanism that allows multiple
|
56
111
|
processes to safely access a lucene index, and should be
|
57
|
-
used with care.
|
112
|
+
used with care.
|
113
|
+
This is not needed if lock type is 'none' or 'single'
|
114
|
+
-->
|
58
115
|
<unlockOnStartup>false</unlockOnStartup>
|
59
116
|
</mainIndex>
|
117
|
+
|
118
|
+
<!-- Enables JMX if and only if an existing MBeanServer is found, use
|
119
|
+
this if you want to configure JMX through JVM parameters. Remove
|
120
|
+
this to disable exposing Solr configuration and statistics to JMX.
|
121
|
+
|
122
|
+
If you want to connect to a particular server, specify the agentId
|
123
|
+
e.g. <jmx agentId="myAgent" />
|
124
|
+
|
125
|
+
If you want to start a new MBeanServer, specify the serviceUrl
|
126
|
+
e.g <jmx serviceurl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
|
127
|
+
|
128
|
+
For more details see http://wiki.apache.org/solr/SolrJmx
|
129
|
+
-->
|
130
|
+
<jmx />
|
60
131
|
|
61
132
|
<!-- the default high-performance update handler -->
|
62
133
|
<updateHandler class="solr.DirectUpdateHandler2">
|
@@ -66,10 +137,12 @@
|
|
66
137
|
org.apache.solr.(search|update|request|core|analysis)
|
67
138
|
-->
|
68
139
|
|
69
|
-
<!--
|
140
|
+
<!-- Perform a <commit/> automatically under certain conditions:
|
141
|
+
maxDocs - number of updates since last commit is greater than this
|
142
|
+
maxTime - oldest uncommited update (in ms) is this long ago
|
70
143
|
<autoCommit>
|
71
144
|
<maxDocs>10000</maxDocs>
|
72
|
-
<maxTime>1000</maxTime>
|
145
|
+
<maxTime>1000</maxTime>
|
73
146
|
</autoCommit>
|
74
147
|
-->
|
75
148
|
|
@@ -82,8 +155,8 @@
|
|
82
155
|
-->
|
83
156
|
<!-- A postCommit event is fired after every commit or optimize command
|
84
157
|
<listener event="postCommit" class="solr.RunExecutableListener">
|
85
|
-
<str name="exe">snapshooter</str>
|
86
|
-
<str name="dir"
|
158
|
+
<str name="exe">solr/bin/snapshooter</str>
|
159
|
+
<str name="dir">.</str>
|
87
160
|
<bool name="wait">true</bool>
|
88
161
|
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
89
162
|
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
@@ -126,7 +199,7 @@
|
|
126
199
|
class="solr.LRUCache"
|
127
200
|
size="512"
|
128
201
|
initialSize="512"
|
129
|
-
autowarmCount="
|
202
|
+
autowarmCount="128"/>
|
130
203
|
|
131
204
|
<!-- queryResultCache caches results of searches - ordered lists of
|
132
205
|
document ids (DocList) based on a query, a sort, and the range
|
@@ -135,7 +208,7 @@
|
|
135
208
|
class="solr.LRUCache"
|
136
209
|
size="512"
|
137
210
|
initialSize="512"
|
138
|
-
autowarmCount="
|
211
|
+
autowarmCount="32"/>
|
139
212
|
|
140
213
|
<!-- documentCache caches Lucene Document objects (the stored fields for each document).
|
141
214
|
Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
|
@@ -180,9 +253,13 @@
|
|
180
253
|
is requested, a superset of the requested number of document ids
|
181
254
|
are collected. For example, if a search for a particular query
|
182
255
|
requests matching documents 10 through 19, and queryWindowSize is 50,
|
183
|
-
then documents 0 through
|
256
|
+
then documents 0 through 49 will be collected and cached. Any further
|
184
257
|
requests in that range can be satisfied via the cache. -->
|
185
|
-
<queryResultWindowSize>
|
258
|
+
<queryResultWindowSize>50</queryResultWindowSize>
|
259
|
+
|
260
|
+
<!-- Maximum number of documents to cache for any entry in the
|
261
|
+
queryResultCache. -->
|
262
|
+
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
186
263
|
|
187
264
|
<!-- This entry enables an int hash representation for filters (DocSets)
|
188
265
|
when the number of items in the set is less than maxSize. For smaller
|
@@ -190,36 +267,27 @@
|
|
190
267
|
iterate over, and faster to take intersections. -->
|
191
268
|
<HashDocSet maxSize="3000" loadFactor="0.75"/>
|
192
269
|
|
193
|
-
|
194
|
-
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
|
195
|
-
into cached filters if the number of docs selected by the clause exceeds
|
196
|
-
the threshold (represented as a fraction of the total index) -->
|
197
|
-
<boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>
|
198
|
-
|
199
|
-
|
200
270
|
<!-- a newSearcher event is fired whenever a new searcher is being prepared
|
201
271
|
and there is a current searcher handling requests (aka registered). -->
|
202
272
|
<!-- QuerySenderListener takes an array of NamedList and executes a
|
203
273
|
local query request for each NamedList in sequence. -->
|
204
|
-
<!--
|
205
274
|
<listener event="newSearcher" class="solr.QuerySenderListener">
|
206
275
|
<arr name="queries">
|
207
276
|
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
208
277
|
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
278
|
+
<lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
|
209
279
|
</arr>
|
210
280
|
</listener>
|
211
|
-
-->
|
212
281
|
|
213
282
|
<!-- a firstSearcher event is fired whenever a new searcher is being
|
214
283
|
prepared but there is no current registered searcher to handle
|
215
284
|
requests or to gain autowarming data from. -->
|
216
|
-
<!--
|
217
285
|
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
218
286
|
<arr name="queries">
|
219
287
|
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
288
|
+
<lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
|
220
289
|
</arr>
|
221
290
|
</listener>
|
222
|
-
-->
|
223
291
|
|
224
292
|
<!-- If a search request comes in and there is no current registered searcher,
|
225
293
|
then immediately register the still warming searcher and use it. If
|
@@ -230,7 +298,7 @@
|
|
230
298
|
<!-- Maximum number of searchers that may be warming in the background
|
231
299
|
concurrently. An error is returned if this limit is exceeded. Recommend
|
232
300
|
1-2 for read-only slaves, higher for masters w/o cache warming. -->
|
233
|
-
<maxWarmingSearchers>
|
301
|
+
<maxWarmingSearchers>2</maxWarmingSearchers>
|
234
302
|
|
235
303
|
</query>
|
236
304
|
|
@@ -242,20 +310,57 @@
|
|
242
310
|
<requestDispatcher handleSelect="true" >
|
243
311
|
<!--Make sure your system has some authentication before enabling remote streaming! -->
|
244
312
|
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
|
313
|
+
|
314
|
+
<!-- Set HTTP caching related parameters (for proxy caches and clients).
|
315
|
+
|
316
|
+
To get the behaviour of Solr 1.2 (ie: no caching related headers)
|
317
|
+
use the never304="true" option and do not specify a value for
|
318
|
+
<cacheControl>
|
319
|
+
-->
|
320
|
+
<!-- <httpCaching never304="true"> -->
|
321
|
+
<httpCaching lastModifiedFrom="openTime"
|
322
|
+
etagSeed="Solr">
|
323
|
+
<!-- lastModFrom="openTime" is the default, the Last-Modified value
|
324
|
+
(and validation against If-Modified-Since requests) will all be
|
325
|
+
relative to when the current Searcher was opened.
|
326
|
+
You can change it to lastModFrom="dirLastMod" if you want the
|
327
|
+
value to exactly corrispond to when the physical index was last
|
328
|
+
modified.
|
329
|
+
|
330
|
+
etagSeed="..." is an option you can change to force the ETag
|
331
|
+
header (and validation against If-None-Match requests) to be
|
332
|
+
differnet even if the index has not changed (ie: when making
|
333
|
+
significant changes to your config file)
|
334
|
+
|
335
|
+
lastModifiedFrom and etagSeed are both ignored if you use the
|
336
|
+
never304="true" option.
|
337
|
+
-->
|
338
|
+
<!-- If you include a <cacheControl> directive, it will be used to
|
339
|
+
generate a Cache-Control header, as well as an Expires header
|
340
|
+
if the value contains "max-age="
|
341
|
+
|
342
|
+
By default, no Cache-Control header is generated.
|
343
|
+
|
344
|
+
You can use the <cacheControl> option even if you have set
|
345
|
+
never304="true"
|
346
|
+
-->
|
347
|
+
<!-- <cacheControl>max-age=30, public</cacheControl> -->
|
348
|
+
</httpCaching>
|
245
349
|
</requestDispatcher>
|
246
350
|
|
247
351
|
|
248
352
|
<!-- requestHandler plugins... incoming queries will be dispatched to the
|
249
|
-
correct handler based on the qt (query type) param
|
250
|
-
|
251
|
-
|
252
|
-
|
353
|
+
correct handler based on the path or the qt (query type) param.
|
354
|
+
Names starting with a '/' are accessed with the a path equal to the
|
355
|
+
registered name. Names without a leading '/' are accessed with:
|
356
|
+
http://host/app/select?qt=name
|
357
|
+
If no qt is defined, the requestHandler that declares default="true"
|
358
|
+
will be used.
|
253
359
|
-->
|
254
|
-
<requestHandler name="standard" class="solr.
|
360
|
+
<requestHandler name="standard" class="solr.SearchHandler" default="true">
|
255
361
|
<!-- default values for query parameters -->
|
256
362
|
<lst name="defaults">
|
257
363
|
<str name="echoParams">explicit</str>
|
258
|
-
<str name="json.nl">map</str>
|
259
364
|
<!--
|
260
365
|
<int name="rows">10</int>
|
261
366
|
<str name="fl">*</str>
|
@@ -264,12 +369,16 @@
|
|
264
369
|
</lst>
|
265
370
|
</requestHandler>
|
266
371
|
|
372
|
+
|
267
373
|
<!-- DisMaxRequestHandler allows easy searching across multiple fields
|
268
|
-
for simple user-entered phrases.
|
374
|
+
for simple user-entered phrases. It's implementation is now
|
375
|
+
just the standard SearchHandler with a default query type
|
376
|
+
of "dismax".
|
269
377
|
see http://wiki.apache.org/solr/DisMaxRequestHandler
|
270
378
|
-->
|
271
|
-
<requestHandler name="dismax" class="solr.
|
379
|
+
<requestHandler name="dismax" class="solr.SearchHandler" >
|
272
380
|
<lst name="defaults">
|
381
|
+
<str name="defType">dismax</str>
|
273
382
|
<str name="echoParams">explicit</str>
|
274
383
|
<float name="tie">0.01</float>
|
275
384
|
<str name="qf">
|
@@ -279,7 +388,7 @@
|
|
279
388
|
text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
|
280
389
|
</str>
|
281
390
|
<str name="bf">
|
282
|
-
ord(
|
391
|
+
ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
|
283
392
|
</str>
|
284
393
|
<str name="fl">
|
285
394
|
id,name,price,score
|
@@ -289,14 +398,23 @@
|
|
289
398
|
</str>
|
290
399
|
<int name="ps">100</int>
|
291
400
|
<str name="q.alt">*:*</str>
|
401
|
+
<!-- example highlighter config, enable per-query with hl=true -->
|
402
|
+
<str name="hl.fl">text features name</str>
|
403
|
+
<!-- for this field, we want no fragmenting, just highlighting -->
|
404
|
+
<str name="f.name.hl.fragsize">0</str>
|
405
|
+
<!-- instructs Solr to return the field itself if no query terms are
|
406
|
+
found -->
|
407
|
+
<str name="f.name.hl.alternateField">name</str>
|
408
|
+
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
|
292
409
|
</lst>
|
293
410
|
</requestHandler>
|
294
411
|
|
295
412
|
<!-- Note how you can register the same handler multiple times with
|
296
413
|
different names (and different init parameters)
|
297
414
|
-->
|
298
|
-
<requestHandler name="partitioned" class="solr.
|
415
|
+
<requestHandler name="partitioned" class="solr.SearchHandler" >
|
299
416
|
<lst name="defaults">
|
417
|
+
<str name="defType">dismax</str>
|
300
418
|
<str name="echoParams">explicit</str>
|
301
419
|
<str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
|
302
420
|
<str name="mm">2<-1 5<-2 6<90%</str>
|
@@ -345,49 +463,103 @@
|
|
345
463
|
</lst>
|
346
464
|
</requestHandler>
|
347
465
|
|
348
|
-
<requestHandler name="instock" class="solr.DisMaxRequestHandler" >
|
349
|
-
<!-- for legacy reasons, DisMaxRequestHandler will assume all init
|
350
|
-
params are "defaults" if you don't explicitly specify any defaults.
|
351
|
-
-->
|
352
|
-
<str name="fq">
|
353
|
-
inStock:true
|
354
|
-
</str>
|
355
|
-
<str name="qf">
|
356
|
-
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
357
|
-
</str>
|
358
|
-
<str name="mm">
|
359
|
-
2<-1 5<-2 6<90%
|
360
|
-
</str>
|
361
|
-
</requestHandler>
|
362
|
-
|
363
466
|
|
364
|
-
<!--
|
365
|
-
|
366
|
-
|
367
|
-
|
467
|
+
<!--
|
468
|
+
Search components are registered to SolrCore and used by Search Handlers
|
469
|
+
|
470
|
+
By default, the following components are avaliable:
|
471
|
+
|
472
|
+
<searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
|
473
|
+
<searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
|
474
|
+
<searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
|
475
|
+
<searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
|
476
|
+
<searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
|
477
|
+
|
478
|
+
Default configuration in a requestHandler would look like:
|
479
|
+
<arr name="components">
|
480
|
+
<str>query</str>
|
481
|
+
<str>facet</str>
|
482
|
+
<str>mlt</str>
|
483
|
+
<str>highlight</str>
|
484
|
+
<str>debug</str>
|
485
|
+
</arr>
|
486
|
+
|
487
|
+
If you register a searchComponent to one of the standard names, that will be used instead.
|
488
|
+
To insert handlers before or after the 'standard' components, use:
|
489
|
+
|
490
|
+
<arr name="first-components">
|
491
|
+
<str>myFirstComponentName</str>
|
492
|
+
</arr>
|
493
|
+
|
494
|
+
<arr name="last-components">
|
495
|
+
<str>myLastComponentName</str>
|
496
|
+
</arr>
|
368
497
|
-->
|
369
|
-
<requestHandler name="spellchecker" class="solr.SpellCheckerRequestHandler" startup="lazy">
|
370
|
-
<!-- default values for query parameters -->
|
371
|
-
<lst name="defaults">
|
372
|
-
<int name="suggestionCount">1</int>
|
373
|
-
<float name="accuracy">0.5</float>
|
374
|
-
</lst>
|
375
|
-
|
376
|
-
<!-- Main init params for handler -->
|
377
|
-
|
378
|
-
<!-- The directory where your SpellChecker Index should live. -->
|
379
|
-
<!-- May be absolute, or relative to the Solr "dataDir" directory. -->
|
380
|
-
<!-- If this option is not specified, a RAM directory will be used -->
|
381
|
-
<str name="spellcheckerIndexDir">spell</str>
|
382
|
-
|
383
|
-
<!-- the field in your schema that you want to be able to build -->
|
384
|
-
<!-- your spell index on. This should be a field that uses a very -->
|
385
|
-
<!-- simple FieldType without a lot of Analysis (ie: string) -->
|
386
|
-
<str name="termSourceField">word</str>
|
387
|
-
|
388
|
-
</requestHandler>
|
389
498
|
|
499
|
+
<!-- The spell check component can return a list of alternative spelling
|
500
|
+
suggestions. -->
|
501
|
+
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
502
|
+
|
503
|
+
<str name="queryAnalyzerFieldType">textSpell</str>
|
504
|
+
|
505
|
+
<lst name="spellchecker">
|
506
|
+
<str name="name">default</str>
|
507
|
+
<str name="field">spell</str>
|
508
|
+
<str name="spellcheckIndexDir">./spellchecker1</str>
|
509
|
+
|
510
|
+
</lst>
|
511
|
+
<lst name="spellchecker">
|
512
|
+
<str name="name">jarowinkler</str>
|
513
|
+
<str name="field">spell</str>
|
514
|
+
<!-- Use a different Distance Measure -->
|
515
|
+
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
|
516
|
+
<str name="spellcheckIndexDir">./spellchecker2</str>
|
517
|
+
|
518
|
+
</lst>
|
519
|
+
|
520
|
+
<lst name="spellchecker">
|
521
|
+
<str name="classname">solr.FileBasedSpellChecker</str>
|
522
|
+
<str name="name">file</str>
|
523
|
+
<str name="sourceLocation">spellings.txt</str>
|
524
|
+
<str name="characterEncoding">UTF-8</str>
|
525
|
+
<str name="spellcheckIndexDir">./spellcheckerFile</str>
|
526
|
+
</lst>
|
527
|
+
</searchComponent>
|
528
|
+
|
529
|
+
<!-- a request handler utilizing the spellcheck component -->
|
530
|
+
<requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
|
531
|
+
<lst name="defaults">
|
532
|
+
<!-- omp = Only More Popular -->
|
533
|
+
<str name="spellcheck.onlyMorePopular">false</str>
|
534
|
+
<!-- exr = Extended Results -->
|
535
|
+
<str name="spellcheck.extendedResults">false</str>
|
536
|
+
<!-- The number of suggestions to return -->
|
537
|
+
<str name="spellcheck.count">1</str>
|
538
|
+
</lst>
|
539
|
+
<arr name="last-components">
|
540
|
+
<str>spellcheck</str>
|
541
|
+
</arr>
|
542
|
+
</requestHandler>
|
543
|
+
|
544
|
+
<!-- a search component that enables you to configure the top results for
|
545
|
+
a given query regardless of the normal lucene scoring.-->
|
546
|
+
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
|
547
|
+
<!-- pick a fieldType to analyze queries -->
|
548
|
+
<str name="queryFieldType">string</str>
|
549
|
+
<str name="config-file">elevate.xml</str>
|
550
|
+
</searchComponent>
|
551
|
+
|
552
|
+
<!-- a request handler utilizing the elevator component -->
|
553
|
+
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
554
|
+
<lst name="defaults">
|
555
|
+
<str name="echoParams">explicit</str>
|
556
|
+
</lst>
|
557
|
+
<arr name="last-components">
|
558
|
+
<str>elevator</str>
|
559
|
+
</arr>
|
560
|
+
</requestHandler>
|
390
561
|
|
562
|
+
|
391
563
|
<!-- Update request handler.
|
392
564
|
|
393
565
|
Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
|
@@ -398,17 +570,47 @@
|
|
398
570
|
-->
|
399
571
|
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
|
400
572
|
|
573
|
+
<!--
|
574
|
+
Analysis request handler. Since Solr 1.3. Use to returnhow a document is analyzed. Useful
|
575
|
+
for debugging and as a token server for other types of applications
|
576
|
+
-->
|
577
|
+
<requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
|
578
|
+
|
579
|
+
|
401
580
|
<!-- CSV update handler, loaded on demand -->
|
402
581
|
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
|
403
582
|
|
404
583
|
|
405
|
-
<!--
|
584
|
+
<!--
|
585
|
+
Admin Handlers - This will register all the standard admin RequestHandlers. Adding
|
586
|
+
this single handler is equivolent to registering:
|
587
|
+
|
406
588
|
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
407
589
|
<requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
|
408
590
|
<requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
|
409
591
|
<requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
|
410
592
|
<requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
|
593
|
+
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
411
594
|
|
595
|
+
If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
|
596
|
+
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
597
|
+
<lst name="invariants">
|
598
|
+
<str name="hidden">synonyms.txt</str>
|
599
|
+
<str name="hidden">anotherfile.txt</str>
|
600
|
+
</lst>
|
601
|
+
</requestHandler>
|
602
|
+
-->
|
603
|
+
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
604
|
+
|
605
|
+
<!-- ping/healthcheck -->
|
606
|
+
<requestHandler name="/admin/ping" class="PingRequestHandler">
|
607
|
+
<lst name="defaults">
|
608
|
+
<str name="qt">standard</str>
|
609
|
+
<str name="q">solrpingquery</str>
|
610
|
+
<str name="echoParams">all</str>
|
611
|
+
</lst>
|
612
|
+
</requestHandler>
|
613
|
+
|
412
614
|
<!-- Echo the request contents back to the client -->
|
413
615
|
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
414
616
|
<lst name="defaults">
|
@@ -417,17 +619,50 @@
|
|
417
619
|
</lst>
|
418
620
|
</requestHandler>
|
419
621
|
|
622
|
+
<highlighting>
|
623
|
+
<!-- Configure the standard fragmenter -->
|
624
|
+
<!-- This could most likely be commented out in the "default" case -->
|
625
|
+
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
|
626
|
+
<lst name="defaults">
|
627
|
+
<int name="hl.fragsize">100</int>
|
628
|
+
</lst>
|
629
|
+
</fragmenter>
|
630
|
+
|
631
|
+
<!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
|
632
|
+
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
|
633
|
+
<lst name="defaults">
|
634
|
+
<!-- slightly smaller fragsizes work better because of slop -->
|
635
|
+
<int name="hl.fragsize">70</int>
|
636
|
+
<!-- allow 50% slop on fragment sizes -->
|
637
|
+
<float name="hl.regex.slop">0.5</float>
|
638
|
+
<!-- a basic sentence pattern -->
|
639
|
+
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
640
|
+
</lst>
|
641
|
+
</fragmenter>
|
642
|
+
|
643
|
+
<!-- Configure the standard formatter -->
|
644
|
+
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
|
645
|
+
<lst name="defaults">
|
646
|
+
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
|
647
|
+
<str name="hl.simple.post"><![CDATA[</em>]]></str>
|
648
|
+
</lst>
|
649
|
+
</formatter>
|
650
|
+
</highlighting>
|
651
|
+
|
652
|
+
|
420
653
|
<!-- queryResponseWriter plugins... query responses will be written using the
|
421
654
|
writer specified by the 'wt' request parameter matching the name of a registered
|
422
655
|
writer.
|
423
|
-
The "
|
656
|
+
The "default" writer is the default and will be used if 'wt' is not specified
|
424
657
|
in the request. XMLResponseWriter will be used if nothing is specified here.
|
425
658
|
The json, python, and ruby writers are also available by default.
|
426
659
|
|
427
|
-
<queryResponseWriter name="
|
660
|
+
<queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
|
428
661
|
<queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
|
429
662
|
<queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
|
430
663
|
<queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
|
664
|
+
<queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
|
665
|
+
<queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
|
431
666
|
|
432
667
|
<queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
|
433
668
|
-->
|
@@ -439,17 +674,20 @@
|
|
439
674
|
<queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
|
440
675
|
<int name="xsltCacheLifetimeSeconds">5</int>
|
441
676
|
</queryResponseWriter>
|
677
|
+
|
678
|
+
|
679
|
+
<!-- example of registering a query parser
|
680
|
+
<queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
|
681
|
+
-->
|
682
|
+
|
683
|
+
<!-- example of registering a custom function parser
|
684
|
+
<valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
|
685
|
+
-->
|
442
686
|
|
443
687
|
<!-- config for the admin interface -->
|
444
688
|
<admin>
|
445
689
|
<defaultQuery>solr</defaultQuery>
|
446
|
-
|
447
|
-
<!-- pingQuery should be "URLish" ...
|
448
|
-
& separated key=val pairs ... but there shouldn't be any
|
449
|
-
URL escaping of the values -->
|
450
|
-
<pingQuery>
|
451
|
-
qt=standard&q=solrpingquery
|
452
|
-
</pingQuery>
|
690
|
+
|
453
691
|
<!-- configure a healthcheck file for servers behind a loadbalancer
|
454
692
|
<healthcheck type="file">server-enabled</healthcheck>
|
455
693
|
-->
|