1
我試圖讓我們的應用程序更具彈性,從我們的搜索服務器宕機。爲了實現這一點,我試圖禁用自動索引和刪除,並手動在後臺進程中執行它們。Sunspot_rails不尊重:auto_index和:auto_remove
我想
searchable :auto_index => false, :auto_remove => false do
...
end
但還是接收到連接錯誤,每次我嘗試保存或銷燬記錄的時間。
回溯顯示錯誤來自solr可搜索文件,所以它定義爲sunspot_rails導致問題。這是從摧毀的回溯片:
...
rsolr (1.0.8) lib/rsolr/client.rb:67:in `update'
rsolr (1.0.8) lib/rsolr/client.rb:121:in `delete_by_id'
sunspot (1.3.3) lib/sunspot/indexer.rb:36:in `remove'
sunspot (1.3.3) lib/sunspot/session.rb:137:in `block in remove'
sunspot (1.3.3) lib/sunspot/session.rb:136:in `each'
sunspot (1.3.3) lib/sunspot/session.rb:136:in `remove'
sunspot (1.3.3) lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove'
sunspot (1.3.3) lib/sunspot.rb:410:in `remove'
sunspot_rails (1.3.3) lib/sunspot/rails/searchable.rb:390:in `solr_remove_from_index'
sunspot_rails (1.3.3) lib/sunspot/rails/searchable.rb:93:in `block in searchable'
...
任何想法爲什麼選項來禁用這些掛鉤不工作?任何想法如何實際禁用它們?
感謝
感謝您的有用信息@Forrest – Cec 2016-03-21 09:27:51