websolr-rails 1.4.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/.gitignore +1 -10
  2. data/LICENSE +17 -16
  3. data/README.rdoc +16 -62
  4. data/Rakefile +2 -60
  5. data/VERSION +1 -1
  6. data/lib/websolr-rails.rb +54 -1
  7. data/lib/websolr.rb +2 -1
  8. metadata +12 -215
  9. data/CHANGELOG +0 -8
  10. data/TESTING_THE_PLUGIN +0 -25
  11. data/bin/websolr +0 -10
  12. data/config/solr.yml +0 -15
  13. data/config/solr_environment.rb +0 -22
  14. data/generate_rdoc.sh +0 -13
  15. data/lib/acts_as_solr.rb +0 -65
  16. data/lib/acts_methods.rb +0 -281
  17. data/lib/class_methods.rb +0 -243
  18. data/lib/common_methods.rb +0 -89
  19. data/lib/deprecation.rb +0 -61
  20. data/lib/instance_methods.rb +0 -181
  21. data/lib/lazy_document.rb +0 -18
  22. data/lib/parser_methods.rb +0 -230
  23. data/lib/search_results.rb +0 -72
  24. data/lib/solr.rb +0 -21
  25. data/lib/solr/connection.rb +0 -190
  26. data/lib/solr/document.rb +0 -78
  27. data/lib/solr/exception.rb +0 -13
  28. data/lib/solr/field.rb +0 -39
  29. data/lib/solr/importer.rb +0 -19
  30. data/lib/solr/importer/array_mapper.rb +0 -26
  31. data/lib/solr/importer/delimited_file_source.rb +0 -38
  32. data/lib/solr/importer/hpricot_mapper.rb +0 -27
  33. data/lib/solr/importer/mapper.rb +0 -51
  34. data/lib/solr/importer/solr_source.rb +0 -43
  35. data/lib/solr/importer/xpath_mapper.rb +0 -35
  36. data/lib/solr/indexer.rb +0 -52
  37. data/lib/solr/request.rb +0 -26
  38. data/lib/solr/request/add_document.rb +0 -63
  39. data/lib/solr/request/base.rb +0 -36
  40. data/lib/solr/request/commit.rb +0 -31
  41. data/lib/solr/request/delete.rb +0 -50
  42. data/lib/solr/request/dismax.rb +0 -46
  43. data/lib/solr/request/index_info.rb +0 -22
  44. data/lib/solr/request/modify_document.rb +0 -51
  45. data/lib/solr/request/optimize.rb +0 -21
  46. data/lib/solr/request/ping.rb +0 -36
  47. data/lib/solr/request/select.rb +0 -56
  48. data/lib/solr/request/spellcheck.rb +0 -30
  49. data/lib/solr/request/standard.rb +0 -402
  50. data/lib/solr/request/update.rb +0 -23
  51. data/lib/solr/response.rb +0 -27
  52. data/lib/solr/response/add_document.rb +0 -17
  53. data/lib/solr/response/base.rb +0 -42
  54. data/lib/solr/response/commit.rb +0 -17
  55. data/lib/solr/response/delete.rb +0 -13
  56. data/lib/solr/response/dismax.rb +0 -8
  57. data/lib/solr/response/index_info.rb +0 -26
  58. data/lib/solr/response/modify_document.rb +0 -17
  59. data/lib/solr/response/optimize.rb +0 -14
  60. data/lib/solr/response/ping.rb +0 -28
  61. data/lib/solr/response/ruby.rb +0 -42
  62. data/lib/solr/response/select.rb +0 -17
  63. data/lib/solr/response/spellcheck.rb +0 -20
  64. data/lib/solr/response/standard.rb +0 -64
  65. data/lib/solr/response/xml.rb +0 -42
  66. data/lib/solr/solrtasks.rb +0 -27
  67. data/lib/solr/util.rb +0 -32
  68. data/lib/solr/xml.rb +0 -44
  69. data/lib/solr_fixtures.rb +0 -13
  70. data/lib/tasks/database.rake +0 -18
  71. data/lib/tasks/solr.rake +0 -94
  72. data/lib/tasks/test.rake +0 -7
  73. data/lib/websolr_controller.rb +0 -233
  74. data/lib/websolr_option_parser.rb +0 -61
  75. data/lib/websolr_rails.rb +0 -1
  76. data/lib/websolr_rails/tasks.rb +0 -4
  77. data/lib/will_paginate_support.rb +0 -12
  78. data/solr/CHANGES.txt +0 -1207
  79. data/solr/LICENSE.txt +0 -712
  80. data/solr/NOTICE.txt +0 -90
  81. data/solr/etc/jetty.xml +0 -205
  82. data/solr/etc/webdefault.xml +0 -379
  83. data/solr/lib/easymock.jar +0 -0
  84. data/solr/lib/jetty-6.1.3.jar +0 -0
  85. data/solr/lib/jetty-util-6.1.3.jar +0 -0
  86. data/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  87. data/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
  88. data/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
  89. data/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  90. data/solr/lib/servlet-api-2.4.jar +0 -0
  91. data/solr/lib/servlet-api-2.5-6.1.3.jar +0 -0
  92. data/solr/lib/xpp3-1.1.3.4.O.jar +0 -0
  93. data/solr/logs/.empty-dir-for-git +0 -0
  94. data/solr/solr/README.txt +0 -52
  95. data/solr/solr/bin/abc +0 -176
  96. data/solr/solr/bin/abo +0 -176
  97. data/solr/solr/bin/backup +0 -108
  98. data/solr/solr/bin/backupcleaner +0 -142
  99. data/solr/solr/bin/commit +0 -128
  100. data/solr/solr/bin/optimize +0 -129
  101. data/solr/solr/bin/readercycle +0 -129
  102. data/solr/solr/bin/rsyncd-disable +0 -77
  103. data/solr/solr/bin/rsyncd-enable +0 -76
  104. data/solr/solr/bin/rsyncd-start +0 -145
  105. data/solr/solr/bin/rsyncd-stop +0 -105
  106. data/solr/solr/bin/scripts-util +0 -83
  107. data/solr/solr/bin/snapcleaner +0 -148
  108. data/solr/solr/bin/snapinstaller +0 -168
  109. data/solr/solr/bin/snappuller +0 -248
  110. data/solr/solr/bin/snappuller-disable +0 -77
  111. data/solr/solr/bin/snappuller-enable +0 -77
  112. data/solr/solr/bin/snapshooter +0 -109
  113. data/solr/solr/conf/admin-extra.html +0 -31
  114. data/solr/solr/conf/protwords.txt +0 -21
  115. data/solr/solr/conf/schema.xml +0 -126
  116. data/solr/solr/conf/scripts.conf +0 -24
  117. data/solr/solr/conf/solrconfig.xml +0 -458
  118. data/solr/solr/conf/stopwords.txt +0 -57
  119. data/solr/solr/conf/synonyms.txt +0 -31
  120. data/solr/solr/conf/xslt/example.xsl +0 -132
  121. data/solr/solr/conf/xslt/example_atom.xsl +0 -63
  122. data/solr/solr/conf/xslt/example_rss.xsl +0 -62
  123. data/solr/start.jar +0 -0
  124. data/solr/tmp/.empty-dir-for-git +0 -0
  125. data/solr/webapps/solr.war +0 -0
  126. data/test/config/solr.yml +0 -2
  127. data/test/db/connections/mysql/connection.rb +0 -10
  128. data/test/db/connections/sqlite/connection.rb +0 -8
  129. data/test/db/migrate/001_create_books.rb +0 -15
  130. data/test/db/migrate/002_create_movies.rb +0 -12
  131. data/test/db/migrate/003_create_categories.rb +0 -11
  132. data/test/db/migrate/004_create_electronics.rb +0 -16
  133. data/test/db/migrate/005_create_authors.rb +0 -12
  134. data/test/db/migrate/006_create_postings.rb +0 -9
  135. data/test/db/migrate/007_create_posts.rb +0 -13
  136. data/test/db/migrate/008_create_gadgets.rb +0 -11
  137. data/test/fixtures/authors.yml +0 -9
  138. data/test/fixtures/books.yml +0 -13
  139. data/test/fixtures/categories.yml +0 -7
  140. data/test/fixtures/db_definitions/mysql.sql +0 -41
  141. data/test/fixtures/electronics.yml +0 -49
  142. data/test/fixtures/movies.yml +0 -9
  143. data/test/fixtures/postings.yml +0 -10
  144. data/test/functional/acts_as_solr_test.rb +0 -413
  145. data/test/functional/association_indexing_test.rb +0 -37
  146. data/test/functional/faceted_search_test.rb +0 -163
  147. data/test/functional/multi_solr_search_test.rb +0 -51
  148. data/test/models/author.rb +0 -10
  149. data/test/models/book.rb +0 -10
  150. data/test/models/category.rb +0 -8
  151. data/test/models/electronic.rb +0 -21
  152. data/test/models/gadget.rb +0 -9
  153. data/test/models/movie.rb +0 -17
  154. data/test/models/novel.rb +0 -2
  155. data/test/models/post.rb +0 -3
  156. data/test/models/posting.rb +0 -11
  157. data/test/test_helper.rb +0 -51
  158. data/test/unit/acts_methods_shoulda.rb +0 -70
  159. data/test/unit/class_methods_shoulda.rb +0 -88
  160. data/test/unit/common_methods_shoulda.rb +0 -112
  161. data/test/unit/instance_methods_shoulda.rb +0 -326
  162. data/test/unit/lazy_document_shoulda.rb +0 -35
  163. data/test/unit/parser_instance.rb +0 -19
  164. data/test/unit/parser_methods_shoulda.rb +0 -278
  165. data/test/unit/solr_instance.rb +0 -46
  166. data/test/unit/test_helper.rb +0 -14
  167. data/websolr-rails.gemspec +0 -243
