acts_as_solr 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.2
1
+ 1.3.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_solr}
8
- s.version = "1.3.2"
8
+ s.version = "1.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kyle Maxwell", "Nick Zadrozny"]
12
- s.date = %q{2010-05-27}
12
+ s.date = %q{2010-10-13}
13
13
  s.default_executable = %q{acts_as_solr}
14
14
  s.description = %q{Acts As Solr}
15
15
  s.email = %q{kyle@onemorecloud.com}
@@ -84,7 +84,7 @@ module ActsAsSolr #:nodoc:
84
84
  end
85
85
 
86
86
  query_options[:field_list] = [field_list, 'score']
87
- query = "(#{query.gsub(/ *: */,"_t:")}) #{models}"
87
+ query = "(" + query.gsub(/([a-z_][a-z0-9_]*) *: */,"\\1_t:") + ") #{models}"
88
88
  order = options[:order].split(/\s*,\s*/).collect{|e| e.gsub(/\s+/,'_t ').gsub(/\bscore_t\b/, 'score') }.join(',') if options[:order]
89
89
  query_options[:query] = replace_types([query])[0] # TODO adjust replace_types to work with String or Array
90
90
 
@@ -103,8 +103,8 @@ module ActsAsSolr #:nodoc:
103
103
  end
104
104
 
105
105
  def solr_type_condition
106
- subclasses.inject("(#{solr_configuration[:type_field]}:#{self.name}") do |condition, subclass|
107
- condition << " OR #{solr_configuration[:type_field]}:#{subclass.name}"
106
+ subclasses.inject("(#{solr_configuration[:type_field]}:\"#{self.name}\"") do |condition, subclass|
107
+ condition << " OR #{solr_configuration[:type_field]}:\"#{subclass.name}\""
108
108
  end << ')'
109
109
  end
110
110
 
@@ -231,4 +231,4 @@ module ActsAsSolr #:nodoc:
231
231
  end
232
232
 
233
233
  end
234
- end
234
+ end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_solr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 3
9
- - 2
10
- version: 1.3.2
8
+ - 3
9
+ version: 1.3.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - Kyle Maxwell
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2010-05-27 00:00:00 -07:00
18
+ date: 2010-10-13 00:00:00 -07:00
20
19
  default_executable: acts_as_solr
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -27,7 +26,6 @@ dependencies:
27
26
  requirements:
28
27
  - - ">="
29
28
  - !ruby/object:Gem::Version
30
- hash: 3
31
29
  segments:
32
30
  - 0
33
31
  version: "0"
@@ -222,7 +220,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
220
  requirements:
223
221
  - - ">="
224
222
  - !ruby/object:Gem::Version
225
- hash: 3
226
223
  segments:
227
224
  - 0
228
225
  version: "0"
@@ -231,7 +228,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
228
  requirements:
232
229
  - - ">="
233
230
  - !ruby/object:Gem::Version
234
- hash: 3
235
231
  segments:
236
232
  - 0
237
233
  version: "0"