solr_wrapper 3.1.3 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e135734d52040fa5877fd21ad5149afc55ba8ffbc282a900ba448a9b2b230c28
4
- data.tar.gz: 5363eb0bcad04e78b36267dbf35aa03a1fec56ee1487023622d3219a54501f87
3
+ metadata.gz: d0ec6a2ca3c8e571ae16e5ded77d9786ce333094a0fc8773d61b46d2bf1ba211
4
+ data.tar.gz: 3636273764eb165f5dc132bb2a558fd13b974c91f0f6e3a6d1cfaa318fb1b327
5
5
  SHA512:
6
- metadata.gz: e0c3fca3bc208c4f9d71c6c14fcb0e99094d737e705ac12620c9ba725cc925b004a2dfa9bdb5210b05863df6ff94f4a3282a23b3e8f6aa4e2ef5de60a78eea2a
7
- data.tar.gz: 3cd79dcfa0e2b3fd26bb1ce499712e09d019ade55799d9fbbdbdc6e832748df4f0bbc54689a5ba73f7e7d122db55751eff6a75bac37f6c41d19e6df55396b760
6
+ metadata.gz: da1cfd3a2b98fc21125970c6357c2763394e6620f9b22df2ee1d08594d0948c0cb99f0051f4c79c76cd4f89c170db00b078f80687163a119fa6a5882a3c56c52
7
+ data.tar.gz: 5ebff3d507a4ff72b3fc711756c2f9bfb1e443c617b4a55d12da8f64ecbe655da417c5b3063f81dead29cf94acfc0d3baa1cb439af5936933c5b73e68beafe61
data/README.md CHANGED
@@ -31,13 +31,13 @@ SolrWrapper.wrap port: 8983,
31
31
  |Option | |
32
32
  |---------------|-----------------------------------------|
33
33
  | instance_dir | Directory to store the solr index files |
