Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'll assume you have the latest version of sunspot gem.</p> <ol> <li><p>Sunspot reindexes each time the model has changed. To tweak this behaviour (see <a href="https://github.com/outoftime/sunspot_rails/wiki/Installation-and-configuration" rel="nofollow noreferrer">options for searchable</a>):</p> <p>searchable :ignore_attribute_changes_of => [ :average_rating, :permalink ] do text :title end</p> <p>Take a look on the source code: <a href="https://github.com/outoftime/sunspot/blob/master/sunspot_rails/lib/sunspot/rails/searchable.rb#L393" rel="nofollow noreferrer">https://github.com/outoftime/sunspot/blob/master/sunspot_rails/lib/sunspot/rails/searchable.rb</a></p></li> <li><p>Your site should still work until the first request to solr:</p> <ul> <li><p>either a full text search request</p></li> <li><p>either an indexing request</p></li> </ul> <p>You are probably making an update on the user model each time a user logs in, therefore triggering a reindex.</p></li> </ol> <p>More tips:</p> <ul> <li><p>in fact, it's not the indexing that takes a lot of time, it's the commit command; the commit command is issued, by default, on the end of each web request ; This is very costly in a production env. I advice you to <a href="https://stackoverflow.com/questions/4937314/setup-sunspot-solr-with-rails-in-production-environment">change the policy</a> to <a href="http://wiki.apache.org/solr/SolrConfigXml#Update_Handler_Section" rel="nofollow noreferrer">autocommit after X seconds</a>; </p></li> <li><p>if you want that your want to patch sunspot so that you site should work in case of solr server failure, I advise you to take a look on this gem, that mocks server interface for the test env: <a href="https://github.com/pivotal/sunspot_matchers" rel="nofollow noreferrer">sunspot_matchers</a></p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload