Skip to content

Instantly share code, notes, and snippets.

@psahni
Created August 7, 2011 05:18
Show Gist options
  • Save psahni/1130082 to your computer and use it in GitHub Desktop.
Save psahni/1130082 to your computer and use it in GitHub Desktop.
sphinx blog
class Country < ActiveRecord::Base
has_many :places_to_visits
define_index do
indexes name,
:sortable => true
indexes about
indexes rating_no
indexes capital
indexes places_to_visits(:name), :as => :place, :sortable => true
has continent_id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment