我遇到了thinking_sphinx/sphinx 的奇怪行为。
我的define_index 块大约有100 行,所以我正在索引很多列。对于全文搜索,我只需要大约 10 个属性,对于排序和过滤,我还有大约 50 列,主要是浮点数和整数。
通过过滤我的意思是使用“with”或“without”选项。
搜索并不能始终如一地工作。突然之间,一个属性无法过滤。或者如果我添加一个新的,它不起作用。只有经过大量修补后,它才突然开始工作。我无法真正重现它。有时会导致我成功的步骤,其中:
- rm -rf 数据库/狮身人面像
- 更改属性定义,例如 has some_attribute => has some_attribute, :sortable => true 或 => has some_attribute, :sortable => true, :as => "some_attribute"
- 重新启动服务器
- 分配一个新的 :as name => 具有 some_attribute, :as => "some_attribute_new"
(是的,我在每一步之后都 rake ts:rebuild 或 rake ts:in)
有没有其他人遇到过类似的问题?