That did the trick, thanks Pat!
Here's my layout:
app/indices/sphinx_indices.rb (could be more than 1 file, I am just being
lazy and keeping what I had before)
::Forem::Post.class_eval do
define_index do
# fields
indexes text, :sortable => false
indexes user.username, :as => :author, :sortable => true
# attributes
has user_id, topic_id, created_at, updated_at
end
end
… etc
config/initializers/thinking_sphinx.rb
ThinkingSphinx::Configuration.instance.model_directories << "app/indices"
and it now works in production with class caching, and development without
class caching.
Cheers,
Nick
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/thinking-sphinx/-/bdbo5dgONXcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.