According to the docs I think you should add auto_index: false
to your searchable block, i.e.:
class Foo < ActiveRecord::Base
searchable auto_index: false do
# your search fields here
end
end
Then you can use the following methods to manually reindex records:
# On a class itself
Person.reindex
Sunspot.commit # or commit(true) for a soft commit (Solr4)
# On mixed objects
Sunspot.index [post1, item2]
Sunspot.index person3
Sunspot.commit # or commit(true) for a soft commit (Solr4)
# With autocommit
Sunspot.index! [post1, item2, person3]