Top Level Namespace
Defined Under Namespace
Modules: Riddle, ThinkingSphinx Classes: Forum, Post, Topic, User
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/test.rb', line 33 def index @index ||= ThinkingSphinx::Index.new(Topic) do indexes posts.content, :as => :posts indexes posts.creator.login, :as => :authors has :created_at has :id, :as => :topic_id has :forum_id has posts(:id), :as => :post_ids has posts.creator(:id), :as => :user_ids where "posts.created_at < NOW()" end end |