我正在尝试重新思考思考狮身人面像,我仍然坚持这个错误:source 'user_core_0': expected attr type ('uint' or 'timestamp' or 'bigint') in sql_attr_multi, got 'string zip_city from field'
我不确定还有什么需要改变。
ThinkingSphinx::Index.define :user, :with => :active_record do
# fields
indexes name, :as => :user, :sortable => true
indexes religion, zip_code, about_me, career, sexuality, children, user_smoke, user_drink, gender, ethnicity, education
# attributes
has id, created_at, updated_at
has zips.city, :as => :zip_city
has "RADIANS(zips.lat)", :as => :latitude, :type => :float
has "RADIANS(zips.lon)", :as => :longitude, :type => :float
end
答案 0 :(得分:1)
尝试更改属性
has zips.city, :as => :zip_city
到
has "(ZIP)zip.city", :as => :zip_city, :type => :integer