- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
1.-6ren">
我正在尝试在我的 Rails 3 应用程序中设置 Thinking sphinx。我设置了mysql并安装了sphinx没有错误。在我的 gemfile 中有
gem "riddle", "~> 1.5.0"
gem "thinking-sphinx", "~> 2.0.10"
这些安装很好。在我的模型中我有
define_index do
indexes :name
indexes acad_field
indexes expertise
indexes interests
indexes experience
indexes marital_status
indexes email
indexes place_of_birth
indexes birthyear
indexes hometown
indexes current_residence
indexes languages
indexes nationalities
indexes ethnicities_mom_dad
indexes institution
indexes program
end
在我 Controller 的索引中有
def index
#@profiles = Profile.all
@profiles = Profile.search params[:search]
respond_to do |format|
format.html # index.html.erb
format.json { render :json => @profiles }
end
end
在我的 route 有
match "profiles?search=:search", :to => "profiles#index"
当我尝试运行搜索时出现错误
Routing Error
undefined method `define_index' for #<Class:0xb3ada670>
我在这里做错了什么。
最佳答案
我只是想跑
rake thinking_sphinx:rebuild
在终端
关于mysql - Rails 思维 sphinx 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8204425/
我是 hadoop mapreduce 框架领域的新手。自己看了很多教程,了解了框架。我已经在伪分布式模式下成功配置了一个 hadoop 设置。我有两个特定任务需要在 Hadoop MapReduce
我在我的Rails应用程序中实现了 sphinx 搜索。 我想模糊搜索。它应该搜索拼写错误,例如,如果输入搜索查询charact * a * ristics,则应该搜索charact * e * ri
我正在和会思考的 sphinx 一起工作 define_index do indexes to indexes created_on has c
我正在尝试在我的 Rails 3 应用程序中设置 Thinking sphinx。我设置了mysql并安装了sphinx没有错误。在我的 gemfile 中有 gem "riddle", "~> 1.
我有一个带有 ui-bootstrap 日期选择器的表单。我想防止日期成为过去。 我将指令的 min-date 设置为 new Date()如下所示。这可以正确地防止在使用弹出窗口时选择过去的日期,但
我对 Sphinx 还很陌生。 尝试查找名称为“bob”且 company_id 为“14”的用户。 Controller: @users = User.search 'bob', :conditio
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我是一名优秀的程序员,十分优秀!