sunspot_solr 1.3.3 → 2.0.0.pre.111215

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Sunspot
2
2
  module Solr
3
3
  module Java
4
4
  def self.installed?
5
- `java -version`
5
+ `java -version &> /dev/null`
6
6
  $?.success?
7
7
  end
8
8
  end
@@ -1,4 +1,4 @@
1
- require 'shellwords'
1
+ require 'escape'
2
2
  require 'set'
3
3
  require 'tempfile'
4
4
  require 'sunspot/solr/java'
@@ -101,7 +101,7 @@ module Sunspot
101
101
  command << "-Djava.util.logging.config.file=#{logging_config_path}" if logging_config_path
102
102
  command << '-jar' << File.basename(solr_jar)
103
103
  FileUtils.cd(File.dirname(solr_jar)) do
104
- exec(Shellwords.shelljoin(command))
104
+ exec(Escape.shell_command(command))
105
105
  end
106
106
  end
107
107
 
@@ -84,11 +84,14 @@
84
84
  <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
85
85
  <!-- *** This fieldType is used by Sunspot! *** -->
86
86
  <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"/>
87
+
88
+ <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
89
+ <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
87
90
  </types>
88
91
  <fields>
89
92
  <!-- Valid attributes for fields:
90
93
  name: mandatory - the name for the field
91
- type: mandatory - the name of a previously defined type from the
94
+ type: mandatory - the name of a previously defined type from the
92
95
  <types> section
93
96
  indexed: true if this field should be indexed (searchable or sortable)
94
97
  stored: true if this field should be retrievable
@@ -223,8 +226,17 @@
223
226
  <dynamicField name="*_ets" stored="true" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
224
227
  <!-- *** This dynamicField is used by Sunspot! *** -->
225
228
  <dynamicField name="*_etms" stored="true" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
229
+
230
+ <!-- Type used to index the lat and lon components for the "location" FieldType -->
231
+ <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" multiValued="false"/>
232
+ <dynamicField name="*_p" type="location" indexed="true" stored="true" multiValued="false"/>
233
+
234
+ <dynamicField name="*_ll" stored="false" type="location" multiValued="false" indexed="true"/>
235
+ <dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
236
+ <dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
237
+ <dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
226
238
  </fields>
227
- <!-- Field to use to determine and enforce document uniqueness.
239
+ <!-- Field to use to determine and enforce document uniqueness.
228
240
  Unless this field is marked with required="false", it will be a required field
229
241
  -->
230
242
  <uniqueKey>id</uniqueKey>
data/solr/start.jar CHANGED
Binary file
Binary file
data/spec/server_spec.rb CHANGED
@@ -35,14 +35,14 @@ describe Sunspot::Solr::Server do
35
35
  end
36
36
 
37
37
  it 'runs Solr with specified data dir' do
38
- @server.solr_data_dir = '/var/solr/data'
39
- @server.should_receive(:exec).with(%r(-Dsolr\.data\.dir=/var/solr/data))
38
+ @server.solr_data_dir = '/tmp/var/solr/data'
39
+ @server.should_receive(:exec).with(%r(-Dsolr\.data\.dir=/tmp/var/solr/data))
40
40
  @server.run
41
41
  end
42
42
 
43
43
  it 'runs Solr with specified Solr home' do
44
- @server.solr_home = '/var/solr'
45
- @server.should_receive(:exec).with(%r(-Dsolr\.solr\.home=/var/solr))
44
+ @server.solr_home = '/tmp/var/solr'
45
+ @server.should_receive(:exec).with(%r(-Dsolr\.solr\.home=/tmp/var/solr))
46
46
  @server.run
47
47
  end
48
48
 
data/sunspot_solr.gemspec CHANGED
@@ -28,6 +28,8 @@ Gem::Specification.new do |s|
28
28
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
29
29
  s.require_paths = ["lib"]
30
30
 
31
+ s.add_dependency 'escape', '~>0.0.4'
32
+
31
33
  s.add_development_dependency 'rspec', '~> 1.1'
32
34
  s.add_development_dependency 'hanna'
33
35
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot_solr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
4
+ prerelease: true
6
5
  segments:
7
- - 1
8
- - 3
9
- - 3
10
- version: 1.3.3
6
+ - 2
7
+ - 0
8
+ - 0
9
+ - pre
10
+ - 111215
11
+ version: 2.0.0.pre.111215
11
12
  platform: ruby
12
13
  authors:
13
14
  - Mat Brown
