Commit e0ecc68771b373e7559d0876a1f1a1a3f638ca50
Exists in
master
and in
29 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,7 +767,7 @@ class Article < ActiveRecord::Base | ||
767 | img.nil? ? '' : img.attributes['src'] | 767 | img.nil? ? '' : img.attributes['src'] |
768 | end | 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 | def has_macro? | 772 | def has_macro? |
773 | true | 773 | true |
plugins/solr/lib/ext/article.rb
@@ -29,6 +29,7 @@ class Article | @@ -29,6 +29,7 @@ class Article | ||
29 | {:profile_id => :integer}, :language, | 29 | {:profile_id => :integer}, :language, |
30 | {:solr_plugin_category_filter => :integer}, | 30 | {:solr_plugin_category_filter => :integer}, |
31 | # ordered/query-boosted fields | 31 | # ordered/query-boosted fields |
32 | + {:lat => :float}, {:lng => :float}, | ||
32 | {:solr_plugin_name_sortable => :string}, :last_changed_by_id, :published_at, :is_image, | 33 | {:solr_plugin_name_sortable => :string}, :last_changed_by_id, :published_at, :is_image, |
33 | :updated_at, :created_at, | 34 | :updated_at, :created_at, |
34 | ], :include => [ | 35 | ], :include => [ |