It doesn’t look like SunSpot has a builtin optimize command.
Here’s one way you can do it:
Sunspot.session.session.send(:connection).update RSolr::Message::Generator.new.build { |b| b.optimize }
Anyone know of a simpler one?
|
|||||
|
It doesn’t look like SunSpot has a builtin optimize command. Anyone know of a simpler one? http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html Use http://github.com/gumayunov/custom-err-msg/tree/master This can be a pain to find so here is the quick access version: Sometimes you wish to convert one STI class to another, e.g. promote User to Administrator. Note however that this does not change the type attribute of the instance, so you still have an additional step to do if you want this [...] Yehuda Katz talked about Rails 3 If you have two models associated in some way, it is usual to add a validates_presence_of validator to ensure that the models are connected before saving. However, be aware that there are two ways of doing this with different performance ramifications: class BlogEntry < ActiveRecord::Base During validation, Validates_presence_of :blog causes ActiveRecord [...] Ikai Lan, JRuby Thanks to this post, I discovered how to install the MySQL ruby gem on Mac OS X: sudo env ARCHFLAGS="-arch i386" gem install mysql — \ Jerry Luk, LinkedIn Bumper Sticker RoR app: 17M users, 900M views/month Emmet @ JustIn.tv Website for live video on the Internet (Youtube but live!) |
|||||
|
Copyright © 2010 Sam Pierson's Blog - All Rights Reserved |
|||||