我有一个包含存档和非存档数据的Meeting模型。
当我运行Model.reindex时,只有非归档数据会被编入索引。
我还想索引非归档数据,以便在使用searchkick的search方法时也能看到非归档数据。
对于归档,我使用了paranoia gem,归档列名为cancelled_at。
发布于 2018-08-29 16:49:23
Model.with_deleted.reindex由于paranoia gem default_scope总是没有删除/存档的,所以只需使用paranoia自述文件https://github.com/rubysherpas/paranoia#usage中记录的帮助范围
https://stackoverflow.com/questions/52072350
复制相似问题