I use Sunspot Solr to index and search our Ruby on Rails application using the MangoDB database (Mongo mapper)
The search works well, but objects are not indexed automatically in Solr when I make changes to my database.
I tried to manually index the class itself:
Top.reindex Sunspot.commit
Or, I added to sunspot.yml: auto_commit_after_request: true I will also auto-switch at a certain interval to solrconfig.xml:
<autoCommit>
<maxDocs>10000</maxDocs>
<maxTime>15000</maxTime>
</autoCommit>
All these solutions could not automatically reindex my objects unless I reindex all the objects with the rake command:
bundle exec rake sunspot:reindex
Any other solutions?
Many thanks.