@@ -1,24 +0,0 @@
1
- # Licensed to the Apache Software Foundation (ASF) under one or more
2
- # contributor license agreements. See the NOTICE file distributed with
3
- # this work for additional information regarding copyright ownership.
4
- # The ASF licenses this file to You under the Apache License, Version 2.0
5
- # (the "License"); you may not use this file except in compliance with
6
- # the License. You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- user=
17
- solr_hostname=localhost
18
- solr_port=8983
19
- rsyncd_port=18983
20
- data_dir=
21
- webapp_name=solr
22
- master_host=
23
- master_data_dir=
24
- master_status_dir=
@@ -1,458 +0,0 @@
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
- <config>
20
- <!-- Set this to 'false' if you want solr to continue working after it has
21
- encountered an severe configuration error. In a production environment,
22
- you may want solr to keep working even if one handler is mis-configured.
23
-
24
- You may also set this to false using by setting the system property:
25
- -Dsolr.abortOnConfigurationError=false
26
- -->
27
- <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
28
-
29
- <!-- Used to specify an alternate directory to hold all index data
30
- other than the default ./data under the Solr home.
31
- If replication is in use, this should match the replication configuration. -->
32
-
33
- <dataDir>${solr.data.dir:./solr/data}</dataDir>
34
-
35
- <indexDefaults>
36
- <!-- Values here affect all index writers and act as a default unless overridden. -->
37
- <useCompoundFile>false</useCompoundFile>
38
- <mergeFactor>10</mergeFactor>
39
- <maxBufferedDocs>1000</maxBufferedDocs>
40
- <maxMergeDocs>2147483647</maxMergeDocs>
41
- <maxFieldLength>10000</maxFieldLength>
42
- <writeLockTimeout>1000</writeLockTimeout>
43
- <commitLockTimeout>10000</commitLockTimeout>
44
- </indexDefaults>
45
-
46
- <mainIndex>
47
- <!-- options specific to the main on-disk lucene index -->
48
- <useCompoundFile>false</useCompoundFile>
49
- <mergeFactor>10</mergeFactor>
50
- <maxBufferedDocs>1000</maxBufferedDocs>
51
- <maxMergeDocs>2147483647</maxMergeDocs>
52
- <maxFieldLength>10000</maxFieldLength>
53
-
54
- <!-- If true, unlock any held write or commit locks on startup.
55
- This defeats the locking mechanism that allows multiple
56
- processes to safely access a lucene index, and should be
57
- used with care. -->
58
- <unlockOnStartup>false</unlockOnStartup>
59
- </mainIndex>
60
-
61
- <!-- the default high-performance update handler -->
62
- <updateHandler class="solr.DirectUpdateHandler2">
63
-
64
- <!-- A prefix of "solr." for class names is an alias that
65
- causes solr to search appropriate packages, including
66
- org.apache.solr.(search|update|request|core|analysis)
67
- -->
68
-
69
- <!-- autocommit pending docs if certain criteria are met
70
- <autoCommit>
71
- <maxDocs>10000</maxDocs>
72
- <maxTime>1000</maxTime>
73
- </autoCommit>
74
- -->
75
-
76
- <!-- The RunExecutableListener executes an external command.
77
- exe - the name of the executable to run
78
- dir - dir to use as the current working directory. default="."
79
- wait - the calling thread waits until the executable returns. default="true"
80
- args - the arguments to pass to the program. default=nothing
81
- env - environment variables to set. default=nothing
82
- -->
83
- <!-- A postCommit event is fired after every commit or optimize command
84
- <listener event="postCommit" class="solr.RunExecutableListener">
85
- <str name="exe">snapshooter</str>
86
- <str name="dir">solr/bin</str>
87
- <bool name="wait">true</bool>
88
- <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
89
- <arr name="env"> <str>MYVAR=val1</str> </arr>
90
- </listener>
91
- -->
92
- <!-- A postOptimize event is fired only after every optimize command, useful
93
- in conjunction with index distribution to only distribute optimized indicies
94
- <listener event="postOptimize" class="solr.RunExecutableListener">
95
- <str name="exe">snapshooter</str>
96
- <str name="dir">solr/bin</str>
97
- <bool name="wait">true</bool>
98
- </listener>
99
- -->
100
-
101
- </updateHandler>
102
-
103
-
104
- <query>
105
- <!-- Maximum number of clauses in a boolean query... can affect
106
- range or prefix queries that expand to big boolean
107
- queries. An exception is thrown if exceeded. -->
108
- <maxBooleanClauses>1024</maxBooleanClauses>
109
-
110
-
111
- <!-- Cache used by SolrIndexSearcher for filters (DocSets),
112
- unordered sets of *all* documents that match a query.
113
- When a new searcher is opened, its caches may be prepopulated
114
- or "autowarmed" using data from caches in the old searcher.
115
- autowarmCount is the number of items to prepopulate. For LRUCache,
116
- the autowarmed items will be the most recently accessed items.
117
- Parameters:
118
- class - the SolrCache implementation (currently only LRUCache)
119
- size - the maximum number of entries in the cache
120
- initialSize - the initial capacity (number of entries) of
121
- the cache. (seel java.util.HashMap)
122
- autowarmCount - the number of entries to prepopulate from
123
- and old cache.
124
- -->
125
- <filterCache
126
- class="solr.LRUCache"
127
- size="512"
128
- initialSize="512"
129
- autowarmCount="256"/>
130
-
131
- <!-- queryResultCache caches results of searches - ordered lists of
132
- document ids (DocList) based on a query, a sort, and the range
133
- of documents requested. -->
134
- <queryResultCache
135
- class="solr.LRUCache"
136
- size="512"
137
- initialSize="512"
138
- autowarmCount="256"/>
139
-
140
- <!-- documentCache caches Lucene Document objects (the stored fields for each document).
141
- Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
142
- <documentCache
143
- class="solr.LRUCache"
144
- size="512"
145
- initialSize="512"
146
- autowarmCount="0"/>
147
-
148
- <!-- If true, stored fields that are not requested will be loaded lazily.
149
-
150
- This can result in a significant speed improvement if the usual case is to
151
- not load all stored fields, especially if the skipped fields are large compressed
152
- text fields.
153
- -->
154
- <enableLazyFieldLoading>true</enableLazyFieldLoading>
155
-
156
- <!-- Example of a generic cache. These caches may be accessed by name
157
- through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
158
- The purpose is to enable easy caching of user/application level data.
159
- The regenerator argument should be specified as an implementation
160
- of solr.search.CacheRegenerator if autowarming is desired. -->
161
- <!--
162
- <cache name="myUserCache"
163
- class="solr.LRUCache"
164
- size="4096"
165
- initialSize="1024"
166
- autowarmCount="1024"
167
- regenerator="org.mycompany.mypackage.MyRegenerator"
168
- />
169
- -->
170
-
171
- <!-- An optimization that attempts to use a filter to satisfy a search.
172
- If the requested sort does not include score, then the filterCache
173
- will be checked for a filter matching the query. If found, the filter
174
- will be used as the source of document ids, and then the sort will be
175
- applied to that.
176
- <useFilterForSortedQuery>true</useFilterForSortedQuery>
177
- -->
178
-
179
- <!-- An optimization for use with the queryResultCache. When a search
180
- is requested, a superset of the requested number of document ids
181
- are collected. For example, if a search for a particular query
182
- requests matching documents 10 through 19, and queryWindowSize is 50,
183
- then documents 0 through 50 will be collected and cached. Any further
184
- requests in that range can be satisfied via the cache. -->
185
- <queryResultWindowSize>10</queryResultWindowSize>
186
-
187
- <!-- This entry enables an int hash representation for filters (DocSets)
188
- when the number of items in the set is less than maxSize. For smaller
189
- sets, this representation is more memory efficient, more efficient to
190
- iterate over, and faster to take intersections. -->
191
- <HashDocSet maxSize="3000" loadFactor="0.75"/>
192
-
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
- <!-- a newSearcher event is fired whenever a new searcher is being prepared
201
- and there is a current searcher handling requests (aka registered). -->
202
- <!-- QuerySenderListener takes an array of NamedList and executes a
203
- local query request for each NamedList in sequence. -->
204
- <!--
205
- <listener event="newSearcher" class="solr.QuerySenderListener">
206
- <arr name="queries">
207
- <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
208
- <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
209
- </arr>
210
- </listener>
211
- -->
212
-
213
- <!-- a firstSearcher event is fired whenever a new searcher is being
214
- prepared but there is no current registered searcher to handle
215
- requests or to gain autowarming data from. -->
216
- <!--
217
- <listener event="firstSearcher" class="solr.QuerySenderListener">
218
- <arr name="queries">
219
- <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
220
- </arr>
221
- </listener>
222
- -->
223
-
224
- <!-- If a search request comes in and there is no current registered searcher,
225
- then immediately register the still warming searcher and use it. If
226
- "false" then all requests will block until the first searcher is done
227
- warming. -->
228
- <useColdSearcher>false</useColdSearcher>
229
-
230
- <!-- Maximum number of searchers that may be warming in the background
231
- concurrently. An error is returned if this limit is exceeded. Recommend
232
- 1-2 for read-only slaves, higher for masters w/o cache warming. -->
233
- <maxWarmingSearchers>4</maxWarmingSearchers>
234
-
235
- </query>
236
-
237
- <!--
238
- Let the dispatch filter handler /select?qt=XXX
239
- handleSelect=true will use consistent error handling for /select and /update
240
- handleSelect=false will use solr1.1 style error formatting
241
- -->
242
- <requestDispatcher handleSelect="true" >
243
- <!--Make sure your system has some authentication before enabling remote streaming! -->
244
- <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
245
- </requestDispatcher>
246
-
247
-
248
- <!-- requestHandler plugins... incoming queries will be dispatched to the
249
- correct handler based on the qt (query type) param matching the
250
- name of registered handlers.
251
- The "standard" request handler is the default and will be used if qt
252
- is not specified in the request.
253
- -->
254
- <requestHandler name="standard" class="solr.StandardRequestHandler">
255
- <!-- default values for query parameters -->
256
- <lst name="defaults">
257
- <str name="echoParams">explicit</str>
258
- <str name="json.nl">map</str>
259
- <!--
260
- <int name="rows">10</int>
261
- <str name="fl">*</str>
262
- <str name="version">2.1</str>
263
- -->
264
- </lst>
265
- </requestHandler>
266
-
267
- <!-- DisMaxRequestHandler allows easy searching across multiple fields
268
- for simple user-entered phrases.
269
- see http://wiki.apache.org/solr/DisMaxRequestHandler
270
- -->
271
- <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
272
- <lst name="defaults">
273
- <str name="echoParams">explicit</str>
274
- <float name="tie">0.01</float>
275
- <str name="qf">
276
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
277
- </str>
278
- <str name="pf">
279
- text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
280
- </str>
281
- <str name="bf">
282
- ord(poplarity)^0.5 recip(rord(price),1,1000,1000)^0.3
283
- </str>
284
- <str name="fl">
285
- id,name,price,score
286
- </str>
287
- <str name="mm">
288
- 2&lt;-1 5&lt;-2 6&lt;90%
289
- </str>
290
- <int name="ps">100</int>
291
- <str name="q.alt">*:*</str>
292
- </lst>
293
- </requestHandler>
294
-
295
- <!-- Note how you can register the same handler multiple times with
296
- different names (and different init parameters)
297
- -->
298
- <requestHandler name="partitioned" class="solr.DisMaxRequestHandler" >
299
- <lst name="defaults">
300
- <str name="echoParams">explicit</str>
301
- <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
302
- <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
303
- <!-- This is an example of using Date Math to specify a constantly
304
- moving date range in a config...
305
- -->
306
- <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
307
- </lst>
308
- <!-- In addition to defaults, "appends" params can be specified
309
- to identify values which should be appended to the list of
310
- multi-val params from the query (or the existing "defaults").
311
-
312
- In this example, the param "fq=instock:true" will be appended to
313
- any query time fq params the user may specify, as a mechanism for
314
- partitioning the index, independent of any user selected filtering
315
- that may also be desired (perhaps as a result of faceted searching).
316
-
317
- NOTE: there is *absolutely* nothing a client can do to prevent these
318
- "appends" values from being used, so don't use this mechanism
319
- unless you are sure you always want it.
320
- -->
321
- <lst name="appends">
322
- <str name="fq">inStock:true</str>
323
- </lst>
324
- <!-- "invariants" are a way of letting the Solr maintainer lock down
325
- the options available to Solr clients. Any params values
326
- specified here are used regardless of what values may be specified
327
- in either the query, the "defaults", or the "appends" params.
328
-
329
- In this example, the facet.field and facet.query params are fixed,
330
- limiting the facets clients can use. Faceting is not turned on by
331
- default - but if the client does specify facet=true in the request,
332
- these are the only facets they will be able to see counts for;
333
- regardless of what other facet.field or facet.query params they
334
- may specify.
335
-
336
- NOTE: there is *absolutely* nothing a client can do to prevent these
337
- "invariants" values from being used, so don't use this mechanism
338
- unless you are sure you always want it.
339
- -->
340
- <lst name="invariants">
341
- <str name="facet.field">cat</str>
342
- <str name="facet.field">manu_exact</str>
343
- <str name="facet.query">price:[* TO 500]</str>
344
- <str name="facet.query">price:[500 TO *]</str>
345
- </lst>
346
- </requestHandler>
347
-
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&lt;-1 5&lt;-2 6&lt;90%
360
- </str>
361
- </requestHandler>
362
-
363
-
364
- <!-- SpellCheckerRequestHandler takes in a word (or several words) as the
365
- value of the "q" parameter and returns a list of alternative spelling
366
- suggestions. If invoked with a ...&cmd=rebuild, it will rebuild the
367
- spellchecker index.
368
- -->
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
-
390
-
391
- <!-- Update request handler.
392
-
393
- Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
394
- the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
395
- The response format differs from solr1.1 formatting and returns a standard error code.
396
-
397
- To enable solr1.1 behavior, remove the /update handler or change its path
398
- -->
399
- <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
400
-
401
- <!-- CSV update handler, loaded on demand -->
402
- <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
403
-
404
-
405
- <!-- Admin Handlers. TODO? There could be a single handler that loads them all... -->
406
- <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
407
- <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
408
- <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
409
- <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
410
- <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
411
-
412
- <!-- Echo the request contents back to the client -->
413
- <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
414
- <lst name="defaults">
415
- <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
416
- <str name="echoHandler">true</str>
417
- </lst>
418
- </requestHandler>
419
-
420
- <!-- queryResponseWriter plugins... query responses will be written using the
421
- writer specified by the 'wt' request parameter matching the name of a registered
422
- writer.
423
- The "standard" writer is the default and will be used if 'wt' is not specified
424
- in the request. XMLResponseWriter will be used if nothing is specified here.
425
- The json, python, and ruby writers are also available by default.
426
-
427
- <queryResponseWriter name="standard" class="org.apache.solr.request.XMLResponseWriter"/>
428
- <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
429
- <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
430
- <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
431
-
432
- <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
433
- -->
434
-
435
- <!-- XSLT response writer transforms the XML output by any xslt file found
436
- in Solr's conf/xslt directory. Changes to xslt files are checked for
437
- every xsltCacheLifetimeSeconds.
438
- -->
439
- <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
440
- <int name="xsltCacheLifetimeSeconds">5</int>
441
- </queryResponseWriter>
442
-
443
- <!-- config for the admin interface -->
444
- <admin>
445
- <defaultQuery>solr</defaultQuery>
446
- <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles>
447
- <!-- pingQuery should be "URLish" ...
448
- &amp; separated key=val pairs ... but there shouldn't be any
449
- URL escaping of the values -->
450
- <pingQuery>
451
- qt=standard&amp;q=solrpingquery
452
- </pingQuery>
453
- <!-- configure a healthcheck file for servers behind a loadbalancer
454
- <healthcheck type="file">server-enabled</healthcheck>
455
- -->
456
- </admin>
457
-
458
- </config>