34
- | url | URL of the Zip file to download |
34
+ | url | URL of the TGZ artifact to download |
35
35
  | mirror_url | Mirror to download the solr artifacts from (e.g. http://lib-solr-mirror.princeton.edu/dist/)|
36
36
  | version | Solr version to download and install |
37
37
  | port | port to run Solr on |
38
38
  | version_file | Local path to store the currently installed version |
39
- | download_dir | Local path for storing the downloaded Solr zip file |
40
- | solr_zip_path | Local path to the Solr zip file |
39
+ | download_dir | Local path for storing the downloaded Solr tgz file |
40
+ | artifact_path | Local path to the Solr tgz file |
41
41
  | checksum | Path/URL to checksum |
42
42
  | solr_xml | Path to Solr configuration |
43
43
  | verbose | (Boolean) |
@@ -46,6 +46,7 @@ SolrWrapper.wrap port: 8983,
46
46
  | solr_options | (Hash) |
47
47
  | env | (Hash) |
48
48
  | persist | (Boolean) Preserves the data in you collection between startups |
49
+ | contrib | (Array<Hash>) |
49
50
 
50
51
  ```ruby
51
52
  solr.with_collection(name: 'collection_name', dir: 'path_to_solr_configs')
data/exe/solr_wrapper CHANGED
@@ -39,8 +39,8 @@ args = OptionParser.new do |opts|
39
39
  options[:cloud] = c
40
40
  end
41
41
 
42
- opts.on("--solr_zip_path PATH", "Download/use solr at the given path") do |d|
43
- options[:solr_zip_path] = d
42
+ opts.on("--artifact_path PATH", "Download/use solr at the given path") do |d|
43
+ options[:artifact_path] = d
44
44
  end
45
45
 
46
46
  opts.on("-iDIR", "--instance_directory DIR", "Install/use solr at the given directory") do |d|
@@ -28,7 +28,7 @@ module SolrWrapper
28
28
  if config.default_download_url == config.static_config.archive_download_url
29
29
  "#{config.default_download_url}.#{suffix}"
30
30
  else
31
- "https://archive.apache.org/dist/lucene/solr/#{config.static_config.version}/solr-#{config.static_config.version}.zip.#{suffix}"
31
+ "https://archive.apache.org/dist/#{config.mirror_artifact_path}.#{suffix}"
32
32
  end
33
33
  end
34
34
 
@@ -54,8 +54,8 @@ module SolrWrapper
54
54
  options[:zookeeper_port]
55
55
  end
56
56
 
57
- def solr_zip_path
58
- options[:solr_zip_path]
57
+ def artifact_path
58
+ options[:artifact_path]
59
59
  end
60
60
 
61
61
  def download_dir
@@ -93,13 +93,21 @@ module SolrWrapper
93
93
  end
94
94
  end
95
95
 
96
+ def mirror_artifact_path
97
+ if version > '9'
98
+ "solr/solr/#{version}/solr-#{version}.tgz"
99
+ else
100
+ "lucene/solr/#{version}/solr-#{version}.tgz"
101
+ end
102
+ end
103
+
96
104
  def closest_mirror_url
97
- "https://www.apache.org/dyn/closer.lua/lucene/solr/#{version}/solr-#{version}.zip?asjson=true"
105
+ "https://www.apache.org/dyn/closer.lua/#{mirror_artifact_path}?asjson=true"
98
106
  end
99
107
 
100
108
  def mirror_url
101
109
  @mirror_url ||= if options[:mirror_url]
102
- options[:mirror_url] + "lucene/solr/#{version}/solr-#{version}.zip"
110
+ options[:mirror_url] + mirror_artifact_path
103
111
  else
104
112
  begin
105
113
  json = HTTP.follow.get(closest_mirror_url).body
@@ -120,7 +128,7 @@ module SolrWrapper
120
128
  end
121
129
 
122
130
  def archive_download_url
123
- "https://archive.apache.org/dist/lucene/solr/#{version}/solr-#{version}.zip"
131
+ "https://archive.apache.org/dist/#{mirror_artifact_path}"
124
132
  end
125
133
 
126
134
  def cloud
@@ -137,18 +145,22 @@ module SolrWrapper
137
145
 
138
146
  def collection_options
139
147
  hash = options.fetch(:collection, {})
140
- Configuration.slice(convert_keys(hash), :name, :dir, :persist)
148
+ Configuration.slice(hash.transform_keys(&:to_sym), :name, :dir, :persist)
141
149
  end
142
150
 
143
151
  def configsets
144
152
  configsets = options[:configsets] || []
145
- configsets.map { |x| convert_keys(x) }
153
+ configsets.map { |x| x.transform_keys(&:to_sym) }
146
154
  end
147
155
 
148
156
  def poll_interval
149
157
  options.fetch(:poll_interval, 1)
150
158
  end
151
159
 
160
+ def contrib
161
+ options.fetch(:contrib, [])
162
+ end
163
+
152
164
  private
153
165
 
154
166
  def self.slice(source, *keys)
@@ -174,11 +186,23 @@ module SolrWrapper
174
186
  $stderr.puts "Unable to parse config #{config_file}" if verbose?
175
187
  return {}
176
188
  end
177
- convert_keys(config)
189
+
190
+ config.transform_keys!(&:to_sym)
191
+ absoluteize_paths(config, root: File.dirname(config_file))
178
192
  end
179
193
 
180
- def convert_keys(hash)
181
- hash.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
194
+ def absoluteize_paths(config, root: Dir.pwd)
195
+ return config unless config[:contrib]
196
+
197
+ config = config.dup
198
+
199
+ config[:contrib] = config[:contrib].map do |mapping|
200
+ mapping = mapping.transform_keys(&:to_sym)
201
+ mapping[:from] = File.expand_path(mapping[:from], root)
202
+ mapping[:to] ||= 'contrib/'
203
+ end
204
+
205
+ config
182
206
  end
183
207
 
184
208
  def default_configuration_paths
@@ -6,10 +6,10 @@ require 'securerandom'
6
6
  require 'socket'
7
7
  require 'stringio'
8
8
  require 'tmpdir'
9
- require 'zip'
10
9
  require 'erb'
11
10
  require 'yaml'
12
11
  require 'retriable'
12
+ require 'solr_wrapper/tgz_extractor'
13
13
 
14
14
  module SolrWrapper
15
15
  class Instance
@@ -23,9 +23,9 @@ module SolrWrapper
23
23
  # @option options [String] :port port to run Solr on
24
24
  # @option options [Boolean] :cloud Run solr in cloud mode
25
25
  # @option options [String] :version_file Local path to store the currently installed version
26
- # @option options [String] :download_dir Local directory to store the downloaded Solr zip and its checksum file in (overridden by :solr_zip_path)
27
- # @option options [String] :solr_zip_path Local path for storing the downloaded Solr zip file
28
- # @option options [Boolean] :validate Should solr_wrapper download a new checksum and (re-)validate the zip file? (default: trueF)
26
+ # @option options [String] :download_dir Local directory to store the downloaded Solr artifact and its checksum file in (overridden by :artifact_path)
27
+ # @option options [String] :artifact_path Local path for storing the downloaded Solr artifact file
28
+ # @option options [Boolean] :validate Should solr_wrapper download a new checksum and (re-)validate the tgz file? (default: true)
29
29
  # @option options [String] :checksum Path/URL to checksum
30
30
  # @option options [String] :solr_xml Path to Solr configuration
31
31
  # @option options [String] :extra_lib_dir Path to directory containing extra libraries to copy into instance_dir/lib
@@ -36,6 +36,7 @@ module SolrWrapper
36
36
  # @option options [String] :config
37
37
  def initialize(options = {})
38
38
  @config = Settings.new(Configuration.new(options))
39
+ @started = false
39
40
  end
40
41
 
41
42
  def host
@@ -63,7 +64,7 @@ module SolrWrapper
63
64
  start
64
65
  yield self
65
66
  ensure
66
- stop
67
+ stop if @started
67
68
  end
68
69
 
69
70
  ##
@@ -73,6 +74,8 @@ module SolrWrapper
73
74
  if managed?
74
75
  exec('start', p: port, c: config.cloud)
75
76
 
77
+ @started = true
78
+
76
79
  # Wait for solr to start
77
80
  unless status
78
81
  sleep config.poll_interval
@@ -241,6 +244,14 @@ module SolrWrapper
241
244
  raise_error_unless_extracted
242
245
  FileUtils.cp config.solr_xml, File.join(config.instance_dir, 'server', 'solr', 'solr.xml') if config.solr_xml
243
246
  FileUtils.cp_r File.join(config.extra_lib_dir, '.'), File.join(config.instance_dir, 'server', 'solr', 'lib') if config.extra_lib_dir
247
+
248
+ config.contrib.each do |mapping|
249
+ if File.directory? mapping[:from]
250
+ FileUtils.cp_r mapping[:from], File.join(config.instance_dir, mapping[:to])
251
+ else
252
+ FileUtils.cp mapping[:from], File.join(config.instance_dir, mapping[:to])
253
+ end
254
+ end
244
255
  end
245
256
 
246
257
  def extract_and_configure
@@ -255,25 +266,13 @@ module SolrWrapper
255
266
  def extract
256
267
  return config.instance_dir if extracted?
257
268
 
258
- zip_path = download
269
+ downloaded_artifact_path = download
259
270
 
260
- begin
261
- Zip::File.open(zip_path) do |zip_file|
262
- # Handle entries one by one
263
- zip_file.each do |entry|
264
- dest_file = File.join(config.tmp_save_dir, entry.name)
265
- FileUtils.remove_entry(dest_file, true)
266
- entry.extract(dest_file)
267
- end
268
- end
269
-
270
- rescue Exception => e
271
- abort "Unable to unzip #{zip_path} into #{config.tmp_save_dir}: #{e.message}"
272
- end
271
+ SolrWrapper::TgzExtractor.new(downloaded_artifact_path, destination: config.tmp_save_dir).extract!
273
272
 
274
273
  begin
275
274
  FileUtils.remove_dir(config.instance_dir, true)
276
- FileUtils.cp_r File.join(config.tmp_save_dir, File.basename(config.download_url, ".zip")), config.instance_dir
275
+ FileUtils.cp_r File.join(config.tmp_save_dir, File.basename(config.download_url, '.tgz')), config.instance_dir
277
276
  self.extracted_version = config.version
278
277
  FileUtils.chmod 0755, config.solr_binary
279
278
  rescue Exception => e
@@ -297,11 +296,11 @@ module SolrWrapper
297
296
  end
298
297
 
299
298
  def download
300
- unless File.exist?(config.solr_zip_path) && checksum_validator.validate?(config.solr_zip_path)
301
- Downloader.fetch_with_progressbar config.download_url, config.solr_zip_path
302
- checksum_validator.validate! config.solr_zip_path
299
+ unless File.exist?(config.downloaded_artifact_path) && checksum_validator.validate?(config.downloaded_artifact_path)
300
+ Downloader.fetch_with_progressbar config.download_url, config.downloaded_artifact_path
301
+ checksum_validator.validate! config.downloaded_artifact_path
303
302
  end
304
- config.solr_zip_path
303
+ config.downloaded_artifact_path
305
304
  end
306
305
 
307
306
  ##
@@ -50,7 +50,7 @@ module SolrWrapper
50
50
 
51
51
  def instance_dir
52
52
  @instance_dir ||= static_config.instance_dir
53
- @instance_dir ||= File.join(tmpdir, File.basename(download_url, ".zip"))
53
+ @instance_dir ||= File.join(tmpdir, File.basename(download_url, ".tgz"))
54
54
  end
55
55
 
56
56
  def managed?
@@ -62,9 +62,9 @@ module SolrWrapper
62
62
  @download_url ||= default_download_url
63
63
  end
64
64
 
65
- def solr_zip_path
66
- @solr_zip_path ||= static_config.solr_zip_path
67
- @solr_zip_path ||= default_solr_zip_path
65
+ def downloaded_artifact_path
66
+ @downloaded_artifact_path ||= static_config.artifact_path
67
+ @downloaded_artifact_path ||= default_solr_artifact_path
68
68
  end
69
69
 
70
70
  def version_file
@@ -93,7 +93,7 @@ module SolrWrapper
93
93
  end
94
94
  end
95
95
 
96
- def default_solr_zip_path
96
+ def default_solr_artifact_path
97
97
  File.join(download_dir, File.basename(download_url))
98
98
  end
99
99
 
@@ -0,0 +1,21 @@
1
+ require 'minitar'
2
+ require 'zlib'
3
+
4
+ module SolrWrapper
5
+ class TgzExtractor
6
+ attr_reader :file, :destination
7
+
8
+ TAR_LONGLINK = '././@LongLink'
9
+
10
+ def initialize(file, destination: nil)
11
+ @file = file
12
+ @destination = destination || Dir.mktmpdir
13
+ end
14
+
15
+ def extract!
16
+ Minitar.unpack(Zlib::GzipReader.open(file), destination)
17
+ rescue StandardError => e
18
+ abort "Unable to extract #{file} into #{destination}: #{e.message}"
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module SolrWrapper
2
- VERSION = '3.1.3'
2
+ VERSION = '4.0.2'
3
3
  end
data/solr_wrapper.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "http"
22
- spec.add_dependency "rubyzip"
22
+ spec.add_dependency "minitar"
23
23
  spec.add_dependency "ruby-progressbar"
24
24
  spec.add_dependency "retriable"
25
25
 
@@ -16,10 +16,10 @@
16
16
  limitations under the License.
17
17
  -->
18
18
 
19
- <!--
19
+ <!--
20
20
  This is the Solr schema file. This file should be named "schema.xml" and
21
21
  should be in the conf directory under the solr home
22
- (i.e. ./solr/conf/schema.xml by default)
22
+ (i.e. ./solr/conf/schema.xml by default)
23
23
  or located where the classloader for the Solr webapp can find it.
24
24
 
25
25
  This example schema is the recommended starting point for users.
@@ -31,26 +31,26 @@
31
31
 
32
32
  <schema name="example" version="1.5">
33
33
  <!-- attribute "name" is the name of this schema and is only used for display purposes.
34
- version="x.y" is Solr's version number for the schema syntax and
34
+ version="x.y" is Solr's version number for the schema syntax and
35
35
  semantics. It should not normally be changed by applications.
36
36
 
37
- 1.0: multiValued attribute did not exist, all fields are multiValued
37
+ 1.0: multiValued attribute did not exist, all fields are multiValued
38
38
  by nature
39
- 1.1: multiValued attribute introduced, false by default
40
- 1.2: omitTermFreqAndPositions attribute introduced, true by default
39
+ 1.1: multiValued attribute introduced, false by default
40
+ 1.2: omitTermFreqAndPositions attribute introduced, true by default
41
41
  except for text fields.
42
42
  1.3: removed optional field compress feature
43
43
  1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
44
- behavior when a single string produces multiple tokens. Defaults
44
+ behavior when a single string produces multiple tokens. Defaults
45
45
  to off for version >= 1.4
46
- 1.5: omitNorms defaults to true for primitive field types
46
+ 1.5: omitNorms defaults to true for primitive field types
47
47
  (int, float, boolean, string...)
48
48
  -->
49
49
 
50
50
 
51
51
  <!-- Valid attributes for fields:
52
52
  name: mandatory - the name for the field
53
- type: mandatory - the name of a field type from the
53
+ type: mandatory - the name of a field type from the
54
54
  <types> fieldType section
55
55
  indexed: true if this field should be indexed (searchable or sortable)
56
56
  stored: true if this field should be retrievable
@@ -73,9 +73,9 @@
73
73
  given field.
74
74
  When using MoreLikeThis, fields used for similarity should be
75
75
  stored for best performance.
76
- termPositions: Store position information with the term vector.
76
+ termPositions: Store position information with the term vector.
77
77
  This will increase storage costs.
78
- termOffsets: Store offset information with the term vector. This
78
+ termOffsets: Store offset information with the term vector. This
79
79
  will increase storage costs.
80
80
  required: The field is required. It will throw an error if the
81
81
  value does not exist
@@ -92,26 +92,26 @@
92
92
 
93
93
  <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
94
94
  or Solr won't start. _version_ and update log are required for SolrCloud
95
- -->
95
+ -->
96
96
  <field name="_version_" type="long" indexed="true" stored="true"/>
97
-
97
+
98
98
  <!-- points to the root document of a block of nested documents. Required for nested
99
99
  document support, may be removed otherwise
100
100
  -->
101
101
  <field name="_root_" type="string" indexed="true" stored="false"/>
102
102
 
103
103
  <!-- Only remove the "id" field if you have a very good reason to. While not strictly
104
- required, it is highly recommended. A <uniqueKey> is present in almost all Solr
104
+ required, it is highly recommended. A <uniqueKey> is present in almost all Solr
105
105
  installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".
106
- -->
107
- <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
106
+ -->
107
+ <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
108
108
 
109
109
  <!-- Dynamic field definitions allow using convention over configuration
110
- for fields via the specification of patterns to match field names.
110
+ for fields via the specification of patterns to match field names.
111
111
  EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
112
112
  RESTRICTION: the glob-like pattern in the name attribute must have
113
113
  a "*" only at the start or the end. -->
114
-
114
+
115
115
  <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
116
116
  <dynamicField name="*_is" type="int" indexed="true" stored="true" multiValued="true"/>
117
117
  <dynamicField name="*_s" type="string" indexed="true" stored="true" />
@@ -133,7 +133,6 @@
133
133
 
134
134
  <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
135
135
  <dynamicField name="*_dts" type="date" indexed="true" stored="true" multiValued="true"/>
136
- <dynamicField name="*_p" type="location" indexed="true" stored="true"/>
137
136
 
138
137
  <!-- some trie-coded dynamic fields for faster range queries -->
139
138
  <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
@@ -149,13 +148,13 @@
149
148
 
150
149
  <dynamicField name="random_*" type="random" />
151
150
 
152
- <!-- uncomment the following to ignore any fields that don't already match an existing
153
- field name or dynamic field, rather than reporting them as an error.
154
- alternately, change the type="ignored" to some other type e.g. "text" if you want
155
- unknown fields indexed and/or stored by default -->
151
+ <!-- uncomment the following to ignore any fields that don't already match an existing
152
+ field name or dynamic field, rather than reporting them as an error.
153
+ alternately, change the type="ignored" to some other type e.g. "text" if you want
154
+ unknown fields indexed and/or stored by default -->
156
155
  <!--dynamicField name="*" type="ignored" multiValued="true" /-->
157
156
 
158
- <!-- Field to use to determine and enforce document uniqueness.
157
+ <!-- Field to use to determine and enforce document uniqueness.
159
158
  Unless this field is marked with required="false", it will be a required field
160
159
  -->
161
160
  <uniqueKey>id</uniqueKey>
@@ -168,7 +167,7 @@
168
167
  <copyField source="title" dest="text"/>
169
168
  <copyField source="body" dest="text"/>
170
169
  -->
171
-
170
+
172
171
  <!-- field type definitions. The "name" attribute is
173
172
  just a label to be used by field definitions. The "class"
174
173
  attribute and any other attributes determine the real
@@ -200,7 +199,7 @@
200
199
  - If sortMissingLast="false" and sortMissingFirst="false" (the default),
201
200
  then default lucene sorting will be used which places docs without the
202
201
  field first in an ascending sort and last in a descending sort.
203
- -->
202
+ -->
204
203
 
205
204
  <!--
206
205
  Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
@@ -230,7 +229,7 @@
230
229
 
231
230
  <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
232
231
  is a more restricted form of the canonical representation of dateTime
233
- http://www.w3.org/TR/xmlschema-2/#dateTime
232
+ http://www.w3.org/TR/xmlschema-2/#dateTime
234
233
  The trailing "Z" designates UTC time and is mandatory.
235
234
  Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
236
235
  All other components are mandatory.
@@ -245,7 +244,7 @@
245
244
  NOW/DAY+6MONTHS+3DAYS
246
245
  ... 6 months and 3 days in the future from the start of
247
246
  the current day
248
-
247
+
249
248
  Consult the TrieDateField javadocs for more information.
250
249
 
251
250
  Note: For faster range queries, consider the tdate type
@@ -261,11 +260,11 @@
261
260
 
262
261
  <!-- The "RandomSortField" is not used to store or search any
263
262
  data. You can declare fields of this type it in your schema
264
- to generate pseudo-random orderings of your docs for sorting
263
+ to generate pseudo-random orderings of your docs for sorting
265
264
  or function purposes. The ordering is generated based on the field
266
265
  name and the version of the index. As long as the index version
267
266
  remains unchanged, and the same field name is reused,
268
- the ordering of the docs will be consistent.
267
+ the ordering of the docs will be consistent.
269
268
  If you want different psuedo-random orderings of documents,
270
269
  for the same version of the index, use a dynamicField and
271
270
  change the field name in the request.
@@ -456,13 +455,13 @@
456
455
  <filter class="solr.TrimFilterFactory" />
457
456
  <!-- The PatternReplaceFilter gives you the flexibility to use
458
457
  Java Regular expression to replace any sequence of characters
459
- matching a pattern with an arbitrary replacement string,
458
+ matching a pattern with an arbitrary replacement string,
460
459
  which may include back references to portions of the original
461
460
  string matched by the pattern.
462
-
461
+
463
462
  See the Java Regular Expression documentation for more
464
463
  information on pattern and replacement string syntax.
465
-
464
+
466
465
  http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html
467
466
  -->
468
467
  <filter class="solr.PatternReplaceFilterFactory"
@@ -480,12 +479,12 @@
480
479
  </fieldType>
481
480
 
482
481
  <!-- since fields of this type are by default not stored or indexed,
483
- any data added to them will be ignored outright. -->
482
+ any data added to them will be ignored outright. -->
484
483
  <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
485
484
 
486
485
  <!-- This point type indexes the coordinates as separate fields (subFields)
487
486
  If subFieldType is defined, it references a type, and a dynamic field
488
- definition is created matching *___<typename>. Alternately, if
487
+ definition is created matching *___<typename>. Alternately, if
489
488
  subFieldSuffix is defined, that is used to create the subFields.
490
489
  Example: if subFieldType="double", then the coordinates would be
491
490
  indexed in fields myloc_0___double,myloc_1___double.
@@ -496,9 +495,6 @@
496
495
  -->
497
496
  <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
498
497
 
499
- <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
500
- <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
501
-
502
498
  <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
503
499
  For more information about this and other Spatial fields new to Solr 4, see:
504
500
  http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
@@ -101,7 +101,7 @@ describe SolrWrapper::Configuration do
101
101
  let(:options) { { mirror_url: 'http://lib-solr-mirror.princeton.edu/dist/', version: '7.2.1' } }
102
102
 
103
103
  it 'is the URL to the artifact on the preferred mirror' do
104
- expect(config.mirror_url).to eq 'http://lib-solr-mirror.princeton.edu/dist/lucene/solr/7.2.1/solr-7.2.1.zip'
104
+ expect(config.mirror_url).to eq 'http://lib-solr-mirror.princeton.edu/dist/lucene/solr/7.2.1/solr-7.2.1.tgz'
105
105
  end
106
106
  end
107
107
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solr_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rubyzip
28
+ name: minitar
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -193,6 +193,7 @@ files:
193
193
  - lib/solr_wrapper/runner.rb
194
194
  - lib/solr_wrapper/settings.rb
195
195
  - lib/solr_wrapper/tasks/solr_wrapper.rake
196
+ - lib/solr_wrapper/tgz_extractor.rb
196
197
  - lib/solr_wrapper/version.rb
197
198
  - solr_wrapper.gemspec
198
199
  - spec/fixtures/another_sample_config.yml