Commit e0ecc68771b373e7559d0876a1f1a1a3f638ca50
Exists in
master
and in
27 other branches
Merge branch 'ai2933' into 'master'
Index lat/lng on articles http://noosfero.org/Development/ActionItem2933 See merge request !46
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
app/models/article.rb
| ... | ... | @@ -767,7 +767,7 @@ class Article < ActiveRecord::Base |
| 767 | 767 | img.nil? ? '' : img.attributes['src'] |
| 768 | 768 | end |
| 769 | 769 | |
| 770 | - delegate :region, :region_id, :environment, :environment_id, :to => :profile, :allow_nil => true | |
| 770 | + delegate :lat, :lng, :region, :region_id, :environment, :environment_id, :to => :profile, :allow_nil => true | |
| 771 | 771 | |
| 772 | 772 | def has_macro? |
| 773 | 773 | true | ... | ... |
plugins/solr/lib/ext/article.rb
| ... | ... | @@ -29,6 +29,7 @@ class Article |
| 29 | 29 | {:profile_id => :integer}, :language, |
| 30 | 30 | {:solr_plugin_category_filter => :integer}, |
| 31 | 31 | # ordered/query-boosted fields |
| 32 | + {:lat => :float}, {:lng => :float}, | |
| 32 | 33 | {:solr_plugin_name_sortable => :string}, :last_changed_by_id, :published_at, :is_image, |
| 33 | 34 | :updated_at, :created_at, |
| 34 | 35 | ], :include => [ | ... | ... |