Can anybody suggest is it possible with sunspot to have a callback like after_commit or after reindex.
I want cache facets in user session and reload them when something changed.
Is it possible?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using
ActiveRecordyou may hook intoafter_saveof your Model instead of hooking into sunspot. It does the same. Just ensure you are defining the hook after thesearchabledefinition to get re-indexed data from Solr.