ruby on rails - Sunspot ActiveRecord save doesn't reindex? -
i new sunspot, based on wiki https://github.com/sunspot/sunspot.
"if using rails, objects automatically indexed solr part of save callbacks."
but doesn't work me when calling save on object, had manually run object.reindex able find record in search result. missing something?
thanks
console log
sql (0.6ms) insert "toons" ("author", "created_at", "flag_id", "icon_s3_path", "json", "name", "state", "toon_type", "updated_at", "user_id", "uuid", "view_count") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) returning "id" [["author", "2333333"], ["created_at", thu, 15 aug 2013 22:49:40 utc +00:00], ["flag_id", nil], ["icon_s3_path", nil], ["json", "[json]"], ["name", "2222222"], ["state", "created"], ["toon_type", "animation"], ["updated_at", thu, 15 aug 2013 22:49:40 utc +00:00], ["user_id", 2], ["uuid", "2111112222"], ["view_count", nil]] solr request (25.6ms) [ path=#<rsolr::client:0x007fc37bb71920> parameters={data: <?xml version="1.0" encoding="utf-8"?><add><doc><field name="id">toon 21</field><field name="type">toon</field><field name="type">activerecord::base</field><field name="class_name">toon</field><field name="created_at_d">2013-08-15t22:49:40z</field><field name="name_text">2222222</field><field name="author_text">2333333</field></doc></add>, headers: {"content-type"=>"text/xml"}, method: post, params: {:wt=>:ruby}, query: wt=ruby, path: update, uri: http://localhost:8982/solr/update?wt=ruby, open_timeout: , read_timeout: , retry_503: , retry_after_limit: } ] solr request (2.9ms) [ path=#<rsolr::client:0x007fc37bb71920> parameters={data: <?xml version="1.0" encoding="utf-8"?><add><doc><field name="id">toon 21</field><field name="type">toon</field><field name="type">activerecord::base</field><field name="class_name">toon</field><field name="created_at_d">2013-08-15t22:49:40z</field><field name="name_text">2222222</field><field name="author_text">2333333</field></doc></add>, headers: {"content-type"=>"text/xml"}, method: post, params: {:wt=>:ruby}, query: wt=ruby, path: update, uri: http://localhost:8982/solr/update?wt=ruby, open_timeout: , read_timeout: , retry_503: , retry_after_limit: } ] (7.5ms) commit
fixed adding auto commit solrconfig.xml
<autocommit> <maxdocs>10000</maxdocs> <maxtime>20000</maxtime> </autocommit>
Comments
Post a Comment