thinking-sphinx

    1热度

    1回答

    在我的应用程序使用has_scope宝石和thinking sphinx,并在模型中我写的东西,如: scope :by_description, -> description { where("description like ?", "%#{description}%") if description.present?} ,然后,在控制器: has_scope :by_descriptio

    0热度

    1回答

    当我搜索它会引发此异常: Mysql2 ::错误:在“阅览权限的信息包”,系统错误而丢失连接到MySQL服务器:0 - 我的Gemfile .RB - gem 'mysql2', '0.3.12b5' gem 'thinking-sphinx', '3.0.3' #'2.0.11' gem 'flying-sphinx', '1.0.0' #'0.8.4' 我运行轨道4,5和Postg

    2热度

    1回答

    运行一个脚本来填充我的数据库后,我运行了一个rake ts:rebuild,但sphinx部分重建了索引。 Stopped searchd daemon (pid: 23309). Generating configuration to /home/guest_dp/config/development.sphinx.conf Sphinx 2.1.4-id64-release (rel21-

    1热度

    1回答

    我正在构建一个应用程序,其中包含过期日期的帖子,并使用思维狮身人面像作为搜索工具。 基本上,我正在寻找一种方式做搜索时,以过滤掉过期 所以基本上将此 @posts = Post.where('expiration > ?', DateTime.now) 这个 @posts = Post.search(params[:search]) 的所有帖子 这是我的索引文件 ThinkingSphinx

    0热度

    1回答

    我有一个国家的表格(下面列出的模型)。我将思维狮身人面像添加为搜索,并希望用它来显示结果。 country.rb class Country < ActiveRecord::Base has_many :provinces has_many :cities has_many :zones has_many :users attr_accessibl

    0热度

    1回答

    我有这些查询,但现在我想使用狮身人面像,我需要替换它们,但我找不到方法来做到这一点: p1 = Product.where "category LIKE ?", "#{WORD}" p2 = Product.where "category LIKE ?", "#{WORD}.%" product_list = p1 + p2 我正在搜索“category”字段中名为“Product”的模型

    0热度

    1回答

    我有User模型,索引ProfileAnswer,has_many关系。 我索引profile_answers.response以及profile_answers.question_id。 我需要能够运行搜索查询来搜索特定问题的字符串。 以下是我这样做的方式,这是错误的。数据点 A{ profile_answer{ id = 99 question_id = 1

    0热度

    1回答

    我试图执行以下搜索为per the docs with_delivery = "*, IF(delivery = 1 OR region_id IN (001,002,003), 1, 0) AS delivery" Listing.search 'ipod', select: with_delivery, with: { 'delivery' => 1 }

    0热度

    2回答

    我在使用ThinkingSphinx作为网页上的搜索引擎。我需要的是按年份和相关性对搜索结果进行排序。 由于order: "DATE_FORMAT(created_at, '%Y') DESC"不起作用,时间段根本无用,因为我想要什么,我正在摆脱想法。

    0热度

    1回答

    我已经使用pgsql从源代码安装了Sphinx,然后在我的应用程序(Rails 4.0.3)上安装了思维-Sphinx gem(3.0.1)。并且我配置了&生成的狮身人面像配置。然后我在app/index上添加了索引,然后运行索引&通过rake ts启动sphinx:index & & ts:start,但是我得到了下面的错误,让我知道解决这个问题的方法。 耙TS:索引 产生配置于/home/st