Commit 82ea2817291bf8a0c88b979ed27f549ca4ce17af
1 parent
87729e57
Exists in
master
and in
29 other branches
Update acts_as_solr_reloaded to 26277542d5976
Showing
4 changed files
with
6 additions
and
6 deletions
Show diff stats
vendor/plugins/acts_as_solr_reloaded/TESTING_THE_PLUGIN
@@ -14,7 +14,7 @@ To run the acts_as_solr's plugin tests run the following steps: | @@ -14,7 +14,7 @@ To run the acts_as_solr's plugin tests run the following steps: | ||
14 | 14 | ||
15 | - create a new Rails project, if needed (the plugin can only be tested from within a Rails project); move/checkout acts_as_solr into its vendor/plugins/, as usual | 15 | - create a new Rails project, if needed (the plugin can only be tested from within a Rails project); move/checkout acts_as_solr into its vendor/plugins/, as usual |
16 | 16 | ||
17 | -- copy vendor/plugins/acts_as_solr/config/solr.yml to config/ (the Rails config folder) | 17 | +- copy vendor/plugins/acts_as_solr_reloaded/config/solr.yml to config/ (the Rails config folder) |
18 | 18 | ||
19 | - rake solr:start RAILS_ENV=test | 19 | - rake solr:start RAILS_ENV=test |
20 | 20 |
vendor/plugins/acts_as_solr_reloaded/lib/acts_as_solr/class_methods.rb
@@ -181,8 +181,8 @@ module ActsAsSolr #:nodoc: | @@ -181,8 +181,8 @@ module ActsAsSolr #:nodoc: | ||
181 | end | 181 | end |
182 | 182 | ||
183 | def multi_model_suffix(options) | 183 | def multi_model_suffix(options) |
184 | - models = "AND (#{solr_configuration[:type_field]}:#{self.name}" | ||
185 | - models << " OR " + options[:models].collect {|m| "#{solr_configuration[:type_field]}:" + m.to_s}.join(" OR ") if options[:models].is_a?(Array) | 184 | + models = "AND (#{solr_configuration[:type_field]}:\"#{self.name}\"" |
185 | + models << " OR " + options[:models].collect {|m| "#{solr_configuration[:type_field]}:\"" + m.to_s + "\""}.join(" OR ") if options[:models].is_a?(Array) | ||
186 | models << ")" | 186 | models << ")" |
187 | end | 187 | end |
188 | 188 |
vendor/plugins/acts_as_solr_reloaded/lib/acts_as_solr/parser_methods.rb
@@ -107,8 +107,8 @@ module ActsAsSolr #:nodoc: | @@ -107,8 +107,8 @@ module ActsAsSolr #:nodoc: | ||
107 | end | 107 | end |
108 | 108 | ||
109 | def solr_type_condition | 109 | def solr_type_condition |
110 | - (subclasses || []).inject("(#{solr_configuration[:type_field]}:#{self.name}") do |condition, subclass| | ||
111 | - condition << (subclass.name.empty? ? "" : " OR #{solr_configuration[:type_field]}:#{subclass.name}") | 110 | + (subclasses || []).inject("(#{solr_configuration[:type_field]}:\"#{self.name}\"") do |condition, subclass| |
111 | + condition << (subclass.name.empty? ? "" : " OR #{solr_configuration[:type_field]}:\"#{subclass.name}\"") | ||
112 | end << ')' | 112 | end << ')' |
113 | end | 113 | end |
114 | 114 |
vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake
@@ -2,7 +2,7 @@ namespace :solr do | @@ -2,7 +2,7 @@ namespace :solr do | ||
2 | 2 | ||
3 | desc 'Download and install Solr+Jetty 3.3.0.' | 3 | desc 'Download and install Solr+Jetty 3.3.0.' |
4 | task :download do | 4 | task :download do |
5 | - if (File.exists?(Rails.root + '/vendor/plugins/acts_as_solr/solr/start.jar')) | 5 | + if (File.exists?(Rails.root + '/vendor/plugins/acts_as_solr_reloaded/solr/start.jar')) |
6 | puts 'Solr already downloaded.' | 6 | puts 'Solr already downloaded.' |
7 | else | 7 | else |
8 | cd '/tmp' | 8 | cd '/tmp' |