Commit 4f6b72bc00f76cb532c04b8995ab0ed9ae97e446
1 parent
77aa69cd
Exists in
staging
and in
42 other branches
Index lat/lng on articles
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
app/models/article.rb
| ... | ... | @@ -760,7 +760,7 @@ class Article < ActiveRecord::Base |
| 760 | 760 | img.nil? ? '' : img.attributes['src'] |
| 761 | 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 | 765 | def has_macro? |
| 766 | 766 | 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 => [ | ... | ... |