开发者

rails thinking sphinx,How do i set delta to true after reindexing?

When I run a reindexing task(rake ts:reindex), it automatically sets delta value to false.But I definitely want delta indexing working after reindexing. So I want to set 开发者_高级运维the delta value back to 'true'. How can I do that??


You don't need delta indexing after your reindex as the main index will be up to date and complete. Your model should only set the delta flag to true after your next update, which is when your main index will be incomplete.


Thinking Sphinx will automatically set delta to true when you make changes to a model instance.

The only cases where this is not the case is when you're actually changing an association instance, instead of the indexed model, or you're changing the indexed model in some way which doesn't fire the callbacks. #update_attribute (note: singular) does not fire callbacks. #save and #update_attributes do.

So: how are you changing your model instances? Is delta indexing not occurring when you make those changes?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