@@ -33,37 +34,48 @@ autorequire:
33
34
  bindir: bin
34
35
  cert_chain: []
35
36
 
36
- date: 2012-06-11 00:00:00 Z
37
+ date: 2011-12-15 00:00:00 -07:00
38
+ default_executable:
37
39
  dependencies:
38
40
  - !ruby/object:Gem::Dependency
39
- name: rspec
41
+ name: escape
40
42
  prerelease: false
41
43
  requirement: &id001 !ruby/object:Gem::Requirement
42
- none: false
43
44
  requirements:
44
45
  - - ~>
45
46
  - !ruby/object:Gem::Version
46
- hash: 13
47
+ segments:
48
+ - 0
49
+ - 0
50
+ - 4
51
+ version: 0.0.4
52
+ type: :runtime
53
+ version_requirements: *id001
54
+ - !ruby/object:Gem::Dependency
55
+ name: rspec
56
+ prerelease: false
57
+ requirement: &id002 !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
47
61
  segments:
48
62
  - 1
49
63
  - 1
50
64
  version: "1.1"
51
65
  type: :development
52
- version_requirements: *id001
66
+ version_requirements: *id002
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: hanna
55
69
  prerelease: false
56
- requirement: &id002 !ruby/object:Gem::Requirement
57
- none: false
70
+ requirement: &id003 !ruby/object:Gem::Requirement
58
71
  requirements:
59
72
  - - ">="
60
73
  - !ruby/object:Gem::Version
61
- hash: 3
62
74
  segments:
63
75
  - 0
64
76
  version: "0"
65
77
  type: :development
66
- version_requirements: *id002
78
+ version_requirements: *id003
67
79
  description: " Sunspot::Solr provides a bundled Solr distribution for use with Sunspot.\n Typical deployment environments will require more configuration, but this\n distribution is well suited to development and testing.\n"
68
80
  email:
69
81
  - mat@patch.com
@@ -90,13 +102,13 @@ files:
90
102
  - solr/README.txt
91
103
  - solr/etc/jetty.xml
92
104
  - solr/etc/webdefault.xml
93
- - solr/lib/jetty-6.1.3.jar
94
- - solr/lib/jetty-util-6.1.3.jar
105
+ - solr/lib/jetty-6.1.26-patched-JETTY-1340.jar
106
+ - solr/lib/jetty-util-6.1.26-patched-JETTY-1340.jar
95
107
  - solr/lib/jsp-2.1/ant-1.6.5.jar
96
108
  - solr/lib/jsp-2.1/core-3.1.1.jar
97
109
  - solr/lib/jsp-2.1/jsp-2.1.jar
98
110
  - solr/lib/jsp-2.1/jsp-api-2.1.jar
99
- - solr/lib/servlet-api-2.5-6.1.3.jar
111
+ - solr/lib/servlet-api-2.5-20081211.jar
100
112
  - solr/solr/.gitignore
101
113
  - solr/solr/README.txt
102
114
  - solr/solr/conf/admin-extra.html
@@ -118,6 +130,7 @@ files:
118
130
  - spec/server_spec.rb
119
131
  - spec/spec_helper.rb
120
132
  - sunspot_solr.gemspec
133
+ has_rdoc: true
121
134
  homepage: https://github.com/outoftime/sunspot/tree/master/sunspot_solr
122
135
  licenses: []
123
136
 
@@ -131,27 +144,25 @@ rdoc_options:
131
144
  require_paths:
132
145
  - lib
133
146
  required_ruby_version: !ruby/object:Gem::Requirement
134
- none: false
135
147
  requirements:
136
148
  - - ">="
137
149
  - !ruby/object:Gem::Version
138
- hash: 3
139
150
  segments:
140
151
  - 0
141
152
  version: "0"
142
153
  required_rubygems_version: !ruby/object:Gem::Requirement
143
- none: false
144
154
  requirements:
145
- - - ">="
155
+ - - ">"
146
156
  - !ruby/object:Gem::Version
147
- hash: 3
148
157
  segments:
149
- - 0
150
- version: "0"
158
+ - 1
159
+ - 3
160
+ - 1
161
+ version: 1.3.1
151
162
  requirements: []
152
163
 
153
164
  rubyforge_project: sunspot
154
- rubygems_version: 1.8.15
165
+ rubygems_version: 1.3.6
155
166
  signing_key:
156
167
  specification_version: 3
157
168
  summary: Bundled Solr distribution for Sunspot
Binary file
Binary file