Search code examples
couchdbsunspotreindex

How can i manually reindex solr using sunspot?


I have couchdb. Sunspot was correctly indexing everything. But the Solr server crashed. I need to reindex the whole thing. rake sunspot:reindex wont work as it is tigthly coupled with active record. sunspot.index(model.all) didnt work. the solr core says 0 indexed docs even after doing that. is there a way out?


Solution

  • What I was looking for was this:

    Post.index!(Model.all)

    There was something bad happening when I tried to index assuming that batch commits would happen automatically. Any way this worked totally fine for me.