我正在写这个
Network.search :conditions=>{:kind=>'Interest'}
我收到此错误
Sphinx Sphinx Daemon returned error: index network_core: query error: no field 'kind' found in schema
模型中的我的代码是
define_index do
indexes [name, description], as: :keyword
has kind, state
end
我已经运行了rake ts:index和rake ts:start
答案 0 :(得分:2)
您的索引应如下所示:
define_index do
indexes [name, description], as: :keyword
indexes kind
has state
end
此次运行后bundle exec rake ts:rebuild