Commit 4f6b72bc00f76cb532c04b8995ab0ed9ae97e446

Authored by Braulio Bhavamitra
1 parent 77aa69cd

Index lat/lng on articles

app/models/article.rb
@@ -760,7 +760,7 @@ class Article < ActiveRecord::Base @@ -760,7 +760,7 @@ class Article < ActiveRecord::Base
760 img.nil? ? '' : img.attributes['src'] 760 img.nil? ? '' : img.attributes['src']
761 end 761 end
762 762
763 - delegate :region, :region_id, :environment, :environment_id, :to => :profile, :allow_nil => true 763 + delegate :lat, :lng, :region, :region_id, :environment, :environment_id, :to => :profile, :allow_nil => true
764 764
765 def has_macro? 765 def has_macro?
766 true 766 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 => [