Answer the question
In order to leave comments, you need to log in
How to disable solr for save and create by default?
But you don’t know how to make SOLR indexing by default not start during save and create. Need to start manually. For example, when a user adds news, initially it does not participate in the search, then the admin publishes a post and launches a reindex for this post.
Answer the question
In order to leave comments, you need to log in
class MySearchableModel < ActiveRecord::Base
searchable :auto_index => false do
integer :id
bla bla
end
end
class AdministratorController < ApplicationController
def make_public
bla bla
MySearchableModel.reindex
Sunspot.commit
bla bla
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question