在轨道中思考狮身人面像协会3

时间:2011-07-15 16:47:37

标签: ruby-on-rails thinking-sphinx

我有这个:

用户模型

define_index do
    indexes username
    indexes [contact.last_name,contact.first_name] ,:sortable => true,:as=>:user_full_name
     #no results        
    indexes profiles.working_experiences.job_title,:as=>:user_job_title
end

我从来没有得到job_title的结果...... 我在这里错过了什么?

1 个答案:

答案 0 :(得分:0)

1)通过模型检查您的关联

2)确保在搜索命令中引用:user_job_title,而不是job_title,因为你正在别名