Tag: thinking sphinx

通过混合大写和小写来思考狮身人面像

我有一个使用thinking_sphinx进行搜索的rails应用程序。 我的问题是返回的结果首先是大写字母,小写字母是在底部。 我想混合它们,以便’A’和’a’都在’B’之前。 这是我正在使用的方法: Company.search(query, :star => true, :page => params[:page], :per_page => 20, :order => :name, :sort_mode => :asc)

与思维狮身人面像的深层联系和狮身人面像指数?

目前我有ff表: Teams id Team_User team_id, user_id Users user_id Item id team_id 和ff。 模型: Team has_and_belongs_to_many :users User has_and_belongs_to_many :teams Item belongs_to :audit_team, :class_name => “Team”, :foreign_key => “team_id” 为什么我要尝试存档是为了让Sphinx索引与Item关联的所有user_id,我想出了这个索引定义: define_index do has audit_team.users(id), :as => :team_users end 我不确定这是否正确。 此外,Thinking Sphinx没有为此构建配置。 当我重建,重新索引并运行应用程序时,ff。 出现错误: index ncpar_core: no such filter attribute ‘team_users’ 可能是什么问题,我该如何存档? 非常感谢你

如何在Thinking Sphinx搜索中添加条件“IS NOT NULL”

我正在使用Thinking Sphinx进行全文搜索,关注此video 。 我想做以下事情: @articles = Article.search(params[:search], :conditions => “published_at IS NOT NULL”, :order => :created_at) 问题是这不起作用。 似乎搜索方法只接受作为哈希的条件。 我尝试了几种方法,但我对如何将“published_at IS NOT NULL”表示为哈希表示无能为力……